# felixchen3674/mern-09-07-2026 architecture

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

- Interactive diagram: https://gitdiagram.com/felixchen3674/mern-09-07-2026
- Repository: https://github.com/felixchen3674/mern-09-07-2026

## Overview

This repository is a teaching monorepo: its curriculum presents web and backend topics, while separate directories contain runnable examples and workshop exercises. A learner browses routed lessons in the curriculum app; the backend examples demonstrate layered CRUD, authorization, microservices, and database behavior. The graph highlights those distinct stages and selected internal layers. Evidence is uneven: the tree and source index identify many subsystems, but only sampled files support the shown relationships; unsampled example wiring is therefore omitted.

Main entry points: [`backend-lecture-code/monolithic-frontend/src/App.tsx`](https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-lecture-code/monolithic-frontend/src/App.tsx) (Shop interface), [`curriculum/src/App.tsx`](https://github.com/felixchen3674/mern-09-07-2026/blob/main/curriculum/src/App.tsx) (Curriculum app), [`backend-labs/express-layered-workshops/src/attendees/repository.ts`](https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-labs/express-layered-workshops/src/attendees/repository.ts) (Workshop repositories), [`backend-lecture-code/day16-auth-security/auth-reference/src/policy/engine.ts`](https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-lecture-code/day16-auth-security/auth-reference/src/policy/engine.ts) (Policy engine)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_curriculum["Learning curriculum"]
  node_curriculum_app["Curriculum app<br/>[App.tsx]"]
  node_home["Course home<br/>[Home.tsx]"]
  node_lessons["Lessons and labs"]
  node_backend_topics["Backend topics"]
end

subgraph group_workshops["Backend workshops"]
  node_workshop_app["Workshop API<br/>[app.ts]"]
  node_workshop_controllers["Resource controllers<br/>[controller.ts]"]
  node_registration_service["Registration rules<br/>[service.ts]"]
  node_workshop_repositories["Workshop repositories<br/>[repository.ts]"]
  node_workshop_db[("Workshop database<br/>[client.ts]")]
  node_error_mapping["Error mapping<br/>[errors.ts]"]
end

subgraph group_services["Service examples"]
  node_auth_api["Auth reference API<br/>[server.ts]"]
  node_policy_engine["Policy engine<br/>[engine.ts]"]
  node_policy_rules["Policy rules<br/>[policies.ts]"]
  node_cinema_booking["Cinema bookings"]
  node_orders_demo["Order performance demo<br/>[controller.ts]"]
end

subgraph group_shop["Shop demonstration"]
  node_database_pool[("Shop database pool<br/>[pool.ts]")]
  node_shop_ui["Shop interface<br/>[App.tsx]"]
  node_products_page["Products page<br/>[ProductsPage.tsx]"]
  node_inventory_page["Inventory page<br/>[InventoryPage.tsx]"]
  node_orders_page["Orders page<br/>[OrdersPage.tsx]"]
  node_ai_widget["AI assistant<br/>[AskAI.tsx]"]
end

node_learner(("Learner"))

node_learner -->|"browses"| node_curriculum_app
node_curriculum_app -->|"routes to"| node_home
node_curriculum_app -->|"routes to"| node_lessons
node_curriculum_app -->|"routes to"| node_backend_topics
node_workshop_controllers -->|"calls"| node_workshop_repositories
node_workshop_repositories -->|"uses"| node_workshop_db
node_registration_service -->|"uses"| node_workshop_repositories
node_workshop_controllers -->|"maps errors"| node_error_mapping
node_auth_api -.-> node_policy_engine
node_policy_engine -->|"evaluates"| node_policy_rules
node_cinema_booking -.-> node_policy_engine
node_shop_ui -->|"renders"| node_products_page
node_shop_ui -->|"renders"| node_inventory_page
node_shop_ui -->|"renders"| node_orders_page
node_shop_ui -->|"renders"| node_ai_widget
node_orders_demo -->|"queries"| node_database_pool

click node_curriculum_app "https://github.com/felixchen3674/mern-09-07-2026/blob/main/curriculum/src/App.tsx"
click node_home "https://github.com/felixchen3674/mern-09-07-2026/blob/main/curriculum/src/Home.tsx"
click node_lessons "https://github.com/felixchen3674/mern-09-07-2026/tree/main/curriculum/src/week3/day13-layered-architecture"
click node_backend_topics "https://github.com/felixchen3674/mern-09-07-2026/tree/main/curriculum/src/week4/day17-microservices"
click node_workshop_app "https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-labs/express-layered-workshops/src/app.ts"
click node_workshop_controllers "https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-labs/express-layered-workshops/src/attendees/controller.ts"
click node_registration_service "https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-labs/express-layered-workshops/src/registrations/service.ts"
click node_workshop_repositories "https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-labs/express-layered-workshops/src/attendees/repository.ts"
click node_workshop_db "https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-labs/express-layered-workshops/src/db/client.ts"
click node_error_mapping "https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-labs/express-layered-workshops/src/lib/errors.ts"
click node_auth_api "https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-lecture-code/day16-auth-security/auth-reference/src/server.ts"
click node_policy_engine "https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-lecture-code/day16-auth-security/auth-reference/src/policy/engine.ts"
click node_policy_rules "https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-lecture-code/day16-auth-security/auth-reference/src/policy/policies.ts"
click node_cinema_booking "https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-labs/express-microservices-cinema/src/services/bookings/booking.controller.ts"
click node_orders_demo "https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-lecture-code/monolithic/src/modules/orders/controller.ts"
click node_database_pool "https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-lecture-code/monolithic/src/db/pool.ts"
click node_shop_ui "https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-lecture-code/monolithic-frontend/src/App.tsx"
click node_products_page "https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-lecture-code/monolithic-frontend/src/pages/ProductsPage.tsx"
click node_inventory_page "https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-lecture-code/monolithic-frontend/src/pages/InventoryPage.tsx"
click node_orders_page "https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-lecture-code/monolithic-frontend/src/pages/OrdersPage.tsx"
click node_ai_widget "https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-lecture-code/monolithic-frontend/src/components/AskAI.tsx"

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_curriculum_app,node_home,node_lessons,node_backend_topics toneBlue
class node_workshop_app,node_workshop_controllers,node_registration_service,node_workshop_repositories,node_workshop_db,node_error_mapping toneAmber
class node_auth_api,node_policy_engine,node_policy_rules,node_cinema_booking,node_orders_demo toneMint
class node_database_pool,node_shop_ui,node_products_page,node_inventory_page,node_orders_page,node_ai_widget toneRose
class node_learner toneIndigo
```

## Components

### Learning curriculum

- [Curriculum app](https://github.com/felixchen3674/mern-09-07-2026/blob/main/curriculum/src/App.tsx): `curriculum/src/App.tsx`
- [Course home](https://github.com/felixchen3674/mern-09-07-2026/blob/main/curriculum/src/Home.tsx): `curriculum/src/Home.tsx`
- [Lessons and labs](https://github.com/felixchen3674/mern-09-07-2026/tree/main/curriculum/src/week3/day13-layered-architecture): `curriculum/src/week3/day13-layered-architecture`
- [Backend topics](https://github.com/felixchen3674/mern-09-07-2026/tree/main/curriculum/src/week4/day17-microservices): `curriculum/src/week4/day17-microservices`

### Backend workshops

- [Workshop API](https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-labs/express-layered-workshops/src/app.ts): `backend-labs/express-layered-workshops/src/app.ts`
- [Resource controllers](https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-labs/express-layered-workshops/src/attendees/controller.ts): `backend-labs/express-layered-workshops/src/attendees/controller.ts`
- [Registration rules](https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-labs/express-layered-workshops/src/registrations/service.ts): `backend-labs/express-layered-workshops/src/registrations/service.ts`
- [Workshop repositories](https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-labs/express-layered-workshops/src/attendees/repository.ts): `backend-labs/express-layered-workshops/src/attendees/repository.ts`
- [Workshop database](https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-labs/express-layered-workshops/src/db/client.ts): `backend-labs/express-layered-workshops/src/db/client.ts`
- [Error mapping](https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-labs/express-layered-workshops/src/lib/errors.ts): `backend-labs/express-layered-workshops/src/lib/errors.ts`

### Service examples

- [Auth reference API](https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-lecture-code/day16-auth-security/auth-reference/src/server.ts): `backend-lecture-code/day16-auth-security/auth-reference/src/server.ts`
- [Policy engine](https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-lecture-code/day16-auth-security/auth-reference/src/policy/engine.ts): `backend-lecture-code/day16-auth-security/auth-reference/src/policy/engine.ts`
- [Policy rules](https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-lecture-code/day16-auth-security/auth-reference/src/policy/policies.ts): `backend-lecture-code/day16-auth-security/auth-reference/src/policy/policies.ts`
- [Cinema bookings](https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-labs/express-microservices-cinema/src/services/bookings/booking.controller.ts): `backend-labs/express-microservices-cinema/src/services/bookings/booking.controller.ts`
- [Order performance demo](https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-lecture-code/monolithic/src/modules/orders/controller.ts): `backend-lecture-code/monolithic/src/modules/orders/controller.ts`

### Shop demonstration

- [Shop database pool](https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-lecture-code/monolithic/src/db/pool.ts): `backend-lecture-code/monolithic/src/db/pool.ts`
- [Shop interface](https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-lecture-code/monolithic-frontend/src/App.tsx): `backend-lecture-code/monolithic-frontend/src/App.tsx`
- [Products page](https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-lecture-code/monolithic-frontend/src/pages/ProductsPage.tsx): `backend-lecture-code/monolithic-frontend/src/pages/ProductsPage.tsx`
- [Inventory page](https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-lecture-code/monolithic-frontend/src/pages/InventoryPage.tsx): `backend-lecture-code/monolithic-frontend/src/pages/InventoryPage.tsx`
- [Orders page](https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-lecture-code/monolithic-frontend/src/pages/OrdersPage.tsx): `backend-lecture-code/monolithic-frontend/src/pages/OrdersPage.tsx`
- [AI assistant](https://github.com/felixchen3674/mern-09-07-2026/blob/main/backend-lecture-code/monolithic-frontend/src/components/AskAI.tsx): `backend-lecture-code/monolithic-frontend/src/components/AskAI.tsx`

### Other components

- **Learner**

## Connections

- Learner → Curriculum app: browses
- Curriculum app → Course home: routes to (evidence: `curriculum/src/App.tsx`)
- Curriculum app → Lessons and labs: routes to (evidence: `curriculum/src/App.tsx`)
- Curriculum app → Backend topics: routes to (evidence: `curriculum/src/App.tsx`)
- Resource controllers → Workshop repositories: calls (evidence: `backend-labs/express-layered-workshops/src/attendees/controller.ts`)
- Workshop repositories → Workshop database: uses (evidence: `backend-labs/express-layered-workshops/src/attendees/repository.ts`)
- Registration rules → Workshop repositories: uses (evidence: `backend-labs/express-layered-workshops/src/registrations/service.ts`)
- Resource controllers → Error mapping: maps errors
- Auth reference API → Policy engine
- Policy engine → Policy rules: evaluates (evidence: `backend-lecture-code/day16-auth-security/auth-reference/src/policy/engine.ts`)
- Cinema bookings → Policy engine
- Shop interface → Products page: renders (evidence: `backend-lecture-code/monolithic-frontend/src/App.tsx`)
- Shop interface → Inventory page: renders (evidence: `backend-lecture-code/monolithic-frontend/src/App.tsx`)
- Shop interface → Orders page: renders (evidence: `backend-lecture-code/monolithic-frontend/src/App.tsx`)
- Shop interface → AI assistant: renders (evidence: `backend-lecture-code/monolithic-frontend/src/App.tsx`)
- Order performance demo → Shop database pool: queries (evidence: `backend-lecture-code/monolithic/src/modules/orders/controller.ts`)
