# aadityasigdel/doctormerosathi architecture

> Architecture diagram of the GitHub repository aadityasigdel/doctormerosathi, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-05-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aadityasigdel/doctormerosathi
- Repository: https://github.com/aadityasigdel/doctormerosathi

## Overview

##### Project type and purpose
- DoctorMeroSathi is a full-stack Java web application (Servlets + JSP) that implements an MVC pattern. Its core purpose is to let end users browse doctors, register/log in, schedule appointments, view dashboards, chat, and manage profiles via a Tomcat-hosted web UI backed by a relational database.

##### File structure
- Top level
- pom.xml / .mvn / mvnw: Maven build + wrapper
- .smarttomcat: local Tomcat config (server.xml, web.xml, context.xml)
- src/main/java/org/example/doctormerosathi
- Util: DbConnectionUtil, PasswordHashUtil
- filters: AuthFilter (servlet filter chain)
- controller: ~25 HttpServlets (LoginServlet, RegisterServlet, BookAppServlet, ChatServlet, etc.)
- services: business logic layer (AuthService, AppointmentService, UserService, DashboardService)
- dao: data access objects (AppointmentDAO, UserProfileDAO, ScheduleDAO, AdminDashDAO, userdao)
- model: POJOs (UsersModel, Appointment, DoctorSchedule, Review, Message, etc.)
- src/main/resources
- db.properties, schema.sql
- src/main/webapp
- CSS directory, JSP under WEB-INF/view, index.jsp, web.xml

##### README
- Confirms Java Servlet + JSP stack, Tomcat deployment, user-doctor listing + booking, session handling.

## Diagram (Mermaid)

```mermaid
flowchart TB
    Browser["Web Browser"]:::external
    subgraph "Web Container (Tomcat)"
        AuthFilter["AuthFilter"]:::infra
        Controllers["Controller Servlets"]:::infra
        Services["Service Layer"]:::business
        DAOs["Data Access Layer (DAOs)"]:::persistence
        DBUtil["DbConnectionUtil"]:::util
        HashUtil["PasswordHashUtil"]:::util
        Static["Static Assets (CSS)"]:::presentation
        JSPViews["JSP Views"]:::presentation
        Index["Index.jsp"]:::presentation
        TomcatConf["Tomcat Config"]:::infra
        WebXml["web.xml"]:::infra
    end
    Database["Database"]:::db
    DBProps["db.properties"]:::infra
    Schema["schema.sql"]:::infra

    Browser -->|"HTTP(S) request"| AuthFilter
    AuthFilter --> Controllers
    Controllers --> Services
    Services --> DAOs
    DAOs -->|"JDBC via DbConnectionUtil"| Database
    Services --> DBUtil
    Services --> HashUtil
    Controllers --> JSPViews
    JSPViews -->|"renders HTML/CSS"| Browser
    Static -->|"served"| Browser
    Controllers --> Static
    Browser -->|"GET /index.jsp"| Index
    Index --> JSPViews
    Database --> DBProps
    Database --> Schema

    click JSPViews "https://github.com/aadityasigdel/doctormerosathi/tree/master/src/main/webapp/WEB-INF/view"
    click Static "https://github.com/aadityasigdel/doctormerosathi/tree/master/src/main/webapp/Css"
    click Index "https://github.com/aadityasigdel/doctormerosathi/blob/master/src/main/webapp/index.jsp"
    click AuthFilter "https://github.com/aadityasigdel/doctormerosathi/blob/master/src/main/Java/org/example/doctormerosathi/filters/AuthFilter.java"
    click Controllers "https://github.com/aadityasigdel/doctormerosathi/tree/master/src/main/Java/org/example/doctormerosathi/controller"
    click Services "https://github.com/aadityasigdel/doctormerosathi/tree/master/src/main/Java/org/example/doctormerosathi/services"
    click DAOs "https://github.com/aadityasigdel/doctormerosathi/tree/master/src/main/Java/org/example/doctormerosathi/dao"
    click DBUtil "https://github.com/aadityasigdel/doctormerosathi/blob/master/src/main/Java/org/example/doctormerosathi/Util/DbConnectionUtil.java"
    click HashUtil "https://github.com/aadityasigdel/doctormerosathi/blob/master/src/main/Java/org/example/doctormerosathi/Util/PasswordHashUtil.java"
    click TomcatConf "https://github.com/aadityasigdel/doctormerosathi/blob/master/.smarttomcat/DoctorMeroSathi/conf/web.xml"
    click WebXml "https://github.com/aadityasigdel/doctormerosathi/blob/master/src/main/webapp/WEB-INF/web.xml"
    click DBProps "https://github.com/aadityasigdel/doctormerosathi/blob/master/src/main/resources/db.properties"
    click Schema "https://github.com/aadityasigdel/doctormerosathi/blob/master/src/main/resources/schema.sql"

    classDef presentation fill:#add8e6,stroke:#000
    classDef business fill:#90ee90,stroke:#000
    classDef persistence fill:#ffa500,stroke:#000
    classDef infra fill:#d3d3d3,stroke:#000
    classDef util fill:#d3d3d3,stroke:#000
    classDef db fill:#ffebcd,stroke:#000
    classDef external fill:#f0f8ff,stroke:#000
```
