# dhruvpuri-goswami/quickx architecture

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

- Interactive diagram: https://gitdiagram.com/dhruvpuri-goswami/quickx
- Repository: https://github.com/dhruvpuri-goswami/quickx

## Overview

##### Project Type and Purpose
- Project Type: Full-stack web application
- Purpose: An AI-powered Q&A platform (QuickX) that serves a static AngularJS front-end and a Node.js back-end, which calls the Gemini 3.0 API to retrieve AI-generated answers.

##### File Structure Analysis
- Top-Level Files
– Dockerfile & docker-compose.yml: containerization and multi-service orchestration
– package.json / package-lock.json: Node.js dependencies and scripts
– server.js: Express (or similar) server entry point
- Directories
– public/: static assets for the AngularJS front-end
- index.html, login.html, register.html, dashboard.html, temp.html
– node_modules/: installed Node.js libraries
- No explicit “src/” folder; server.js and public/ form backend and frontend codebases.

##### README Insights
- Front-end: AngularJS (single-page app with multiple HTML entry points)
- Back-end: Node.js server handling API endpoints
- External Service: Gemini 3.0 API for AI inference

##### Main Components
a. Front-End Client
– Browser (Chrome, Firefox, etc.) hosting AngularJS static assets
– AngularJS routing between login, register, dashboard, index pages
b. Back-End API Server
– Node.js/Express application (server.js)
– REST or WebSocket endpoints for authentication and question submission
c. AI Inference Service
– Gemini 3.0 API (external cloud service)
d. Containerization Layer
– Docker container for the Node.js server + static assets
– (Optional) separate containers or services in docker-compose
– Load balancer / reverse proxy (e.g., Nginx)
– Persisted sessions store or in-memory cache (if used)

##### Relationships and Interactions
1. User opens a browser → requests static HTML/CSS/JS from the Node.js container
2. AngularJS app runs in the browser and calls back-end endpoints (e.g., POST /ask, POST /login)
3. Node.js server handles authentication and forwards user questions to Gemini 3.0 API
4. Gemini API returns AI-generated answer → Node.js processes and returns JSON payload → AngularJS updates the view
5. docker-compose orchestrates service startup (e.g., Node.js service + optional database or cache)

##### Architectural Patterns and Design Principles
- Separation of Concerns: Static front-end vs. dynamic back-end
- Layered Architecture: Presentation (AngularJS) → Application (Node.js) → External Service (Gemini API)
- Containerization: Encapsulation of runtime and dependencies via Docker
- API-First: Clear RESTful endpoints for front-end to back-end communication

##### Technologies and Frameworks to Annotate
- AngularJS (view layer in front-end)
- Node.js / Express (server)
- Gemini 3.0 API (AI inference)
- Docker & docker-compose (deployment)
- NPM (dependency management)

##### Final Advice
- Be thorough: capture every moving part from Docker to browser.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Front-End Layer
    subgraph "Browser - Front-End Layer"
        direction TB
        FrontEndClient["Browser & AngularJS"]:::front
        LoginPage["login.html"]:::front
        RegisterPage["register.html"]:::front
        DashboardPage["dashboard.html"]:::front
        HomePage["index.html"]:::front
        TempPage["temp.html"]:::front
    end

    %% Containerization & Back-End
    subgraph "Docker Container"
        direction TB
        NodeServer["Node.js/Express API Server\n(port 3000)"]:::backend
        Npm["package.json"]:::config
        LockFile["package-lock.json"]:::config
        DockerFile["Dockerfile"]:::config
    end

    %% Orchestration
    Compose["docker-compose.yml"]:::config

    %% External AI Service
    Gemini["Gemini 3.0 API"]:::external

    %% Connections
    FrontEndClient -->|"GET HTML/CSS/JS"| NodeServer
    FrontEndClient -->|"HTTP POST /login, /register, /ask"| NodeServer
    NodeServer -->|"calls AI inference"| Gemini
    Gemini -->|"AI response JSON"| NodeServer
    NodeServer -->|"JSON payload"| FrontEndClient
    Compose -->|"orchestrates container"| NodeServer

    %% Click Events
    click FrontEndClient "https://github.com/dhruvpuri-goswami/quickx/tree/main/public/"
    click LoginPage "https://github.com/dhruvpuri-goswami/quickx/blob/main/public/login.html"
    click RegisterPage "https://github.com/dhruvpuri-goswami/quickx/blob/main/public/register.html"
    click DashboardPage "https://github.com/dhruvpuri-goswami/quickx/blob/main/public/dashboard.html"
    click HomePage "https://github.com/dhruvpuri-goswami/quickx/blob/main/public/index.html"
    click TempPage "https://github.com/dhruvpuri-goswami/quickx/blob/main/public/temp.html"
    click NodeServer "https://github.com/dhruvpuri-goswami/quickx/blob/main/server.js"
    click Npm "https://github.com/dhruvpuri-goswami/quickx/blob/main/package.json"
    click LockFile "https://github.com/dhruvpuri-goswami/quickx/blob/main/package-lock.json"
    click DockerFile "https://github.com/dhruvpuri-goswami/quickx/tree/main/Dockerfile"
    click Compose "https://github.com/dhruvpuri-goswami/quickx/blob/main/docker-compose.yml"

    %% Styles
    classDef front fill:#ADD8E6,stroke:#333,stroke-width:1px;
    classDef backend fill:#90EE90,stroke:#333,stroke-width:1px;
    classDef external fill:#FFA500,stroke:#333,stroke-width:1px;
    classDef config fill:#F0E68C,stroke:#333,stroke-width:1px;
```
