# balisng/blicktechapi_151069 architecture

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

- Interactive diagram: https://gitdiagram.com/balisng/blicktechapi_151069
- Repository: https://github.com/balisng/blicktechapi_151069

## Overview

This repository implements a browser-based todo app backed by an Express API and Prisma persistence. The user views and filters todos, adds items, toggles completion, and deletes items: the React app coordinates those actions through its API client, which calls the server routes that validate requests and read or write todo records. The graph also includes the UI’s form/list components and the server’s shared error handling. Source excerpts show the main calls and registrations; database details beyond the Prisma schema are not sampled.

Main entry points: [`client/src/App.tsx`](https://github.com/balisng/blicktechapi_151069/blob/master/client/src/App.tsx) (Todo app), [`server/src/routes/todos.ts`](https://github.com/balisng/blicktechapi_151069/blob/master/server/src/routes/todos.ts) (Todo routes), [`client/src/api.ts`](https://github.com/balisng/blicktechapi_151069/blob/master/client/src/api.ts) (API client), [`server/src/index.ts`](https://github.com/balisng/blicktechapi_151069/blob/master/server/src/index.ts) (API bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Todo web client"]
  node_app_mount["App mount<br/>[main.tsx]"]
  node_app["Todo app<br/>[App.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
  node_filter_bar["Filter bar<br/>[FilterBar.tsx]"]
  node_todo_form["Todo form<br/>[TodoForm.tsx]"]
  node_todo_list["Todo list<br/>[TodoList.tsx]"]
  node_todo_item["Todo item<br/>[TodoItem.tsx]"]
  node_todo_types["Todo types<br/>[types.ts]"]
end

subgraph group_server["Todo API"]
  node_api_server["API bootstrap<br/>[index.ts]"]
  node_todo_routes["Todo routes<br/>[todos.ts]"]
  node_schemas["Request schemas<br/>[schemas.ts]"]
  node_error_handling["Error handling<br/>[errors.ts]"]
end

subgraph group_persistence["Todo persistence"]
  node_prisma_client["Prisma client<br/>[db.ts]"]
  node_todo_store[("Todo database<br/>[schema.prisma]")]
end

node_user(("User"))

node_user -->|"uses"| node_app_mount
node_app_mount -->|"renders"| node_app
node_app -->|"requests todos"| node_api_client
node_api_client -->|"calls API"| node_api_server
node_api_server -->|"mounts routes"| node_todo_routes
node_app -->|"renders"| node_todo_form
node_app -->|"renders"| node_filter_bar
node_app -->|"renders"| node_todo_list
node_todo_form -->|"invokes add callback"| node_app
node_filter_bar -->|"updates filter"| node_app
node_todo_list -->|"renders"| node_todo_item
node_todo_item -->|"invokes item callbacks"| node_app
node_todo_routes -->|"validates with"| node_schemas
node_todo_routes -->|"reads and writes"| node_prisma_client
node_prisma_client -.->|"persists records"| node_todo_store
node_api_server -->|"registers middleware"| node_error_handling
node_todo_routes -->|"throws HTTP errors"| node_error_handling
node_app -->|"uses types"| node_todo_types
node_api_client -->|"uses types"| node_todo_types

click node_app_mount "https://github.com/balisng/blicktechapi_151069/blob/master/client/src/main.tsx"
click node_app "https://github.com/balisng/blicktechapi_151069/blob/master/client/src/App.tsx"
click node_api_client "https://github.com/balisng/blicktechapi_151069/blob/master/client/src/api.ts"
click node_filter_bar "https://github.com/balisng/blicktechapi_151069/blob/master/client/src/components/FilterBar.tsx"
click node_todo_form "https://github.com/balisng/blicktechapi_151069/blob/master/client/src/components/TodoForm.tsx"
click node_todo_list "https://github.com/balisng/blicktechapi_151069/blob/master/client/src/components/TodoList.tsx"
click node_todo_item "https://github.com/balisng/blicktechapi_151069/blob/master/client/src/components/TodoItem.tsx"
click node_todo_types "https://github.com/balisng/blicktechapi_151069/blob/master/client/src/types.ts"
click node_api_server "https://github.com/balisng/blicktechapi_151069/blob/master/server/src/index.ts"
click node_todo_routes "https://github.com/balisng/blicktechapi_151069/blob/master/server/src/routes/todos.ts"
click node_schemas "https://github.com/balisng/blicktechapi_151069/blob/master/server/src/schemas.ts"
click node_error_handling "https://github.com/balisng/blicktechapi_151069/blob/master/server/src/errors.ts"
click node_prisma_client "https://github.com/balisng/blicktechapi_151069/blob/master/server/src/db.ts"
click node_todo_store "https://github.com/balisng/blicktechapi_151069/blob/master/server/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_app_mount,node_app,node_api_client,node_filter_bar,node_todo_form,node_todo_list,node_todo_item,node_todo_types,node_user toneBlue
class node_api_server,node_todo_routes,node_schemas,node_error_handling toneAmber
class node_prisma_client,node_todo_store toneMint
```

## Components

### Todo web client

- [App mount](https://github.com/balisng/blicktechapi_151069/blob/master/client/src/main.tsx): `client/src/main.tsx`
- [Todo app](https://github.com/balisng/blicktechapi_151069/blob/master/client/src/App.tsx): `client/src/App.tsx`
- [API client](https://github.com/balisng/blicktechapi_151069/blob/master/client/src/api.ts): `client/src/api.ts`
- [Filter bar](https://github.com/balisng/blicktechapi_151069/blob/master/client/src/components/FilterBar.tsx): `client/src/components/FilterBar.tsx`
- [Todo form](https://github.com/balisng/blicktechapi_151069/blob/master/client/src/components/TodoForm.tsx): `client/src/components/TodoForm.tsx`
- [Todo list](https://github.com/balisng/blicktechapi_151069/blob/master/client/src/components/TodoList.tsx): `client/src/components/TodoList.tsx`
- [Todo item](https://github.com/balisng/blicktechapi_151069/blob/master/client/src/components/TodoItem.tsx): `client/src/components/TodoItem.tsx`
- [Todo types](https://github.com/balisng/blicktechapi_151069/blob/master/client/src/types.ts): `client/src/types.ts`

### Todo API

- [API bootstrap](https://github.com/balisng/blicktechapi_151069/blob/master/server/src/index.ts): `server/src/index.ts`
- [Todo routes](https://github.com/balisng/blicktechapi_151069/blob/master/server/src/routes/todos.ts): `server/src/routes/todos.ts`
- [Request schemas](https://github.com/balisng/blicktechapi_151069/blob/master/server/src/schemas.ts): `server/src/schemas.ts`
- [Error handling](https://github.com/balisng/blicktechapi_151069/blob/master/server/src/errors.ts): `server/src/errors.ts`

### Todo persistence

- [Prisma client](https://github.com/balisng/blicktechapi_151069/blob/master/server/src/db.ts): `server/src/db.ts`
- [Todo database](https://github.com/balisng/blicktechapi_151069/blob/master/server/prisma/schema.prisma): `server/prisma/schema.prisma`

### Other components

- **User**

## Connections

- User → App mount: uses (evidence: `client/src/main.tsx`)
- App mount → Todo app: renders (evidence: `client/src/main.tsx`)
- Todo app → API client: requests todos (evidence: `client/src/App.tsx`)
- API client → API bootstrap: calls API (evidence: `client/src/api.ts`)
- API bootstrap → Todo routes: mounts routes (evidence: `server/src/index.ts`)
- Todo app → Todo form: renders (evidence: `client/src/App.tsx`)
- Todo app → Filter bar: renders (evidence: `client/src/App.tsx`)
- Todo app → Todo list: renders (evidence: `client/src/App.tsx`)
- Todo form → Todo app: invokes add callback (evidence: `client/src/components/TodoForm.tsx`)
- Filter bar → Todo app: updates filter (evidence: `client/src/components/FilterBar.tsx`)
- Todo list → Todo item: renders (evidence: `client/src/components/TodoList.tsx`)
- Todo item → Todo app: invokes item callbacks (evidence: `client/src/components/TodoItem.tsx`)
- Todo routes → Request schemas: validates with (evidence: `server/src/routes/todos.ts`)
- Todo routes → Prisma client: reads and writes (evidence: `server/src/routes/todos.ts`)
- Prisma client → Todo database: persists records
- API bootstrap → Error handling: registers middleware (evidence: `server/src/index.ts`)
- Todo routes → Error handling: throws HTTP errors (evidence: `server/src/routes/todos.ts`)
- Todo app → Todo types: uses types (evidence: `client/src/App.tsx`)
- API client → Todo types: uses types (evidence: `client/src/api.ts`)
