# vatsl808/appointix architecture

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

- Interactive diagram: https://gitdiagram.com/vatsl808/appointix
- Repository: https://github.com/vatsl808/appointix

## Overview

##### Project type and purpose
- Appointix is a full-stack Clinic Appointment System.
- The backend (Python) serves REST APIs, handles authentication, stores data in SQLite, and hosts uploaded profile pictures.
- The frontend (React) is a single-page application that consumes these APIs to let patients and doctors register, log in, view/book appointments, and manage profiles.

##### File structure
- Top-level directories:
- cas-backend/ – Python server, virtual environment, SQLite database, uploads folder for profile pictures
- cas-frontend/ – React app (Create React App structure) with source code, components, pages, styles, assets, and utility functions
- Backend: server.py is the main entry point; appointix.db is the persistent store; uploads/profile_pics holds user images.
- Frontend: src/components has reusable UI components; src/pages holds route-level pages; src/utils for helper functions; public/ for static HTML and manifest.

##### README
- Confirms startup sequence: activate Python venv → run server.py; then npm start for frontend → app available at localhost:3000.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Frontend (React SPA)"
        direction TB
        Browser["User's Browser"]:::frontend
        Index["Root Rendering\nindex.js"]:::frontend
        App["SPA Entry Point\nApp.js"]:::frontend
        Styles["Global Styles\n(index.css, App.css)"]:::frontend
        Components["Reusable UI Components"]:::frontend
        Pages["Page-Level Routes"]:::frontend
        Utils["Frontend Utilities\n(availabilityUtils.js)"]:::frontend
        Public["Static Assets\n(index.html, manifest.json, robots.txt)"]:::frontend
    end

    subgraph "Backend (Python API)"
        direction TB
        APIServer["Flask API Server\n(server.py)"]:::backend
        Database["SQLite Database\n(appointix.db)"]:::db
        Storage["Profile Picture Storage\n(uploads/profile_pics)"]:::storage
        Venv["Python Virtual Environment\n(venv)"]:::backend
        Readme["Project README\n(README.md)"]:::external
    end

    Browser -->|loads| Public
    Browser -->|renders| Index
    Index -->|renders| App
    App -->|applies| Styles
    App -->|uses| Components
    App -->|navigates| Pages
    App -->|calls utilities| Utils
    App -->|calls REST API| APIServer
    APIServer -->|executes SQL queries| Database
    APIServer -->|stores/serves images| Storage
    APIServer -->|returns JSON responses| Browser

    click Index "https://github.com/vatsl808/appointix/blob/main/cas-frontend/src/index.js"
    click App "https://github.com/vatsl808/appointix/blob/main/cas-frontend/src/App.js"
    click Styles "https://github.com/vatsl808/appointix/blob/main/cas-frontend/src/index.css"
    click Styles "https://github.com/vatsl808/appointix/blob/main/cas-frontend/src/App.css"
    click Navbar "https://github.com/vatsl808/appointix/blob/main/cas-frontend/src/components/Navbar.js"
    click LoginForm "https://github.com/vatsl808/appointix/blob/main/cas-frontend/src/components/LoginForm.js"
    click RegisterForm "https://github.com/vatsl808/appointix/blob/main/cas-frontend/src/components/RegisterForm.js"
    click AppointmentForm "https://github.com/vatsl808/appointix/blob/main/cas-frontend/src/components/AppointmentForm.js"
    click AppointmentList "https://github.com/vatsl808/appointix/blob/main/cas-frontend/src/components/AppointmentList.js"
    click AvailabilityModal "https://github.com/vatsl808/appointix/blob/main/cas-frontend/src/components/AvailabilityModal.js"
    click DoctorCard "https://github.com/vatsl808/appointix/blob/main/cas-frontend/src/components/DoctorCard.js"
    click EditAppointmentModal "https://github.com/vatsl808/appointix/blob/main/cas-frontend/src/components/EditAppointmentModal.js"
    click EditProfileModal "https://github.com/vatsl808/appointix/blob/main/cas-frontend/src/components/EditProfileModal.js"
    click LoginPage "https://github.com/vatsl808/appointix/blob/main/cas-frontend/src/pages/LoginPage.js"
    click RegisterPage "https://github.com/vatsl808/appointix/blob/main/cas-frontend/src/pages/RegisterPage.js"
    click AccessDeniedPage "https://github.com/vatsl808/appointix/blob/main/cas-frontend/src/pages/AccessDeniedPage.js"
    click BookAppointmentPage "https://github.com/vatsl808/appointix/blob/main/cas-frontend/src/pages/BookAppointmentPage.js"
    click DoctorListPage "https://github.com/vatsl808/appointix/blob/main/cas-frontend/src/pages/DoctorListPage.js"
    click DoctorProfilePage "https://github.com/vatsl808/appointix/blob/main/cas-frontend/src/pages/DoctorProfilePage.js"
    click DoctorDashboard "https://github.com/vatsl808/appointix/blob/main/cas-frontend/src/pages/DoctorDashboard.js"
    click PatientDashboard "https://github.com/vatsl808/appointix/blob/main/cas-frontend/src/pages/PatientDashboard.js"
    click Utils "https://github.com/vatsl808/appointix/blob/main/cas-frontend/src/utils/availabilityUtils.js"
    click Public "https://github.com/vatsl808/appointix/blob/main/cas-frontend/public/index.html"
    click Public "https://github.com/vatsl808/appointix/blob/main/cas-frontend/public/manifest.json"
    click Public "https://github.com/vatsl808/appointix/blob/main/cas-frontend/public/robots.txt"
    click APIServer "https://github.com/vatsl808/appointix/blob/main/cas-backend/server.py"
    click Database "https://github.com/vatsl808/appointix/blob/main/cas-backend/appointix.db"
    click Storage "https://github.com/vatsl808/appointix/tree/main/cas-backend/uploads/profile_pics"
    click Venv "https://github.com/vatsl808/appointix/tree/main/cas-backend/venv"
    click Readme "https://github.com/vatsl808/appointix/blob/main/README.md"

    classDef frontend fill:#D0E8FF,stroke:#0366d6,stroke-width:1px
    classDef backend fill:#E0F8E0,stroke:#28a745,stroke-width:1px
    classDef db fill:#FFE4B2,stroke:#FF8C00,stroke-width:1px
    classDef storage fill:#EEEEEE,stroke:#666666,stroke-width:1px
    classDef external fill:#F0F0F0,stroke:#999999,stroke-width:1px,stroke-dasharray: 2 2
```
