# mithunkrishh/bright-tech-solutions architecture

> Architecture diagram of the GitHub repository mithunkrishh/bright-tech-solutions, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-06-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mithunkrishh/bright-tech-solutions
- Repository: https://github.com/mithunkrishh/bright-tech-solutions

## Overview

1. **High-level shape**
   - This repo is a **multi-page company website** with a **static frontend** and a small **Node.js/Express backend**.
   - The current architecture is mostly presentation-driven: pages, shared styling, shared client-side behavior, and a minimal API layer.

2. **Frontend composition**
   - Everything under `client/` is the user-facing site.
   - The site is split into separate HTML pages such as `index.html`, `website.html`, `services.html`, `admissions.html`, `career-guidance.html`, `college-finder.html`, and `abacus.html`.
   - This suggests a traditional multi-page website rather than a SPA.

3. **Shared presentation layer**
   - `client/css/style.css` is the central shared stylesheet for the whole site.
   - `client/assets/` contains icons and images used across pages.
   - These shared assets form the common visual system for all sections of the site.

4. **Client-side behavior**
   - `client/js/main.js` appears to hold the shared browser-side logic.
   - Based on the file layout, this is likely where global interactions, navigation behavior, and any page-specific enhancements are implemented.

5. **Local data used by the frontend**
   - `client/data/colleges.json` is the only structured data file visible in the tree.
   - This indicates at least one client-side feature, likely the college-finder page, reads from local JSON rather than a backend database.

6. **Backend role**
   - `server/` contains an Express application that exposes API endpoints.
   - `server/index.js` is the entry point and likely sets up the HTTP server, middleware, and route registration.

7. **API surface**
   - The only documented endpoint in the README is `GET /api/v1/health`.
   - `server/routes/apiRoutes.js` and `server/controllers/healthController.js` implement this health check, which is typically used for uptime checks, deployment validation, or monitoring.

8. **Cross-cutting server concerns**
   - `server/middleware/rateLimiter.js` adds request throttling.
   - `server/middleware/notFound.js` handles unmatched routes.
   - `server/middleware/errorHandler.js` centralizes API error responses.
   - These are standard Express boundaries around the controller layer.

9. **Subsystem boundaries**
   - The frontend and backend are loosely coupled: the frontend is mostly static content, while the backend currently provides only a small API.
   - There is no visible server-side rendering or shared application state between the two.

10. **Data/storage implications**
   - The README mentions MongoDB, but there is no database layer, model directory, or connection code in the tree.
   - So, from the repository structure alone, the practical runtime architecture is **static content + small Express API**, with local JSON data on the client side.

11. **Runtime and dev setup**
   - `package.json`/`npm run dev` starts the Node/Express server on port `5000`.
   - The app is meant to be opened at `http://localhost:5000`, implying the server either serves the client files or fronts them during development.

12. **What to show in an architecture diagram**
   - Draw a **browser/client tier** containing the HTML pages, shared CSS/JS, assets, and local college JSON.
   - Draw a separate **Express server tier** containing the API routes, health controller, and middleware.
   - Show the client reading static files locally, and the browser hitting `/api/v1/health` for backend verification.

Main entry points: [`server/index.js`](https://github.com/mithunkrishh/bright-tech-solutions/blob/main/server/index.js) (Server entry), [`client/college-finder.html`](https://github.com/mithunkrishh/bright-tech-solutions/blob/main/client/college-finder.html) (College finder), [`client/js/main.js`](https://github.com/mithunkrishh/bright-tech-solutions/blob/main/client/js/main.js) (Shared script), [`server/routes/apiRoutes.js`](https://github.com/mithunkrishh/bright-tech-solutions/blob/main/server/routes/apiRoutes.js) (API routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client tier"]
  node_site_pages["Site pages<br/>html pages"]
  node_college_finder_page["College finder<br/>html page"]
  node_shared_styles["Shared styles<br/>css<br/>[style.css]"]
  node_shared_script["Shared script<br/>browser js<br/>[main.js]"]
  node_media_assets["Media assets<br/>images/icons"]
  node_college_data[("College data<br/>json data<br/>[colleges.json]")]
end

subgraph group_server["Server tier"]
  node_server_entry["Server entry<br/>express app<br/>[index.js]"]
  node_api_routes["API routes<br/>route module<br/>[apiRoutes.js]"]
  node_health_controller["Health check<br/>controller"]
  node_rate_limiter["Rate limiter<br/>middleware<br/>[rateLimiter.js]"]
  node_not_found["Not found<br/>middleware<br/>[notFound.js]"]
  node_error_handler["Error handler<br/>middleware<br/>[errorHandler.js]"]
end

node_site_pages -->|"uses"| node_shared_styles
node_site_pages -->|"loads"| node_shared_script
node_site_pages -->|"embeds"| node_media_assets
node_college_finder_page -->|"reads"| node_college_data
node_college_finder_page -->|"loads"| node_shared_script
node_college_finder_page -->|"uses"| node_shared_styles
node_server_entry -->|"mounts"| node_api_routes
node_server_entry -->|"applies"| node_rate_limiter
node_server_entry -->|"applies"| node_not_found
node_server_entry -->|"applies"| node_error_handler
node_api_routes -->|"invokes"| node_health_controller
node_shared_script -.->|"checks"| node_health_controller

click node_college_finder_page "https://github.com/mithunkrishh/bright-tech-solutions/blob/main/client/college-finder.html"
click node_shared_styles "https://github.com/mithunkrishh/bright-tech-solutions/blob/main/client/css/style.css"
click node_shared_script "https://github.com/mithunkrishh/bright-tech-solutions/blob/main/client/js/main.js"
click node_media_assets "https://github.com/mithunkrishh/bright-tech-solutions/tree/main/client/assets"
click node_college_data "https://github.com/mithunkrishh/bright-tech-solutions/blob/main/client/data/colleges.json"
click node_server_entry "https://github.com/mithunkrishh/bright-tech-solutions/blob/main/server/index.js"
click node_api_routes "https://github.com/mithunkrishh/bright-tech-solutions/blob/main/server/routes/apiRoutes.js"
click node_health_controller "https://github.com/mithunkrishh/bright-tech-solutions/blob/main/server/controllers/healthController.js"
click node_rate_limiter "https://github.com/mithunkrishh/bright-tech-solutions/blob/main/server/middleware/rateLimiter.js"
click node_not_found "https://github.com/mithunkrishh/bright-tech-solutions/blob/main/server/middleware/notFound.js"
click node_error_handler "https://github.com/mithunkrishh/bright-tech-solutions/blob/main/server/middleware/errorHandler.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_site_pages,node_college_finder_page,node_shared_styles,node_shared_script,node_media_assets,node_college_data toneBlue
class node_server_entry,node_api_routes,node_health_controller,node_rate_limiter,node_not_found,node_error_handler toneAmber
```

## Components

### Client tier

Static multi-page website and shared browser-side resources.

- **Site pages**: html pages · Multi-page company site: home and content pages under client/.
- [College finder](https://github.com/mithunkrishh/bright-tech-solutions/blob/main/client/college-finder.html): html page · Page that likely consumes local college data for search or filtering. · `client/college-finder.html`
- [Shared styles](https://github.com/mithunkrishh/bright-tech-solutions/blob/main/client/css/style.css): css · Central stylesheet for the whole site. · `client/css/style.css`
- [Shared script](https://github.com/mithunkrishh/bright-tech-solutions/blob/main/client/js/main.js): browser js · Global client-side behavior and page enhancements. · `client/js/main.js`
- [Media assets](https://github.com/mithunkrishh/bright-tech-solutions/tree/main/client/assets): images/icons · Shared visual assets used across pages. · `client/assets`
- [College data](https://github.com/mithunkrishh/bright-tech-solutions/blob/main/client/data/colleges.json): json data · Local structured data used by the frontend. · `client/data/colleges.json`

### Server tier

Small Express API and cross-cutting middleware.

- [Server entry](https://github.com/mithunkrishh/bright-tech-solutions/blob/main/server/index.js): express app · Node.js entry point that starts the HTTP server and wires middleware/routes. · `server/index.js`
- [API routes](https://github.com/mithunkrishh/bright-tech-solutions/blob/main/server/routes/apiRoutes.js): route module · Express route registration for the API surface. · `server/routes/apiRoutes.js`
- [Health check](https://github.com/mithunkrishh/bright-tech-solutions/blob/main/server/controllers/healthController.js): controller · Implements GET /api/v1/health. · `server/controllers/healthController.js`
- [Rate limiter](https://github.com/mithunkrishh/bright-tech-solutions/blob/main/server/middleware/rateLimiter.js): middleware · Throttles incoming requests. · `server/middleware/rateLimiter.js`
- [Not found](https://github.com/mithunkrishh/bright-tech-solutions/blob/main/server/middleware/notFound.js): middleware · Handles unmatched routes. · `server/middleware/notFound.js`
- [Error handler](https://github.com/mithunkrishh/bright-tech-solutions/blob/main/server/middleware/errorHandler.js): middleware · Centralized API error responses. · `server/middleware/errorHandler.js`

## Connections

- Site pages → Shared styles: uses · All pages share the central stylesheet.
- Site pages → Shared script: loads · Pages load common browser-side logic.
- Site pages → Media assets: embeds · Pages reference shared icons and images.
- College finder → College data: reads · Finder page uses local college JSON.
- College finder → Shared script: loads · Finder page uses shared client behavior.
- College finder → Shared styles: uses · Finder page uses the common stylesheet.
- Server entry → API routes: mounts · Main server registers API routes.
- Server entry → Rate limiter: applies · Server installs request throttling.
- Server entry → Not found: applies · Server installs unmatched-route handling.
- Server entry → Error handler: applies · Server installs centralized error handling.
- API routes → Health check: invokes · Route module forwards health requests to the controller.
- Shared script → Health check: checks · Client-side runtime can call the health endpoint for verification.
