# akhilreddy6g/workspace architecture

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

- Interactive diagram: https://gitdiagram.com/akhilreddy6g/workspace
- Repository: https://github.com/akhilreddy6g/workspace

## Overview

##### Main Components
- Frontend (Client): Located in the “client” folder, built using React and Vite. It includes a rich set of UI components organized into various folders for features such as “Current Schedule,” “Daily Activities,” “Quick Session,” “Streak and Progress,” “Missed Activities,” “Plan Ahead,” and “Set Your Day.”
- Backend (Server): Found under the “server” directory. This is a Node.js application (most likely using Express) that handles API requests from the frontend.
- Database: The presence of “queries.sql” and instructions to install pgadmin indicate that a PostgreSQL database is used to store and manage application data.
- Docker Components: Dockerfiles exist in both client and server, and a docker-compose file is present at the root. They indicate containerized deployment for an isolated, repeatable environment.

##### Relationships and Interactions
- The Client interacts with the Server via RESTful API calls. The client components trigger operations such as adding, updating, or deleting activities, which correspond to business logic handled by the server.
- The Server acts as an intermediary between the client and the PostgreSQL database, processing incoming client requests, performing validations, and executing SQL queries (as provided by “queries.sql”) to persist or retrieve data.
- Docker management spans both Client and Server, meaning that the deployment and possibly orchestration or container networking are part of the architecture.

##### Architectural Patterns and Key Technologies
- Separation of Concerns: The clear division between frontend (presentation layer) and backend (business logic and data access) ensures modularity.
- MVC-like (or similar component-based) pattern in the client: With React components neatly organized to represent different screens and functionalities (Header, Sidebar, etc.).
- RESTful API Design: The server is set up to handle API endpoints for CRUD operations based on user activities.
- Containerization: Docker and docker-compose indicate that the deployment leverages containers for development, testing, and production purposes.
- Technologies: React, Vite for the client; Node.js (and likely Express) for the server; PostgreSQL as the database; Docker for containerization; and pgadmin for DB management.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Full-Stack Web Application"
        %% Docker containerization
        subgraph "Containerization (Docker)"
            DockerCompose["Docker Compose Configuration"]:::docker
            ClientDocker["Client Dockerfile"]:::docker
            ServerDocker["Server Dockerfile"]:::docker
        end

        %% Client Side
        subgraph "Client Side"
            Client["Client – React (Vite)"]:::frontend
            Sidebar["Sidebar: Task Management & Scheduling"]:::frontend
        end

        %% Server Side
        subgraph "Server Side"
            Server["Server – Node.js (Express)"]:::backend
        end

        %% Database
        Database["PostgreSQL Database"]:::db
    end

    %% Primary interactions
    Client -->|"APIcalls"| Server
    Sidebar --- Client
    Server -->|"SQLQueries"| Database

    %% Docker relationships
    Client --- ClientDocker
    Server --- ServerDocker
    DockerCompose --- ClientDocker
    DockerCompose --- ServerDocker

    %% Styles
    classDef frontend fill:#ADD8E6,stroke:#000,stroke-width:2px;
    classDef backend fill:#90EE90,stroke:#000,stroke-width:2px;
    classDef db fill:#FFD700,stroke:#000,stroke-width:2px;
    classDef docker fill:#FFA07A,stroke:#000,stroke-width:2px;

    %% Click Events
    click Client "https://github.com/akhilreddy6g/workspace/tree/main/client/"
    click Sidebar "https://github.com/akhilreddy6g/workspace/tree/main/client/src/components/Sidebar"
    click Server "https://github.com/akhilreddy6g/workspace/tree/main/server/"
    click Database "https://github.com/akhilreddy6g/workspace/blob/main/queries.sql"
    click DockerCompose "https://github.com/akhilreddy6g/workspace/blob/main/docker-compose.yml"
    click ClientDocker "https://github.com/akhilreddy6g/workspace/tree/main/client/Dockerfile"
    click ServerDocker "https://github.com/akhilreddy6g/workspace/tree/main/server/Dockerfile"
```
