# 100xdevs-cohort-3/assignments architecture

> Architecture diagram of the GitHub repository 100xdevs-cohort-3/assignments, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/100xdevs-cohort-3/assignments
- Repository: https://github.com/100xdevs-cohort-3/assignments

## Overview

##### Project’s Nature and Purpose
- This repository is a “meta-project” comprising multiple week-by-week assignments.
- Each week folder (week-1, week-2, … week-19) contains one or more self-contained exercises or mini-applications. Some assignments are static HTML/CSS puzzles, while others are full-stack exercises (using backend routes, Express middleware, React components, Next.js pages, and even database integrations via Prisma).

- At the top layer, represent the repository as an umbrella “100xdevs Cohort 3 Assignments” container.
- Below that, break out the major week folders (e.g., week-1, week-2, … week-19) as separate nodes or layers.
- For each week, if there are multiple projects or assignments (for example, week-10 has “authSystem” and “userApi”), represent these as subcomponents connected to their respective week folder.

##### And Label Main Components for Each Assignment
- For projects that are plain HTML/CSS/JS (like many in week-1, week-2, week-3, or some in week-9):
– Label components such as “Static Frontend,” “Assets (CSS/JS/Images),” and “HTML Templates.”
- For full-stack assignments (e.g., week-4/hard, week-5, week-7, week-19):
– Identify separate layers/components:
▪ Frontend (client-side assets such as HTML files, React components, Next.js pages)
▪ Backend (Node.js servers, Express routes, middleware, API endpoints)
▪ Database/Models (for projects using Prisma or database-related directories, e.g., week-18’s prisma folder)
▪ Middleware/Utilities (folders like “middlewares” in week-4 and week-7 which include rate-limiting, authentication, logging).
- For projects that include tests (e.g., many assignments have tests or __tests__ folders):
– Optionally include a “Testing” component or annotate that these components follow test-driven practices.

##### Relationships and Interactions
– Inside the backend, show interactions between “Middleware” and “Routes/Controllers.”
- For assignments involving asynchronous JavaScript or promise-based functions (see week-2’s async-js challenges), you might represent the flow of asynchronous operations from function calls to callbacks/promises.

##### Architectural Patterns and Design Principles
- For assignments using modular file structures (such as React components in separate folders or Express route separation), indicate how modules communicate.
- Where applicable, note patterns such as MVC (in backend projects), component-based architecture (in React or Next.js assignments), or even simple procedural code (in straightforward HTML/JS assignments).
- Clear layering (presentation, business logic, data access) in more complex projects like week-19 which uses Next.js and Prisma.

##### Technology and Framework Labels
- Within each component/assignment, annotate relevant technologies:
– For client-side code: HTML, CSS, JavaScript, React (JSX files), Next.js (app directory, API routes)
– For backend code: Node.js, Express (look for routing files), TypeScript (in week-17), middleware design.
– For database integration: Prisma and migration folders are present in week-18 and week-19.
– For build configuration: note Vite, ESLint, Tailwind CSS (week-19 tailwind.config.ts), and so on.

## Diagram (Mermaid)

```mermaid
graph TD
    A["100xdevs Cohort 3 Assignments"]:::repo

    %% Week-1: Static Frontend and HTML/CSS Puzzles
    W1["Week-1"]:::week
    W1a["Static Frontend Puzzles"]:::frontend
    W1b["Static Puzzle Solutions"]:::frontend
    A -->|"contains"| W1
    W1 --> W1a
    W1 --> W1b

    %% Week-2: Asynchronous JS and Algorithm Challenges
    W2["Week-2"]:::week
    W2a["Async JS Challenges"]:::frontend
    W2b["JS Algorithm Challenges"]:::frontend
    A -->|"contains"| W2
    W2 --> W2a
    W2 --> W2b

    %% Week-4: Express Backend with Routes and Middleware
    W4["Week-4"]:::week
    W4a["Backend Routes & Middleware"]:::backend
    W4b["Middlewares Module"]:::backend
    A -->|"contains"| W4
    W4 --> W4a
    W4 --> W4b
    W4a -->|"uses"| W4b

    %% Week-5: Full-Stack Backend Services
    W5["Week-5"]:::week
    W5a["Backend Services"]:::backend
    A -->|"contains"| W5
    W5 --> W5a

    %% Week-6: Full-Stack Projects - Todo App and Bookmark Manager
    W6["Week-6"]:::week
    W6a["Todo App Backend"]:::backend
    W6b["Bookmark Manager Backend"]:::backend
    A -->|"contains"| W6
    W6 --> W6a
    W6 --> W6b

    %% Week-7: Full-Stack Client and Server
    W7["Week-7"]:::week
    W7a["Client Application"]:::frontend
    W7b["Server"]:::backend
    A -->|"contains"| W7
    W7 --> W7a
    W7 --> W7b
    W7a -->|"calls"| W7b

    %% Week-10: Full-Stack Assignments (AuthSystem and userApi)
    W10["Week-10"]:::week
    W10a["AuthSystem Full-Stack Assignment"]:::fullstack
    W10b["userApi Full-Stack Assignment"]:::fullstack
    A -->|"contains"| W10
    W10 --> W10a
    W10 --> W10b

    %% Week-11: Amazon Cart React Application
    W11["Week-11"]:::week
    W11a["Amazon Cart (React)"]:::frontend
    A -->|"contains"| W11
    W11 --> W11a

    %% Week-17: TypeScript & Database Models
    W17["Week-17"]:::week
    W17a["DB & TypeScript Models"]:::database
    W17b["Setup Scripts"]:::backend
    A -->|"contains"| W17
    W17 --> W17a
    W17 --> W17b
    W17a -->|"initBy"| W17b

    %% Week-18: Prisma Integration and Additional DB Code
    W18["Week-18"]:::week
    W18a["Prisma Config & Migrations"]:::database
    W18b["Alternative DB Implementation"]:::backend
    W18c["Additional DB Code"]:::database
    A -->|"contains"| W18
    W18 --> W18a
    W18 --> W18b
    W18 --> W18c
    W18a -->|"syncsWith"| W18c

    %% Week-19: Next.js & Prisma Full-Stack Application
    W19["Week-19"]:::week
    W19a["Next.js Frontend (App)"]:::frontend
    W19b["React Components"]:::frontend
    W19c["DB Integration (lib)"]:::database
    W19d["Prisma (Schema)"]:::database
    A -->|"contains"| W19
    W19 --> W19a
    W19 --> W19b
    W19 --> W19c
    W19 --> W19d
    W19a -->|"calls"| W19c
    W19c -->|"queries"| W19d

    %% Click Events
    click A "https://github.com/100xdevs-cohort-3/assignments/tree/main/Root directory"
    click W1 "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-1"
    click W1a "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-1/problems"
    click W1b "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-1/solutions"
    click W2 "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-2"
    click W2a "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-2/week-2-async-js"
    click W2b "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-2/week-2-js"
    click W4 "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-4"
    click W4a "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-4/hard"
    click W4b "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-4/middlewares"
    click W5 "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-5"
    click W5a "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-5/backend"
    click W6 "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-6"
    click W6a "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-6/6.1-todo/backend"
    click W6b "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-6/6.2-bookmark-manager/backend"
    click W7 "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-7"
    click W7a "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-7/client"
    click W7b "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-7/server"
    click W10 "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-10"
    click W10a "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-10/authSystem"
    click W10b "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-10/userApi"
    click W11 "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-11"
    click W11a "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-11/amazonCart"
    click W17 "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-17"
    click W17a "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-17/src/db"
    click W17b "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-17/solution"
    click W18 "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-18"
    click W18a "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-18/prisma"
    click W18b "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-18/solution"
    click W18c "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-18/src/db"
    click W19 "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-19"
    click W19a "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-19/app"
    click W19b "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-19/components"
    click W19c "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-19/lib"
    click W19d "https://github.com/100xdevs-cohort-3/assignments/tree/main/week-19/prisma"

    %% Styling Classes
    classDef repo fill:#E0E0E0,stroke:#424242,stroke-width:2px;
    classDef week fill:#BBDEFB,stroke:#0D47A1,stroke-width:2px;
    classDef frontend fill:#C8E6C9,stroke:#2E7D32,stroke-width:2px;
    classDef backend fill:#FFCDD2,stroke:#C62828,stroke-width:2px;
    classDef fullstack fill:#E1BEE7,stroke:#6A1B9A,stroke-width:2px;
    classDef database fill:#FFF9C4,stroke:#F9A825,stroke-width:2px;
```
