# karthikrkrajendran/lcm-go architecture

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

- Interactive diagram: https://gitdiagram.com/karthikrkrajendran/lcm-go
- Repository: https://github.com/karthikrkrajendran/lcm-go

## Overview

LCM Go is a mobile-first college bus attendance management application. Staff sign in and record bus attendance; administrators manage users, buses, and students, review or correct attendance, and use reporting/export features. The React interface sends API requests to an Express server, which enforces authentication and role restrictions and persists application state in SQLite. The README documents CSV templates and server-side invitation/reset email. The frontend is a large single source file, so several capabilities share its path; unsampled implementation details and links are omitted where evidence is limited.

Main entry points: [`src/main.jsx`](https://github.com/karthikrkrajendran/lcm-go/blob/main/src/main.jsx) (React application), [`server/index.js`](https://github.com/karthikrkrajendran/lcm-go/blob/main/server/index.js) (Express API), [`server/email.js`](https://github.com/karthikrkrajendran/lcm-go/blob/main/server/email.js) (Invitation and reset mail)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Mobile interface"]
  node_ui["React application<br/>[main.jsx]"]
  node_authentication["Sign-in and activation<br/>[main.jsx]"]
end

subgraph group_operations["Attendance operations"]
  node_attendance["Attendance capture<br/>[main.jsx]"]
  node_corrections["Attendance corrections<br/>[main.jsx]"]
  node_reports["Reports and export<br/>[main.jsx]"]
end

subgraph group_admin["Administration"]
  node_studentadmin["Student management<br/>[main.jsx]"]
  node_staffadmin["Staff management<br/>[main.jsx]"]
  node_busadmin["Bus and assignment management<br/>[main.jsx]"]
  node_csv["CSV templates<br/>[main.jsx]"]
end

subgraph group_platform["API and persistence"]
  node_api["Express API<br/>[index.js]"]
  node_database[("SQLite database<br/>[index.js]")]
  node_email["Invitation and reset mail<br/>[email.js]"]
end

node_user(("College staff"))
node_smtp(("SMTP service"))

node_user -->|"uses"| node_ui
node_ui -->|"renders"| node_authentication
node_authentication -->|"signs in"| node_api
node_ui -->|"renders"| node_attendance
node_attendance -.->|"submits attendance"| node_api
node_ui -.->|"offers corrections"| node_corrections
node_corrections -.->|"requests correction"| node_api
node_ui -.->|"renders"| node_reports
node_ui -->|"updates students"| node_studentadmin
node_studentadmin -->|"sends update"| node_api
node_ui -.->|"renders"| node_staffadmin
node_staffadmin -.->|"manages staff"| node_api
node_ui -.->|"renders"| node_busadmin
node_busadmin -.->|"manages buses"| node_api
node_ui -.->|"offers templates"| node_csv
node_api -->|"reads and writes"| node_database
node_api -.->|"sends account mail"| node_email
node_email -->|"sends messages"| node_smtp

click node_ui "https://github.com/karthikrkrajendran/lcm-go/blob/main/src/main.jsx"
click node_attendance "https://github.com/karthikrkrajendran/lcm-go/blob/main/src/main.jsx"
click node_corrections "https://github.com/karthikrkrajendran/lcm-go/blob/main/src/main.jsx"
click node_reports "https://github.com/karthikrkrajendran/lcm-go/blob/main/src/main.jsx"
click node_authentication "https://github.com/karthikrkrajendran/lcm-go/blob/main/src/main.jsx"
click node_studentadmin "https://github.com/karthikrkrajendran/lcm-go/blob/main/src/main.jsx"
click node_staffadmin "https://github.com/karthikrkrajendran/lcm-go/blob/main/src/main.jsx"
click node_busadmin "https://github.com/karthikrkrajendran/lcm-go/blob/main/src/main.jsx"
click node_csv "https://github.com/karthikrkrajendran/lcm-go/blob/main/src/main.jsx"
click node_api "https://github.com/karthikrkrajendran/lcm-go/blob/main/server/index.js"
click node_database "https://github.com/karthikrkrajendran/lcm-go/blob/main/server/index.js"
click node_email "https://github.com/karthikrkrajendran/lcm-go/blob/main/server/email.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_ui,node_authentication toneBlue
class node_attendance,node_corrections,node_reports toneAmber
class node_studentadmin,node_staffadmin,node_busadmin,node_csv toneMint
class node_api,node_database,node_email toneRose
class node_user,node_smtp toneIndigo
```

## Components

### Mobile interface

- [React application](https://github.com/karthikrkrajendran/lcm-go/blob/main/src/main.jsx): `src/main.jsx`
- [Sign-in and activation](https://github.com/karthikrkrajendran/lcm-go/blob/main/src/main.jsx): `src/main.jsx`

### Attendance operations

- [Attendance capture](https://github.com/karthikrkrajendran/lcm-go/blob/main/src/main.jsx): `src/main.jsx`
- [Attendance corrections](https://github.com/karthikrkrajendran/lcm-go/blob/main/src/main.jsx): `src/main.jsx`
- [Reports and export](https://github.com/karthikrkrajendran/lcm-go/blob/main/src/main.jsx): `src/main.jsx`

### Administration

- [Student management](https://github.com/karthikrkrajendran/lcm-go/blob/main/src/main.jsx): `src/main.jsx`
- [Staff management](https://github.com/karthikrkrajendran/lcm-go/blob/main/src/main.jsx): `src/main.jsx`
- [Bus and assignment management](https://github.com/karthikrkrajendran/lcm-go/blob/main/src/main.jsx): `src/main.jsx`
- [CSV templates](https://github.com/karthikrkrajendran/lcm-go/blob/main/src/main.jsx): `src/main.jsx`

### API and persistence

- [Express API](https://github.com/karthikrkrajendran/lcm-go/blob/main/server/index.js): `server/index.js`
- [SQLite database](https://github.com/karthikrkrajendran/lcm-go/blob/main/server/index.js): `server/index.js`
- [Invitation and reset mail](https://github.com/karthikrkrajendran/lcm-go/blob/main/server/email.js): `server/email.js`

### Other components

- **College staff**
- **SMTP service**

## Connections

- College staff → React application: uses (evidence: `README.md`)
- React application → Sign-in and activation: renders (evidence: `src/main.jsx`)
- Sign-in and activation → Express API: signs in (evidence: `src/main.jsx`)
- React application → Attendance capture: renders (evidence: `README.md`)
- Attendance capture → Express API: submits attendance
- React application → Attendance corrections: offers corrections (evidence: `src/main.jsx`)
- Attendance corrections → Express API: requests correction
- React application → Reports and export: renders (evidence: `src/main.jsx`)
- React application → Student management: updates students (evidence: `src/main.jsx`)
- Student management → Express API: sends update (evidence: `src/main.jsx`)
- React application → Staff management: renders (evidence: `src/main.jsx`)
- Staff management → Express API: manages staff
- React application → Bus and assignment management: renders (evidence: `src/main.jsx`)
- Bus and assignment management → Express API: manages buses
- React application → CSV templates: offers templates (evidence: `src/main.jsx`)
- Express API → SQLite database: reads and writes (evidence: `server/index.js`)
- Express API → Invitation and reset mail: sends account mail (evidence: `README.md`)
- Invitation and reset mail → SMTP service: sends messages (evidence: `server/email.js`)
