# rishiranjan-01/timecamp-clone architecture

> Architecture diagram of the GitHub repository rishiranjan-01/timecamp-clone, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-19). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rishiranjan-01/timecamp-clone
- Repository: https://github.com/rishiranjan-01/timecamp-clone

## Overview

This TimeCamp clone combines a React time/project management app with an Express/MongoDB backend and subscription, payment-form, and invoice screens. The main user path is landing or sign-up/login, then protected workspace routes for projects, tasks, timesheets, dashboard, tags, and users; a separate billing path collects subscription and billing details, simulates payment, and displays an invoice. The backend provides user, project, task, and invoice APIs. Several frontend screens and the invoice controller are unsampled, so their internal links are limited to documented routing or indexed references.

Main entry points: [`my-app/src/pages/MainRoutes.jsx`](https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/pages/MainRoutes.jsx) (App Routes), [`backend/index.js`](https://github.com/rishiranjan-01/timecamp-clone/blob/main/backend/index.js) (Express Server), [`my-app/src/pages/Project.jsx`](https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/pages/Project.jsx) (Project Views), [`my-app/src/components/ProjectContainer.jsx`](https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/components/ProjectContainer.jsx) (Project Container)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and Routing"]
  node_mainroutes["App Routes<br/>[MainRoutes.jsx]"]
  node_authscreens["Login and Signup"]
  node_protected["Protected Route<br/>[ProtectedRoute.jsx]"]
end

subgraph group_workspace["Time Workspace"]
  node_home["Workspace Shell<br/>[HomePage.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_timesheet["Timesheet<br/>[TimeSheet.jsx]"]
  node_projectpage["Project Views<br/>[Project.jsx]"]
  node_projectforms["Project Forms<br/>[AddProject.jsx]"]
  node_projectcontainer["Project Container"]
  node_taskforms["Task Forms<br/>[Addtask.jsx]"]
  node_tags["Tags<br/>[Tags.jsx]"]
  node_userpage["User Details<br/>[User.jsx]"]
  node_projectactions["Project Actions<br/>[action.js]"]
  node_taskactions["Task Actions<br/>[action.js]"]
end

subgraph group_billing["Billing and Invoices"]
  node_billing["Subscription<br/>[Billing.jsx]"]
  node_billingaddress["Billing Address<br/>[BillingAddress.jsx]"]
  node_invoiceinfo["Invoice Information"]
  node_payment["Payment Form<br/>[PaymentCard.jsx]"]
  node_invoice["Invoice Display<br/>[ShowInvoice.jsx]"]
  node_billingtabs["Billing Tabs<br/>[Tabs.jsx]"]
end

subgraph group_api["Backend API"]
  node_userapi["User API<br/>[user.controller.js]"]
  node_projectapi["Project API"]
  node_taskapi["Task API<br/>[task.controller.js]"]
  node_invoiceapi["Invoice API"]
  node_server["Express Server<br/>[index.js]"]
  node_googleauth["Google OAuth<br/>[googleauth.js]"]
end

subgraph group_persistence["Data Persistence"]
  node_dbconfig["Database Connection<br/>[db.js]"]
  node_usermodel[("User Records<br/>[User.model.js]")]
  node_projectmodel[("Project Records<br/>[Project.model.js]")]
  node_taskmodel[("Task Records<br/>[Task.model.js]")]
  node_invoicemodel[("Invoice Records<br/>[invoice.model.js]")]
end

node_visitor(("Visitor"))
node_mongodb[("MongoDB")]

node_visitor -->|"opens"| node_mainroutes
node_mainroutes -->|"routes to"| node_authscreens
node_mainroutes -->|"guards workspace"| node_protected
node_mainroutes -->|"routes to"| node_home
node_mainroutes -->|"routes to"| node_dashboard
node_mainroutes -->|"routes to"| node_timesheet
node_mainroutes -->|"routes to"| node_projectpage
node_mainroutes -->|"routes to"| node_projectforms
node_mainroutes -->|"routes to"| node_taskforms
node_mainroutes -->|"routes to"| node_tags
node_mainroutes -->|"routes to"| node_userpage
node_mainroutes -->|"routes to"| node_billing
node_mainroutes -->|"routes to"| node_billingaddress
node_mainroutes -->|"routes to"| node_invoiceinfo
node_mainroutes -->|"routes to"| node_payment
node_mainroutes -->|"routes to"| node_invoice
node_projectpage -->|"renders"| node_projectcontainer
node_projectpage -->|"routes to"| node_projectforms
node_projectcontainer -->|"dispatches"| node_projectactions
node_projectcontainer -->|"dispatches"| node_taskactions
node_projectforms -->|"dispatches"| node_projectactions
node_taskforms -->|"dispatches"| node_taskactions
node_billing -->|"renders"| node_billingtabs
node_billingaddress -->|"renders"| node_billingtabs
node_billingaddress -->|"uses country selector"| node_invoiceinfo
node_payment -->|"navigates to"| node_invoice
node_mainroutes -.->|"calls API"| node_server
node_server -->|"mounts route"| node_userapi
node_server -->|"mounts route"| node_projectapi
node_server -->|"mounts route"| node_taskapi
node_server -->|"mounts route"| node_invoiceapi
node_server -->|"configures"| node_googleauth
node_server -->|"loads connection"| node_dbconfig
node_userapi -->|"queries"| node_usermodel
node_projectapi -->|"queries"| node_projectmodel
node_taskapi -->|"queries"| node_taskmodel
node_invoiceapi -->|"uses model"| node_invoicemodel
node_dbconfig -.->|"connects"| node_mongodb

click node_mainroutes "https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/pages/MainRoutes.jsx"
click node_authscreens "https://github.com/rishiranjan-01/timecamp-clone/tree/main/my-app/src/components"
click node_protected "https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/components/ProtectedRoute.jsx"
click node_home "https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/pages/HomePage.jsx"
click node_dashboard "https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/pages/Dashboard.jsx"
click node_timesheet "https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/pages/TimeSheet.jsx"
click node_projectpage "https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/pages/Project.jsx"
click node_projectforms "https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/pages/AddProject.jsx"
click node_projectcontainer "https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/components/ProjectContainer.jsx"
click node_taskforms "https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/pages/Addtask.jsx"
click node_tags "https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/pages/Tags.jsx"
click node_userpage "https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/pages/User.jsx"
click node_projectactions "https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/store/project/action.js"
click node_taskactions "https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/store/task/action.js"
click node_billing "https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/Sandeep/billing/Billing.jsx"
click node_billingaddress "https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/Sandeep/billingaddress/BillingAddress.jsx"
click node_invoiceinfo "https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/Sandeep/invoice/InvoiceInformation.jsx"
click node_payment "https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/Sandeep/payment/PaymentCard.jsx"
click node_invoice "https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/Sandeep/invoice/ShowInvoice.jsx"
click node_billingtabs "https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/Sandeep/tabs/Tabs.jsx"
click node_userapi "https://github.com/rishiranjan-01/timecamp-clone/blob/main/backend/controllers/user.controller.js"
click node_projectapi "https://github.com/rishiranjan-01/timecamp-clone/blob/main/backend/controllers/project.controller.js"
click node_taskapi "https://github.com/rishiranjan-01/timecamp-clone/blob/main/backend/controllers/task.controller.js"
click node_invoiceapi "https://github.com/rishiranjan-01/timecamp-clone/blob/main/backend/controllers/invoice.controller.js"
click node_server "https://github.com/rishiranjan-01/timecamp-clone/blob/main/backend/index.js"
click node_googleauth "https://github.com/rishiranjan-01/timecamp-clone/blob/main/backend/config/googleauth.js"
click node_dbconfig "https://github.com/rishiranjan-01/timecamp-clone/blob/main/backend/config/db.js"
click node_usermodel "https://github.com/rishiranjan-01/timecamp-clone/blob/main/backend/models/User.model.js"
click node_projectmodel "https://github.com/rishiranjan-01/timecamp-clone/blob/main/backend/models/Project.model.js"
click node_taskmodel "https://github.com/rishiranjan-01/timecamp-clone/blob/main/backend/models/Task.model.js"
click node_invoicemodel "https://github.com/rishiranjan-01/timecamp-clone/blob/main/backend/models/invoice.model.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mainroutes,node_authscreens,node_protected toneBlue
class node_home,node_dashboard,node_timesheet,node_projectpage,node_projectforms,node_projectcontainer,node_taskforms,node_tags,node_userpage,node_projectactions,node_taskactions,node_mongodb toneAmber
class node_billing,node_billingaddress,node_invoiceinfo,node_payment,node_invoice,node_billingtabs toneMint
class node_userapi,node_projectapi,node_taskapi,node_invoiceapi,node_server,node_googleauth toneRose
class node_dbconfig,node_usermodel,node_projectmodel,node_taskmodel,node_invoicemodel,node_visitor toneIndigo
```

## Components

### Access and Routing

- [App Routes](https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/pages/MainRoutes.jsx): `my-app/src/pages/MainRoutes.jsx`
- [Login and Signup](https://github.com/rishiranjan-01/timecamp-clone/tree/main/my-app/src/components): `my-app/src/components`
- [Protected Route](https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/components/ProtectedRoute.jsx): `my-app/src/components/ProtectedRoute.jsx`

### Time Workspace

- [Workspace Shell](https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/pages/HomePage.jsx): `my-app/src/pages/HomePage.jsx`
- [Dashboard](https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/pages/Dashboard.jsx): `my-app/src/pages/Dashboard.jsx`
- [Timesheet](https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/pages/TimeSheet.jsx): `my-app/src/pages/TimeSheet.jsx`
- [Project Views](https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/pages/Project.jsx): `my-app/src/pages/Project.jsx`
- [Project Forms](https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/pages/AddProject.jsx): `my-app/src/pages/AddProject.jsx`
- [Project Container](https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/components/ProjectContainer.jsx): `my-app/src/components/ProjectContainer.jsx`
- [Task Forms](https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/pages/Addtask.jsx): `my-app/src/pages/Addtask.jsx`
- [Tags](https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/pages/Tags.jsx): `my-app/src/pages/Tags.jsx`
- [User Details](https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/pages/User.jsx): `my-app/src/pages/User.jsx`
- [Project Actions](https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/store/project/action.js): `my-app/src/store/project/action.js`
- [Task Actions](https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/store/task/action.js): `my-app/src/store/task/action.js`

### Billing and Invoices

- [Subscription](https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/Sandeep/billing/Billing.jsx): `my-app/src/Sandeep/billing/Billing.jsx`
- [Billing Address](https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/Sandeep/billingaddress/BillingAddress.jsx): `my-app/src/Sandeep/billingaddress/BillingAddress.jsx`
- [Invoice Information](https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/Sandeep/invoice/InvoiceInformation.jsx): `my-app/src/Sandeep/invoice/InvoiceInformation.jsx`
- [Payment Form](https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/Sandeep/payment/PaymentCard.jsx): `my-app/src/Sandeep/payment/PaymentCard.jsx`
- [Invoice Display](https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/Sandeep/invoice/ShowInvoice.jsx): `my-app/src/Sandeep/invoice/ShowInvoice.jsx`
- [Billing Tabs](https://github.com/rishiranjan-01/timecamp-clone/blob/main/my-app/src/Sandeep/tabs/Tabs.jsx): `my-app/src/Sandeep/tabs/Tabs.jsx`

### Backend API

- [User API](https://github.com/rishiranjan-01/timecamp-clone/blob/main/backend/controllers/user.controller.js): `backend/controllers/user.controller.js`
- [Project API](https://github.com/rishiranjan-01/timecamp-clone/blob/main/backend/controllers/project.controller.js): `backend/controllers/project.controller.js`
- [Task API](https://github.com/rishiranjan-01/timecamp-clone/blob/main/backend/controllers/task.controller.js): `backend/controllers/task.controller.js`
- [Invoice API](https://github.com/rishiranjan-01/timecamp-clone/blob/main/backend/controllers/invoice.controller.js): `backend/controllers/invoice.controller.js`
- [Express Server](https://github.com/rishiranjan-01/timecamp-clone/blob/main/backend/index.js): `backend/index.js`
- [Google OAuth](https://github.com/rishiranjan-01/timecamp-clone/blob/main/backend/config/googleauth.js): `backend/config/googleauth.js`

### Data Persistence

- [Database Connection](https://github.com/rishiranjan-01/timecamp-clone/blob/main/backend/config/db.js): `backend/config/db.js`
- [User Records](https://github.com/rishiranjan-01/timecamp-clone/blob/main/backend/models/User.model.js): `backend/models/User.model.js`
- [Project Records](https://github.com/rishiranjan-01/timecamp-clone/blob/main/backend/models/Project.model.js): `backend/models/Project.model.js`
- [Task Records](https://github.com/rishiranjan-01/timecamp-clone/blob/main/backend/models/Task.model.js): `backend/models/Task.model.js`
- [Invoice Records](https://github.com/rishiranjan-01/timecamp-clone/blob/main/backend/models/invoice.model.js): `backend/models/invoice.model.js`

### Other components

- **Visitor**
- **MongoDB**

## Connections

- Visitor → App Routes: opens (evidence: `README.md`)
- App Routes → Login and Signup: routes to (evidence: `my-app/src/pages/MainRoutes.jsx`)
- App Routes → Protected Route: guards workspace (evidence: `my-app/src/pages/MainRoutes.jsx`)
- App Routes → Workspace Shell: routes to (evidence: `my-app/src/pages/MainRoutes.jsx`)
- App Routes → Dashboard: routes to (evidence: `my-app/src/pages/MainRoutes.jsx`)
- App Routes → Timesheet: routes to (evidence: `my-app/src/pages/MainRoutes.jsx`)
- App Routes → Project Views: routes to (evidence: `my-app/src/pages/MainRoutes.jsx`)
- App Routes → Project Forms: routes to (evidence: `my-app/src/pages/MainRoutes.jsx`)
- App Routes → Task Forms: routes to (evidence: `my-app/src/pages/MainRoutes.jsx`)
- App Routes → Tags: routes to (evidence: `my-app/src/pages/MainRoutes.jsx`)
- App Routes → User Details: routes to (evidence: `my-app/src/pages/MainRoutes.jsx`)
- App Routes → Subscription: routes to (evidence: `my-app/src/pages/MainRoutes.jsx`)
- App Routes → Billing Address: routes to (evidence: `my-app/src/pages/MainRoutes.jsx`)
- App Routes → Invoice Information: routes to (evidence: `my-app/src/pages/MainRoutes.jsx`)
- App Routes → Payment Form: routes to (evidence: `my-app/src/pages/MainRoutes.jsx`)
- App Routes → Invoice Display: routes to (evidence: `my-app/src/pages/MainRoutes.jsx`)
- Project Views → Project Container: renders (evidence: `my-app/src/pages/Project.jsx`)
- Project Views → Project Forms: routes to (evidence: `my-app/src/pages/Project.jsx`)
- Project Container → Project Actions: dispatches (evidence: `my-app/src/components/ProjectContainer.jsx`)
- Project Container → Task Actions: dispatches (evidence: `my-app/src/components/ProjectContainer.jsx`)
- Project Forms → Project Actions: dispatches (evidence: `my-app/src/pages/AddProject.jsx`)
- Task Forms → Task Actions: dispatches (evidence: `my-app/src/pages/Addtask.jsx`)
- Subscription → Billing Tabs: renders (evidence: `my-app/src/Sandeep/billing/Billing.jsx`)
- Billing Address → Billing Tabs: renders (evidence: `my-app/src/Sandeep/billingaddress/BillingAddress.jsx`)
- Billing Address → Invoice Information: uses country selector (evidence: `my-app/src/Sandeep/billingaddress/BillingAddress.jsx`)
- Payment Form → Invoice Display: navigates to (evidence: `my-app/src/Sandeep/payment/PaymentCard.jsx`)
- App Routes → Express Server: calls API
- Express Server → User API: mounts route (evidence: `backend/index.js`)
- Express Server → Project API: mounts route (evidence: `backend/index.js`)
- Express Server → Task API: mounts route (evidence: `backend/index.js`)
- Express Server → Invoice API: mounts route (evidence: `backend/index.js`)
- Express Server → Google OAuth: configures (evidence: `backend/index.js`)
- Express Server → Database Connection: loads connection (evidence: `backend/index.js`)
- User API → User Records: queries (evidence: `backend/controllers/user.controller.js`)
- Project API → Project Records: queries (evidence: `backend/controllers/project.controller.js`)
- Task API → Task Records: queries (evidence: `backend/controllers/task.controller.js`)
- Invoice API → Invoice Records: uses model (evidence: `backend/controllers/invoice.controller.js`)
- Database Connection → MongoDB: connects
