# manikanteshwarareddy/schedio architecture

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

- Interactive diagram: https://gitdiagram.com/manikanteshwarareddy/schedio
- Repository: https://github.com/manikanteshwarareddy/schedio

## Overview

##### Project Type and Purpose
- This is a full-stack web application (“Schedio”) that connects three user types—students/employees (T1), colleges/organizations (T2), and recruiters (T3)—to share, search, and analyze project portfolios.
- Frontend: React SPA served from the `frontend` folder (built and served under `backend/build` or deployed separately on Vercel).
- Backend: Express.js REST API in the `backend` folder.
- Database: MongoDB for storing users, projects, comments, likes, bookmarks, analytics.
- External Services:
- RapidAPI Plagiarism Checker API
- Google Gemini API (code explanation)
- SMTP/email provider for authentication flows

##### Main Components
a. Client Layer (React SPA)
- Entry point: `frontend/src/index.js` → `App.jsx`
- Components directory: dozens of UI modules (e.g., `SignIn.jsx`, `ProjectCard.jsx`, `FileExplorer.jsx`)
- Settings: `frontend/src/settings/axiosInstance.js` configures Axios with base URL and interceptors.
- Build artifacts: `backend/build` (static HTML, JS, CSS) when frontend is packaged.

b. API Layer (Express.js)
- `backend/index.js`: Express server setup, middleware, session and JWT configuration.
- `backend/route.js`: Defines REST endpoints (Auth, Project Upload/Download, Search, Analytics).
- `backend/controllers/*.js`: Controllers implement business logic (login, main page data, file upload).
- Settings: `backend/settings/env.js` reads environment variables; `axiosInstance.js` may be used for internal HTTP calls (e.g., to external APIs).
- `backend/vercel.json`: Vercel deployment configuration.

c. Persistence Layer
- MongoDB collections: Users (T1/T2/T3 roles), Projects with metadata, Comments/Likes, Bookmarks, Analytics.
- File storage on server filesystem (`uploads` or similar) or a mounted cloud bucket (if extended).

d. External Integrations
- RapidAPI Plagiarism Checker invoked during upload or project save.
- Google Gemini for code explanations.
- SMTP/email service (using `EMAIL` and `PASSWORD` from env) for signup, password reset.

##### Relationships and Data Flows
- User → Browser → React SPA
- UI dispatches HTTP requests via Axios to Express API
- React SPA → Express API (REST endpoints)
- Authentication (login/signup/forgot password)
- Project CRUD (upload videos, code, images)
- Search/filter (language, institute, domain)
- Likes/comments/bookmarks
- Profile PDF download
- Express API → MongoDB
- Read/write user profiles, projects, analytics
- Express API → External Services
- Plagiarism check: HTTP request to RapidAPI endpoint
- Code explanation: request to Gemini API
- Express API → File Storage
- Save uploaded files, serve static assets

##### Architectural Patterns and Design Principles
- Client-server separation: clear boundary between React SPA and Express API
- MVC-inspired structure on backend: route definitions + controllers + settings
- RESTful API design for resources (Users, Projects, Comments, Bookmarks)
- Environment-driven configuration (env vars in `.env` files)
- Single-page app with component-based design on frontend

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Client Layer
    subgraph "Client Layer (React SPA)"
        direction TB
        Index["index.js"]:::frontend
        App["App.jsx"]:::frontend
        AxiosCfg["axiosInstance.js"]:::frontend
        subgraph "UI Components"
            direction TB
            SignIn["SignIn.jsx"]:::frontend
            ProjectCard["ProjectCard.jsx"]:::frontend
            FileExplorer["fileExplorer.jsx"]:::frontend
        end
        PublicHTML["public/index.html"]:::frontend
        Manifest["public/manifest.json"]:::frontend
    end

    %% Build Artifacts
    Build["Build Artifacts (backend/build)"]:::frontend

    %% API Layer
    subgraph "API Layer (Express Server)"
        direction TB
        Server["index.js"]:::backend
        Routes["route.js"]:::backend
        subgraph "Controllers"
            direction TB
            LoginCtrl["login.js"]:::backend
            MainPageCtrl["mainpage.js"]:::backend
            UploadCtrl["upload.js"]:::backend
        end
        Env["settings/env.js"]:::backend
        BackendAxios["settings/axiosInstance.js"]:::backend
        VercelCfg["vercel.json"]:::backend
    end

    %% Persistence Layer
    DB["MongoDB"]:::db

    %% File Storage
    FileStorage["File Storage"]:::storage

    %% External Services
    subgraph "External Integrations"
        direction TB
        Plagiarism["RapidAPI Plagiarism Service"]:::external
        Gemini["Google Gemini API"]:::external
        SMTP["SMTP/Email Service"]:::external
    end

    %% Data Flows
    Browser["User Browser"]:::external
    Browser -->|"loads SPA"| Index
    Index -->|"renders"| App
    App -->|"HTTP JSON via Axios"| Server
    AxiosCfg -->|"configures HTTP"| App

    Server -->|"uses routes"| Routes
    Routes -->|"calls controllers"| LoginCtrl
    Routes -->|"calls controllers"| MainPageCtrl
    Routes -->|"calls controllers"| UploadCtrl
    Server -->|"reads env vars"| Env
    Server -->|"internal HTTP"| BackendAxios
    Server -->|"deploy config"| VercelCfg

    Server -->|"CRUD operations"| DB
    Server -->|"store/retrieve files"| FileStorage
    UploadCtrl -->|"upload files"| FileStorage

    Server -->|"HTTP request"| Plagiarism
    Server -->|"HTTP request"| Gemini
    Server -->|"send email"| SMTP

    %% Build step
    App -->|"build output"| Build
    Build -->|"served as static"| Server

    %% Click Events
    click Index "https://github.com/manikanteshwarareddy/schedio/blob/main/frontend/src/index.js"
    click App "https://github.com/manikanteshwarareddy/schedio/blob/main/frontend/src/App.jsx"
    click AxiosCfg "https://github.com/manikanteshwarareddy/schedio/blob/main/frontend/src/settings/axiosInstance.js"
    click SignIn "https://github.com/manikanteshwarareddy/schedio/blob/main/frontend/src/components/SignIn.jsx"
    click ProjectCard "https://github.com/manikanteshwarareddy/schedio/blob/main/frontend/src/components/ProjectCard.jsx"
    click FileExplorer "https://github.com/manikanteshwarareddy/schedio/blob/main/frontend/src/components/fileExplorer.jsx"
    click PublicHTML "https://github.com/manikanteshwarareddy/schedio/blob/main/frontend/public/index.html"
    click Manifest "https://github.com/manikanteshwarareddy/schedio/blob/main/frontend/public/manifest.json"
    click Build "https://github.com/manikanteshwarareddy/schedio/tree/main/backend/build/"
    click Server "https://github.com/manikanteshwarareddy/schedio/blob/main/backend/index.js"
    click Routes "https://github.com/manikanteshwarareddy/schedio/blob/main/backend/route.js"
    click LoginCtrl "https://github.com/manikanteshwarareddy/schedio/blob/main/backend/controllers/login.js"
    click MainPageCtrl "https://github.com/manikanteshwarareddy/schedio/blob/main/backend/controllers/mainpage.js"
    click UploadCtrl "https://github.com/manikanteshwarareddy/schedio/blob/main/backend/controllers/upload.js"
    click Env "https://github.com/manikanteshwarareddy/schedio/blob/main/backend/settings/env.js"
    click BackendAxios "https://github.com/manikanteshwarareddy/schedio/blob/main/backend/settings/axiosInstance.js"
    click VercelCfg "https://github.com/manikanteshwarareddy/schedio/blob/main/backend/vercel.json"

    %% Styles
    classDef frontend fill:#E3F2FD,stroke:#64B5F6,color:#0D47A1
    classDef backend fill:#E8F5E9,stroke:#66BB6A,color:#1B5E20
    classDef db fill:#FFF3E0,stroke:#FFA726,color:#E65100
    classDef external fill:#ECEFF1,stroke:#90A4AE,color:#263238
    classDef storage fill:#EFEBE9,stroke:#A1887F,color:#3E2723
```
