# taraalleah/web_dev architecture

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

- Interactive diagram: https://gitdiagram.com/taraalleah/web_dev
- Repository: https://github.com/taraalleah/web_dev

## Overview

This repository is a collection of weekly JavaScript/React learning projects, not one integrated product. Its examples cover component-based React interfaces, Express CRUD APIs, authenticated resource APIs, and AI-generated recommendations. The graph highlights several representative request-to-result flows and their internal layers. The tree and source index show many additional independent exercises; those are not connected into a shared system. The README is empty, so subsystem scope and the connections shown are limited to the supplied source excerpts and index references.

Main entry points: [`week_2/ke/fe-pp1-part2/src/App.jsx`](https://github.com/taraalleah/web_dev/blob/main/week_2/ke/fe-pp1-part2/src/App.jsx) (Training app), [`week_5/to/llm-act1/AI-demo2-task/controllers/tourController.js`](https://github.com/taraalleah/web_dev/blob/main/week_5/to/llm-act1/AI-demo2-task/controllers/tourController.js) (Tour controller), [`week_4/ke/week4-be-activity1/routes/blogRouter.js`](https://github.com/taraalleah/web_dev/blob/main/week_4/ke/week4-be-activity1/routes/blogRouter.js) (Blog routes), [`week_4/ke/week4-be-activity1/controllers/blogController.js`](https://github.com/taraalleah/web_dev/blob/main/week_4/ke/week4-be-activity1/controllers/blogController.js) (Blog controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_express["Express API examples"]
  node_express_app["API server<br/>[app.js]"]
  node_blog_routes["Blog routes<br/>[blogRouter.js]"]
  node_blog_controller["Blog controller<br/>[blogController.js]"]
  node_blog_model[("Blog model<br/>[blogModel.js]")]
  node_car_controller["Car controller<br/>[carControllers.js]"]
  node_car_model[("Car model<br/>[carModel.js]")]
end

subgraph group_auth["Authenticated APIs"]
  node_job_controller["Job controller<br/>[jobControllers.js]"]
  node_job_model[("Job model<br/>[jobModel.js]")]
  node_user_controller["User controller<br/>[userControllers.js]"]
  node_user_model[("User model<br/>[userModel.js]")]
  node_book_controller["Book controller<br/>[bookControllers.js]"]
  node_book_model[("Book model<br/>[bookModel.js]")]
  node_workout_controller["Workout controller"]
  node_workout_model[("Workout model<br/>[workoutModel.js]")]
end

subgraph group_ai["AI recommendations"]
  node_tour_controller["Tour controller<br/>[tourController.js]"]
  node_tour_service["Tour service<br/>[tourService.js]"]
  node_tour_normalizer["Plan normalizer"]
end

subgraph group_react["React exercises"]
  node_react_app["Training app<br/>[App.jsx]"]
  node_credit_card["Credit card view<br/>[CreditCard.jsx]"]
  node_color_box["Color box view<br/>[BoxColor.jsx]"]
  node_greetings["Greeting view<br/>[Greetings.jsx]"]
end

node_api_user(("API client"))
node_tour_client(("Recommendation client"))
node_ai_provider{{"AI provider"}}

node_express_app -->|"mounts routes"| node_blog_routes
node_blog_routes -->|"routes requests"| node_blog_controller
node_blog_controller -->|"queries data"| node_blog_model
node_car_controller -->|"calls operations"| node_car_model
node_job_controller -->|"queries data"| node_job_model
node_user_controller -->|"queries users"| node_user_model
node_book_controller -->|"queries data"| node_book_model
node_workout_controller -->|"queries data"| node_workout_model
node_tour_controller -->|"requests recommendation"| node_tour_service
node_tour_controller -->|"normalizes plan"| node_tour_normalizer
node_tour_service -.->|"generates recommendation"| node_ai_provider
node_react_app -->|"renders"| node_credit_card
node_react_app -->|"renders"| node_color_box
node_react_app -->|"renders"| node_greetings

click node_express_app "https://github.com/taraalleah/web_dev/blob/main/week_4/ke/week4-be-activity1/app.js"
click node_blog_routes "https://github.com/taraalleah/web_dev/blob/main/week_4/ke/week4-be-activity1/routes/blogRouter.js"
click node_blog_controller "https://github.com/taraalleah/web_dev/blob/main/week_4/ke/week4-be-activity1/controllers/blogController.js"
click node_blog_model "https://github.com/taraalleah/web_dev/blob/main/week_4/ke/week4-be-activity1/models/blogModel.js"
click node_car_controller "https://github.com/taraalleah/web_dev/blob/main/week_3/ke/api-cars-middleware/controllers/carControllers.js"
click node_car_model "https://github.com/taraalleah/web_dev/blob/main/week_3/ke/api-cars-middleware/models/carModel.js"
click node_job_controller "https://github.com/taraalleah/web_dev/blob/main/week_7/API-Testing-jobs/jobs-api3-protected/controllers/jobControllers.js"
click node_job_model "https://github.com/taraalleah/web_dev/blob/main/week_7/API-Testing-jobs/jobs-api3-protected/models/jobModel.js"
click node_user_controller "https://github.com/taraalleah/web_dev/blob/main/week_7/API-Testing-jobs/jobs-api2-auth/controllers/userControllers.js"
click node_user_model "https://github.com/taraalleah/web_dev/blob/main/week_7/API-Testing-jobs/jobs-api2-auth/models/userModel.js"
click node_book_controller "https://github.com/taraalleah/web_dev/blob/main/week_7/react-custom-hooks/backend/controllers/bookControllers.js"
click node_book_model "https://github.com/taraalleah/web_dev/blob/main/week_7/react-custom-hooks/backend/models/bookModel.js"
click node_workout_controller "https://github.com/taraalleah/web_dev/blob/main/week_6/ke/week6-be-workout-v2/controllers/workoutController.js"
click node_workout_model "https://github.com/taraalleah/web_dev/blob/main/week_6/ke/week6-be-workout-v2/models/workoutModel.js"
click node_tour_controller "https://github.com/taraalleah/web_dev/blob/main/week_5/to/llm-act1/AI-demo2-task/controllers/tourController.js"
click node_tour_service "https://github.com/taraalleah/web_dev/blob/main/week_5/to/llm-act1/AI-demo2-task/services/tourService.js"
click node_tour_normalizer "https://github.com/taraalleah/web_dev/blob/main/week_5/to/llm-act1/AI-demo2-task/utils/normalizeTourPlan.js"
click node_react_app "https://github.com/taraalleah/web_dev/blob/main/week_2/ke/fe-pp1-part2/src/App.jsx"
click node_credit_card "https://github.com/taraalleah/web_dev/blob/main/week_2/ke/fe-pp1-part2/src/CreditCard.jsx"
click node_color_box "https://github.com/taraalleah/web_dev/blob/main/week_2/ke/fe-pp1-part2/src/BoxColor.jsx"
click node_greetings "https://github.com/taraalleah/web_dev/blob/main/week_2/ke/fe-pp1-part2/src/Greetings.jsx"

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_express_app,node_blog_routes,node_blog_controller,node_blog_model,node_car_controller,node_car_model,node_api_user,node_tour_client toneBlue
class node_job_controller,node_job_model,node_user_controller,node_user_model,node_book_controller,node_book_model,node_workout_controller,node_workout_model toneAmber
class node_tour_controller,node_tour_service,node_tour_normalizer toneMint
class node_react_app,node_credit_card,node_color_box,node_greetings toneRose
class node_ai_provider toneIndigo
```

## Components

### Express API examples

- [API server](https://github.com/taraalleah/web_dev/blob/main/week_4/ke/week4-be-activity1/app.js): `week_4/ke/week4-be-activity1/app.js`
- [Blog routes](https://github.com/taraalleah/web_dev/blob/main/week_4/ke/week4-be-activity1/routes/blogRouter.js): `week_4/ke/week4-be-activity1/routes/blogRouter.js`
- [Blog controller](https://github.com/taraalleah/web_dev/blob/main/week_4/ke/week4-be-activity1/controllers/blogController.js): `week_4/ke/week4-be-activity1/controllers/blogController.js`
- [Blog model](https://github.com/taraalleah/web_dev/blob/main/week_4/ke/week4-be-activity1/models/blogModel.js): `week_4/ke/week4-be-activity1/models/blogModel.js`
- [Car controller](https://github.com/taraalleah/web_dev/blob/main/week_3/ke/api-cars-middleware/controllers/carControllers.js): `week_3/ke/api-cars-middleware/controllers/carControllers.js`
- [Car model](https://github.com/taraalleah/web_dev/blob/main/week_3/ke/api-cars-middleware/models/carModel.js): `week_3/ke/api-cars-middleware/models/carModel.js`

### Authenticated APIs

- [Job controller](https://github.com/taraalleah/web_dev/blob/main/week_7/API-Testing-jobs/jobs-api3-protected/controllers/jobControllers.js): `week_7/API-Testing-jobs/jobs-api3-protected/controllers/jobControllers.js`
- [Job model](https://github.com/taraalleah/web_dev/blob/main/week_7/API-Testing-jobs/jobs-api3-protected/models/jobModel.js): `week_7/API-Testing-jobs/jobs-api3-protected/models/jobModel.js`
- [User controller](https://github.com/taraalleah/web_dev/blob/main/week_7/API-Testing-jobs/jobs-api2-auth/controllers/userControllers.js): `week_7/API-Testing-jobs/jobs-api2-auth/controllers/userControllers.js`
- [User model](https://github.com/taraalleah/web_dev/blob/main/week_7/API-Testing-jobs/jobs-api2-auth/models/userModel.js): `week_7/API-Testing-jobs/jobs-api2-auth/models/userModel.js`
- [Book controller](https://github.com/taraalleah/web_dev/blob/main/week_7/react-custom-hooks/backend/controllers/bookControllers.js): `week_7/react-custom-hooks/backend/controllers/bookControllers.js`
- [Book model](https://github.com/taraalleah/web_dev/blob/main/week_7/react-custom-hooks/backend/models/bookModel.js): `week_7/react-custom-hooks/backend/models/bookModel.js`
- [Workout controller](https://github.com/taraalleah/web_dev/blob/main/week_6/ke/week6-be-workout-v2/controllers/workoutController.js): `week_6/ke/week6-be-workout-v2/controllers/workoutController.js`
- [Workout model](https://github.com/taraalleah/web_dev/blob/main/week_6/ke/week6-be-workout-v2/models/workoutModel.js): `week_6/ke/week6-be-workout-v2/models/workoutModel.js`

### AI recommendations

- [Tour controller](https://github.com/taraalleah/web_dev/blob/main/week_5/to/llm-act1/AI-demo2-task/controllers/tourController.js): `week_5/to/llm-act1/AI-demo2-task/controllers/tourController.js`
- [Tour service](https://github.com/taraalleah/web_dev/blob/main/week_5/to/llm-act1/AI-demo2-task/services/tourService.js): `week_5/to/llm-act1/AI-demo2-task/services/tourService.js`
- [Plan normalizer](https://github.com/taraalleah/web_dev/blob/main/week_5/to/llm-act1/AI-demo2-task/utils/normalizeTourPlan.js): `week_5/to/llm-act1/AI-demo2-task/utils/normalizeTourPlan.js`

### React exercises

- [Training app](https://github.com/taraalleah/web_dev/blob/main/week_2/ke/fe-pp1-part2/src/App.jsx): `week_2/ke/fe-pp1-part2/src/App.jsx`
- [Credit card view](https://github.com/taraalleah/web_dev/blob/main/week_2/ke/fe-pp1-part2/src/CreditCard.jsx): `week_2/ke/fe-pp1-part2/src/CreditCard.jsx`
- [Color box view](https://github.com/taraalleah/web_dev/blob/main/week_2/ke/fe-pp1-part2/src/BoxColor.jsx): `week_2/ke/fe-pp1-part2/src/BoxColor.jsx`
- [Greeting view](https://github.com/taraalleah/web_dev/blob/main/week_2/ke/fe-pp1-part2/src/Greetings.jsx): `week_2/ke/fe-pp1-part2/src/Greetings.jsx`

### Other components

- **API client**
- **Recommendation client**
- **AI provider**

## Connections

- API server → Blog routes: mounts routes (evidence: `week_4/ke/week4-be-activity1/app.js`)
- Blog routes → Blog controller: routes requests (evidence: `week_4/ke/week4-be-activity1/routes/blogRouter.js`)
- Blog controller → Blog model: queries data (evidence: `week_4/ke/week4-be-activity1/controllers/blogController.js`)
- Car controller → Car model: calls operations (evidence: `week_3/ke/api-cars-middleware/controllers/carControllers.js`)
- Job controller → Job model: queries data (evidence: `week_7/API-Testing-jobs/jobs-api3-protected/controllers/jobControllers.js`)
- User controller → User model: queries users (evidence: `week_7/API-Testing-jobs/jobs-api2-auth/controllers/userControllers.js`)
- Book controller → Book model: queries data (evidence: `week_7/react-custom-hooks/backend/controllers/bookControllers.js`)
- Workout controller → Workout model: queries data (evidence: `week_6/ke/week6-be-workout-v2/controllers/workoutController.js`)
- Tour controller → Tour service: requests recommendation (evidence: `week_5/to/llm-act1/AI-demo2-task/controllers/tourController.js`)
- Tour controller → Plan normalizer: normalizes plan (evidence: `week_5/to/llm-act1/AI-demo2-task/controllers/tourController.js`)
- Tour service → AI provider: generates recommendation
- Training app → Credit card view: renders (evidence: `week_2/ke/fe-pp1-part2/src/App.jsx`)
- Training app → Color box view: renders (evidence: `week_2/ke/fe-pp1-part2/src/App.jsx`)
- Training app → Greeting view: renders (evidence: `week_2/ke/fe-pp1-part2/src/App.jsx`)
