# tejaskumarkoneti/assignments architecture

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

- Interactive diagram: https://gitdiagram.com/tejaskumarkoneti/assignments
- Repository: https://github.com/tejaskumarkoneti/assignments

## Overview

This repository is a training monorepo for the 100xDevs Cohort 3 assignments, not a single product. The architecture is a collection of mostly independent mini-projects organized by week, with each week targeting a different layer of the stack: HTML/CSS layout, JavaScript fundamentals, React UI, Node/Express APIs, TypeScript data access, and Next.js full-stack work.

1. **Top-level structure**
   - Each week is a separate subsystem with its own scope, tooling, and runtime.
   - Many folders contain both a starter/problem version and a `solution` folder, so the repo supports exercise + reference implementation side by side.
   - Most projects are self-contained and do not share runtime code across weeks.

2. **Week 1: static layout exercises**
   - `week-1/problems/*` and `week-1/solutions/*` are pure HTML/CSS tasks.
   - These are static browser-only exercises focused on alignment, flexbox, grid, and reproducing VS Code-style layouts.
   - There is no backend, state, or build pipeline here; the browser is the only runtime.

3. **Week 2: JavaScript fundamentals and async patterns**
   - `week-2/week-2-js` contains algorithmic JS exercises with test coverage.
   - `week-2/week-2-async-js` adds async/file-system/promise exercises with tests and reference solutions.
   - The key boundary here is function-level logic: input/output behavior is validated by Jest, and the only external dependency is Node.js standard APIs like timers and file I/O.

4. **Week 3: early frontend app exercises**
   - `week-3/easy`, `medium`, and `hard` contain browser app prompts such as quiz, Pokémon, color changer, form builder, and task management.
   - These are small client-side apps, generally centered on DOM events, local state, and rendering.
   - This week is the bridge from pure JS exercises into interactive frontend architecture.

5. **Weeks 4–6: Node backend + frontend CRUD-style apps**
   - These weeks introduce a clearer client/server split.
   - Backend folders contain Express-style route handlers, middleware, and simple data stores under `db/` or equivalent.
   - Frontend folders are static HTML/CSS/JS clients that call those backend endpoints.
   - The dominant data flow is: browser UI → HTTP request → route handler → middleware → in-memory/data module → response.

6. **Middleware and server concerns in the backend weeks**
   - Week 4 explicitly separates cross-cutting concerns such as rate limiting, request counting, authentication, and logging into middleware modules.
   - Week 5 and Week 6 continue the same pattern with user/todo/bookmark routes and simple persistence layers.
   - These projects are useful to diagram as three layers: request handling, middleware policy, and data access.

7. **Week 7: split React client and server**
   - `week-7/server` and `week-7/client` form a more explicit full-stack app.
   - The client is a Vite/React app with pages and components for login, registration, courses, and home.
   - The server is separate and handles backend responsibilities; the repo structure implies an API-driven architecture with the React app consuming it over HTTP.

8. **Weeks 9–11: standalone React applications**
   - These are frontend-heavy applications built with Vite and React.
   - Week 9 includes a timer app and a pet adoption form with validation utilities.
   - Week 10 includes authentication and a random user API UI.
   - Week 11 is a more structured shopping-cart-style UI with components, modal dialogs, and a store layer.

9. **State and component boundaries in the React weeks**
   - Week 10 and Week 11 show clear component boundaries: containers, presentational components, and shared state modules.
   - Week 11 is the most architecturally layered frontend app: UI components, modal flows, cart/wishlist state, and selectors are separated from visual styling.
   - Data flow is typically: user interaction → component state/store update → derived selectors → re-rendered UI.

10. **Week 17: TypeScript database layer**
   - This week moves into TypeScript and backend data access testing.
   - `src/db` contains setup and domain modules such as `user` and `travel`.
   - The architecture is focused on typed database operations and testable data-layer behavior, with `solution` mirroring the domain modules.

11. **Week 18: Prisma-backed persistence**
   - Week 18 introduces Prisma schema and migrations, making the persistence layer explicit.
   - The `prisma/` directory defines the database model, while `src/db` contains TypeScript code that works against those models.
   - This is a stronger separation than the earlier in-memory backend exercises: schema/migrations define storage, and application code consumes it.

12. **Week 19: Next.js full-stack app**
   - This is the most integrated project in the repo.
   - `app/` contains the Next.js app router, pages, layout, loading state, and an API route at `app/api/user/route.ts`.
   - `components/Signup.tsx` and `app/signup/page.tsx` form the UI, while `lib/prismadb.ts` and `prisma/` provide the database connection and schema.
   - The data flow is browser → Next page/component → API route or server action style boundary → Prisma → database.

13. **Tooling and runtime boundaries**
   - Vite is the primary frontend bundler for the React assignments.
   - Node.js is used for the JavaScript, async, backend, and TypeScript exercises.
   - Jest appears in the testing-oriented weeks, especially the JS, middleware, and database layers.
   - Prisma and Next.js only become relevant in the later full-stack weeks, and they materially change the architecture by introducing schema-driven persistence and server-rendered routing.

14. **How to diagram the repository**
   - At the highest level, draw it as a curriculum repository split into weekly, self-contained project clusters.
   - Then, for any specific week, diagram only the layers actually present there: static UI, client-only React, Node API + middleware, client/server split, or database-backed full stack.
   - The most important architectural rule in this repo is that there is no single shared runtime: each week is its own mini-architecture with its own entry point, dependencies, and data flow.

Main entry points: [`week-1`](https://github.com/tejaskumarkoneti/assignments/tree/main/week-1) (Week 1), [`week-4/hard`](https://github.com/tejaskumarkoneti/assignments/tree/main/week-4/hard) (Week 4 server), [`week-5`](https://github.com/tejaskumarkoneti/assignments/tree/main/week-5) (Week 5), [`week-6/6.1-todo`](https://github.com/tejaskumarkoneti/assignments/blob/main/week-6/6.1-todo) (Todo app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_curriculum["Curriculum repo"]
  node_repo["Assignments<br/>curriculum"]
end

subgraph group_static["Static UI weeks"]
  node_week1["Week 1<br/>static exercises"]
  node_week1problems["Problems<br/>static prompts"]
  node_week1solutions["Solutions<br/>reference layouts"]
end

subgraph group_js["JavaScript weeks"]
  node_week2js["Week 2 JS<br/>sync exercises"]
  node_week2async["Async JS<br/>promise/file I/O"]
end

subgraph group_backend["Backend weeks"]
  node_week4mid["Week 4 middleware<br/>express policies"]
  node_week4hard["Week 4 server<br/>express api"]
  node_week5["Week 5<br/>client-server todo"]
  node_week6todo["Todo app<br/>express CRUD<br/>[6.1-todo]"]
  node_week6bookmarks["Bookmarks<br/>express CRUD"]
  node_week7server["Server<br/>api backend"]
end

subgraph group_react["React weeks"]
  node_week3["Week 3<br/>dom apps"]
  node_week7client["React client<br/>vite app"]
  node_week9timer["Timer app<br/>react ui"]
  node_week9pet["Pet adoption<br/>react form"]
  node_week10auth["Auth system<br/>react auth ui"]
  node_week10user["Random user<br/>api-driven ui"]
  node_week11cart["Amazon cart<br/>react store"]
end

subgraph group_data["Data layer weeks"]
  node_week17db[("Week 17 DB<br/>typed db layer")]
  node_week18prisma[("Prisma schema<br/>schema persistence")]
  node_week18db[("Week 18 DB<br/>typed prisma db")]
end

subgraph group_fullstack["Full-stack week"]
  node_week19app["Next app<br/>nextjs app"]
  node_week19api["User API<br/>route handler<br/>[route.ts]"]
  node_week19lib["Prisma DB<br/>db client<br/>[prismadb.ts]"]
  node_week19schema[("Schema<br/>prisma model<br/>[schema.prisma]")]
end

node_repo -->|"contains"| node_week1
node_repo -->|"contains"| node_week2js
node_repo -->|"contains"| node_week2async
node_repo -->|"contains"| node_week3
node_repo -->|"contains"| node_week4mid
node_repo -->|"contains"| node_week4hard
node_repo -->|"contains"| node_week5
node_repo -->|"contains"| node_week6todo
node_repo -->|"contains"| node_week6bookmarks
node_repo -->|"contains"| node_week7client
node_repo -->|"contains"| node_week7server
node_repo -->|"contains"| node_week9timer
node_repo -->|"contains"| node_week9pet
node_repo -->|"contains"| node_week10auth
node_repo -->|"contains"| node_week10user
node_repo -->|"contains"| node_week11cart
node_repo -->|"contains"| node_week17db
node_repo -->|"contains"| node_week18prisma
node_repo -->|"contains"| node_week18db
node_repo -->|"contains"| node_week19app
node_repo -->|"contains"| node_week19api
node_repo -->|"contains"| node_week19lib
node_repo -->|"contains"| node_week19schema
node_week1 -->|"includes"| node_week1problems
node_week1 -->|"includes"| node_week1solutions
node_week2js -.->|"extends"| node_week2async
node_week4hard -.->|"uses"| node_week4mid
node_week5 -.->|"builds on"| node_week4hard
node_week6todo -.->|"repeats pattern"| node_week5
node_week6bookmarks -.->|"same layer"| node_week6todo
node_week7client -->|"calls"| node_week7server
node_week9pet -.->|"same stack"| node_week9timer
node_week11cart -.->|"same stack"| node_week10auth
node_week18db -->|"targets"| node_week18prisma
node_week19app -->|"routes to"| node_week19api
node_week19api -->|"uses"| node_week19lib
node_week19lib -->|"backed by"| node_week19schema

click node_week1 "https://github.com/tejaskumarkoneti/assignments/tree/main/week-1"
click node_week1problems "https://github.com/tejaskumarkoneti/assignments/tree/main/week-1/problems"
click node_week1solutions "https://github.com/tejaskumarkoneti/assignments/tree/main/week-1/solutions"
click node_week2js "https://github.com/tejaskumarkoneti/assignments/tree/main/week-2/week-2-js"
click node_week2async "https://github.com/tejaskumarkoneti/assignments/tree/main/week-2/week-2-async-js"
click node_week3 "https://github.com/tejaskumarkoneti/assignments/tree/main/week-3"
click node_week4mid "https://github.com/tejaskumarkoneti/assignments/tree/main/week-4/middlewares"
click node_week4hard "https://github.com/tejaskumarkoneti/assignments/tree/main/week-4/hard"
click node_week5 "https://github.com/tejaskumarkoneti/assignments/tree/main/week-5"
click node_week6todo "https://github.com/tejaskumarkoneti/assignments/blob/main/week-6/6.1-todo"
click node_week6bookmarks "https://github.com/tejaskumarkoneti/assignments/blob/main/week-6/6.2-bookmark-manager"
click node_week7client "https://github.com/tejaskumarkoneti/assignments/tree/main/week-7/client"
click node_week7server "https://github.com/tejaskumarkoneti/assignments/tree/main/week-7/server"
click node_week9timer "https://github.com/tejaskumarkoneti/assignments/tree/main/week-9/timerApp"
click node_week9pet "https://github.com/tejaskumarkoneti/assignments/tree/main/week-9/petAdoption"
click node_week10auth "https://github.com/tejaskumarkoneti/assignments/tree/main/week-10/authSystem"
click node_week10user "https://github.com/tejaskumarkoneti/assignments/tree/main/week-10/userApi"
click node_week11cart "https://github.com/tejaskumarkoneti/assignments/tree/main/week-11/amazonCart"
click node_week17db "https://github.com/tejaskumarkoneti/assignments/tree/main/week-17/src/db"
click node_week18prisma "https://github.com/tejaskumarkoneti/assignments/tree/main/week-18/prisma"
click node_week18db "https://github.com/tejaskumarkoneti/assignments/tree/main/week-18/src/db"
click node_week19app "https://github.com/tejaskumarkoneti/assignments/tree/main/week-19/app"
click node_week19api "https://github.com/tejaskumarkoneti/assignments/blob/main/week-19/app/api/user/route.ts"
click node_week19lib "https://github.com/tejaskumarkoneti/assignments/blob/main/week-19/lib/prismadb.ts"
click node_week19schema "https://github.com/tejaskumarkoneti/assignments/blob/main/week-19/prisma/schema.prisma"

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_repo,node_week19app,node_week19api,node_week19lib,node_week19schema toneBlue
class node_week1,node_week1problems,node_week1solutions toneAmber
class node_week2js,node_week2async toneMint
class node_week4mid,node_week4hard,node_week5,node_week6todo,node_week6bookmarks,node_week7server toneRose
class node_week3,node_week7client,node_week9timer,node_week9pet,node_week10auth,node_week10user,node_week11cart toneIndigo
class node_week17db,node_week18prisma,node_week18db toneTeal
```

## Components

### Curriculum repo

Weekly assignment clusters with separate mini-architectures and runtimes.

- **Assignments**: curriculum · Training monorepo containing mostly independent weekly assignments.

### Static UI weeks

Browser-only layout and DOM exercise weeks.

- [Week 1](https://github.com/tejaskumarkoneti/assignments/tree/main/week-1): static exercises · HTML/CSS layout problems and solutions. · `week-1`
- [Problems](https://github.com/tejaskumarkoneti/assignments/tree/main/week-1/problems): static prompts · Browser-only layout exercises. · `week-1/problems`
- [Solutions](https://github.com/tejaskumarkoneti/assignments/tree/main/week-1/solutions): reference layouts · Reference HTML/CSS implementations. · `week-1/solutions`

### JavaScript weeks

Function-level logic and async exercises validated by tests.

- [Week 2 JS](https://github.com/tejaskumarkoneti/assignments/tree/main/week-2/week-2-js): sync exercises · Core JavaScript problems with Jest coverage. · `week-2/week-2-js`
- [Async JS](https://github.com/tejaskumarkoneti/assignments/tree/main/week-2/week-2-async-js): promise/file I/O · Node-based async exercises around timers, files, and promises. · `week-2/week-2-async-js`

### Backend weeks

Node/Express CRUD-style apps with middleware and data modules.

- [Week 4 middleware](https://github.com/tejaskumarkoneti/assignments/tree/main/week-4/middlewares): express policies · Cross-cutting middleware exercises for rate limiting, request counting, auth, and logging. · `week-4/middlewares`
- [Week 4 server](https://github.com/tejaskumarkoneti/assignments/tree/main/week-4/hard): express api · Node server with routes, middleware, and a small database layer. · `week-4/hard`
- [Week 5](https://github.com/tejaskumarkoneti/assignments/tree/main/week-5): client-server todo · Frontend and backend split for user and todo flows. · `week-5`
- [Todo app](https://github.com/tejaskumarkoneti/assignments/blob/main/week-6/6.1-todo): express CRUD · Backend and frontend todo exercise with a simple HTTP API. · `week-6/6.1-todo`
- [Bookmarks](https://github.com/tejaskumarkoneti/assignments/blob/main/week-6/6.2-bookmark-manager): express CRUD · Bookmark manager with route handlers and browser client. · `week-6/6.2-bookmark-manager`
- [Server](https://github.com/tejaskumarkoneti/assignments/tree/main/week-7/server): api backend · Separate backend for the Week 7 client. · `week-7/server`

### React weeks

Client-side Vite/React applications with component and state structure.

- [Week 3](https://github.com/tejaskumarkoneti/assignments/tree/main/week-3): dom apps · Early browser apps using DOM events and local state. · `week-3`
- [React client](https://github.com/tejaskumarkoneti/assignments/tree/main/week-7/client): vite app · Vite/React UI for login, registration, courses, and home. · `week-7/client`
- [Timer app](https://github.com/tejaskumarkoneti/assignments/tree/main/week-9/timerApp): react ui · Frontend timer application with utility helpers. · `week-9/timerApp`
- [Pet adoption](https://github.com/tejaskumarkoneti/assignments/tree/main/week-9/petAdoption): react form · React form app with validation utilities and componentized UI. · `week-9/petAdoption`
- [Auth system](https://github.com/tejaskumarkoneti/assignments/tree/main/week-10/authSystem): react auth ui · Client-side authentication flow with navigation and app bar. · `week-10/authSystem`
- [Random user](https://github.com/tejaskumarkoneti/assignments/tree/main/week-10/userApi): api-driven ui · React UI that consumes an external/random user data source. · `week-10/userApi`
- [Amazon cart](https://github.com/tejaskumarkoneti/assignments/tree/main/week-11/amazonCart): react store · Layered shopping-cart UI with modal flows, selectors, and shared state. · `week-11/amazonCart`

### Data layer weeks

TypeScript database access and Prisma-backed persistence.

- [Week 17 DB](https://github.com/tejaskumarkoneti/assignments/tree/main/week-17/src/db): typed db layer · TypeScript data-access modules for users and travel records. · `week-17/src/db`
- [Prisma schema](https://github.com/tejaskumarkoneti/assignments/tree/main/week-18/prisma): schema persistence · Database schema and migrations backing the TypeScript data layer. · `week-18/prisma`
- [Week 18 DB](https://github.com/tejaskumarkoneti/assignments/tree/main/week-18/src/db): typed prisma db · TypeScript database modules using Prisma-defined models. · `week-18/src/db`

### Full-stack week

Next.js app router plus Prisma persistence.

- [Next app](https://github.com/tejaskumarkoneti/assignments/tree/main/week-19/app): nextjs app · App router pages, layout, loading state, and signup flow. · `week-19/app`
- [User API](https://github.com/tejaskumarkoneti/assignments/blob/main/week-19/app/api/user/route.ts): route handler · Next.js API route for user-related backend logic. · `week-19/app/api/user/route.ts`
- [Prisma DB](https://github.com/tejaskumarkoneti/assignments/blob/main/week-19/lib/prismadb.ts): db client · Prisma client connection used by the Next.js app. · `week-19/lib/prismadb.ts`
- [Schema](https://github.com/tejaskumarkoneti/assignments/blob/main/week-19/prisma/schema.prisma): prisma model · Database model and migrations for the Next.js app. · `week-19/prisma/schema.prisma`

## Connections

- Assignments → Week 1: contains · Week 1 static layout exercises.
- Assignments → Week 2 JS: contains · Week 2 JavaScript fundamentals.
- Assignments → Async JS: contains · Week 2 async exercises.
- Assignments → Week 3: contains · Week 3 browser apps.
- Assignments → Week 4 middleware: contains · Week 4 middleware exercises.
- Assignments → Week 4 server: contains · Week 4 server exercises.
- Assignments → Week 5: contains · Week 5 client-server app.
- Assignments → Todo app: contains · Week 6 todo app.
- Assignments → Bookmarks: contains · Week 6 bookmark manager.
- Assignments → React client: contains · Week 7 React client.
- Assignments → Server: contains · Week 7 backend server.
- Assignments → Timer app: contains · Week 9 timer app.
- Assignments → Pet adoption: contains · Week 9 pet adoption app.
- Assignments → Auth system: contains · Week 10 auth app.
- Assignments → Random user: contains · Week 10 random user app.
- Assignments → Amazon cart: contains · Week 11 cart app.
- Assignments → Week 17 DB: contains · Week 17 TypeScript data layer.
- Assignments → Prisma schema: contains · Week 18 Prisma schema.
- Assignments → Week 18 DB: contains · Week 18 TypeScript DB layer.
- Assignments → Next app: contains · Week 19 Next.js app.
- Assignments → User API: contains · Week 19 API route.
- Assignments → Prisma DB: contains · Week 19 database client.
- Assignments → Schema: contains · Week 19 schema and migrations.
- Week 1 → Problems: includes · Problem prompts are paired with solutions.
- Week 1 → Solutions: includes · Reference implementations for static layouts.
- Week 2 JS → Async JS: extends · Async exercises build on JavaScript fundamentals.
- Week 4 server → Week 4 middleware: uses · Server exercises rely on middleware patterns.
- Week 5 → Week 4 server: builds on · Week 5 continues the Node/Express CRUD pattern.
- Todo app → Week 5: repeats pattern · Todo app follows the same client-server split.
- Bookmarks → Todo app: same layer · Bookmark manager shares the CRUD backend architecture.
- React client → Server: calls · React client consumes the separate backend over HTTP.
- Pet adoption → Timer app: same stack · Both are standalone Vite/React apps.
- Amazon cart → Auth system: same stack · Week 11 continues layered React app structure.
- Week 18 DB → Prisma schema: targets · Typed database modules operate against Prisma schema.
- Next app → User API: routes to · Pages and components reach the API route boundary.
- User API → Prisma DB: uses · API handler uses the Prisma client wrapper.
- Prisma DB → Schema: backed by · Prisma client is defined by the database schema.
