# anas17ahmed/task-management-system-sl-nestjs-assignment architecture

> Architecture diagram of the GitHub repository anas17ahmed/task-management-system-sl-nestjs-assignment, 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/anas17ahmed/task-management-system-sl-nestjs-assignment
- Repository: https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment

## Overview

A NestJS task-management API supports task CRUD and filtering, user registration and profile operations, and JWT login. The principal workflow is an HTTP request entering a controller, which delegates to a service and returns a result; task state is held in memory, while user records use SQLite configured in memory. The graph includes authentication and exception handling. Task routes and service behavior are excerpted; user persistence and guard internals are not, so those implementation details are represented conservatively.

Main entry points: [`src/app.module.ts`](https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/app.module.ts) (Application wiring), [`src/task/task.controller.ts`](https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/task/task.controller.ts) (Task routes), [`src/user/user.controller.ts`](https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/user/user.controller.ts) (User routes), [`src/user/user.service.ts`](https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/user/user.service.ts) (User operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application runtime"]
  node_bootstrap["Nest bootstrap<br/>[main.ts]"]
  node_appmodule["Application wiring<br/>[app.module.ts]"]
  node_hello["Root endpoint<br/>[app.controller.ts]"]
  node_appservice["Greeting service<br/>[app.service.ts]"]
end

subgraph group_tasks["Task management"]
  node_taskapi["Task routes<br/>[task.controller.ts]"]
  node_taskservice["Task operations<br/>[task.service.ts]"]
  node_taskmodel["Task model<br/>[task.entity.ts]"]
end

subgraph group_identity["Users and authentication"]
  node_authapi["Login endpoint<br/>[auth.controller.ts]"]
  node_authservice["Credential and token service<br/>[auth.service.ts]"]
  node_authguard["Route guard<br/>[auth.guard.ts]"]
  node_userapi["User routes<br/>[user.controller.ts]"]
  node_userservice["User operations<br/>[user.service.ts]"]
  node_userdto["Registration input<br/>[create-user.dto.ts]"]
  node_usermodel["User model<br/>[user.entity.ts]"]
end

subgraph group_storage["State and errors"]
  node_taskstate[("In-memory task list<br/>[task.service.ts]")]
  node_sqlite[("In-memory SQLite<br/>[app.module.ts]")]
  node_exceptionfilter["HTTP exception filter"]
end

node_client(("API client"))

node_client -->|"requests"| node_hello
node_client -->|"uses task API"| node_taskapi
node_client -->|"logs in"| node_authapi
node_client -->|"manages users"| node_userapi
node_bootstrap -->|"loads"| node_appmodule
node_appmodule -->|"registers"| node_hello
node_hello -->|"calls"| node_appservice
node_appmodule -->|"configures"| node_sqlite
node_appmodule -->|"registers module"| node_taskapi
node_appmodule -->|"registers module"| node_userapi
node_appmodule -->|"registers module"| node_authapi
node_taskapi -->|"delegates"| node_taskservice
node_taskservice -->|"reads and writes"| node_taskstate
node_taskapi -->|"accepts and returns"| node_taskmodel
node_taskapi -->|"guards routes"| node_authguard
node_taskapi -->|"uses filter"| node_exceptionfilter
node_authapi -->|"delegates"| node_authservice
node_authservice -->|"looks up user"| node_userservice
node_authservice -->|"validates credentials"| node_usermodel
node_userapi -->|"delegates"| node_userservice
node_userapi -->|"accepts registration input"| node_userdto
node_userapi -->|"guards profile routes"| node_authguard
node_userapi -->|"uses filter"| node_exceptionfilter
node_userservice -->|"creates and updates"| node_usermodel
node_userservice -->|"creates from"| node_userdto
node_userservice -.->|"persists users"| node_sqlite

click node_bootstrap "https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/main.ts"
click node_appmodule "https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/app.module.ts"
click node_hello "https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/app.controller.ts"
click node_appservice "https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/app.service.ts"
click node_taskapi "https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/task/task.controller.ts"
click node_taskservice "https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/task/task.service.ts"
click node_taskmodel "https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/task/task.entity.ts"
click node_taskstate "https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/task/task.service.ts"
click node_authapi "https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/auth/auth.controller.ts"
click node_authservice "https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/auth/auth.service.ts"
click node_authguard "https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/auth/auth.guard.ts"
click node_userapi "https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/user/user.controller.ts"
click node_userservice "https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/user/user.service.ts"
click node_userdto "https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/user/dto/create-user.dto.ts"
click node_usermodel "https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/user/user.entity.ts"
click node_sqlite "https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/app.module.ts"
click node_exceptionfilter "https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/common/filters/http-exception.filter.ts"

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_bootstrap,node_appmodule,node_hello,node_appservice,node_client toneBlue
class node_taskapi,node_taskservice,node_taskmodel toneAmber
class node_authapi,node_authservice,node_authguard,node_userapi,node_userservice,node_userdto,node_usermodel toneMint
class node_taskstate,node_sqlite,node_exceptionfilter toneRose
```

## Components

### Application runtime

- [Nest bootstrap](https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/main.ts): `src/main.ts`
- [Application wiring](https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/app.module.ts): `src/app.module.ts`
- [Root endpoint](https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/app.controller.ts): `src/app.controller.ts`
- [Greeting service](https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/app.service.ts): `src/app.service.ts`

### Task management

- [Task routes](https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/task/task.controller.ts): `src/task/task.controller.ts`
- [Task operations](https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/task/task.service.ts): `src/task/task.service.ts`
- [Task model](https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/task/task.entity.ts): `src/task/task.entity.ts`

### Users and authentication

- [Login endpoint](https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/auth/auth.controller.ts): `src/auth/auth.controller.ts`
- [Credential and token service](https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/auth/auth.service.ts): `src/auth/auth.service.ts`
- [Route guard](https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/auth/auth.guard.ts): `src/auth/auth.guard.ts`
- [User routes](https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/user/user.controller.ts): `src/user/user.controller.ts`
- [User operations](https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/user/user.service.ts): `src/user/user.service.ts`
- [Registration input](https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/user/dto/create-user.dto.ts): `src/user/dto/create-user.dto.ts`
- [User model](https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/user/user.entity.ts): `src/user/user.entity.ts`

### State and errors

- [In-memory task list](https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/task/task.service.ts): `src/task/task.service.ts`
- [In-memory SQLite](https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/app.module.ts): `src/app.module.ts`
- [HTTP exception filter](https://github.com/anas17ahmed/task-management-system-sl-nestjs-assignment/blob/main/src/common/filters/http-exception.filter.ts): `src/common/filters/http-exception.filter.ts`

### Other components

- **API client**

## Connections

- API client → Root endpoint: requests (evidence: `src/app.controller.ts`)
- API client → Task routes: uses task API (evidence: `README.md`)
- API client → Login endpoint: logs in (evidence: `src/auth/auth.controller.ts`)
- API client → User routes: manages users (evidence: `src/user/user.controller.ts`)
- Nest bootstrap → Application wiring: loads (evidence: `src/main.ts`)
- Application wiring → Root endpoint: registers (evidence: `src/app.module.ts`)
- Root endpoint → Greeting service: calls (evidence: `src/app.controller.ts`)
- Application wiring → In-memory SQLite: configures (evidence: `src/app.module.ts`)
- Application wiring → Task routes: registers module (evidence: `src/app.module.ts`)
- Application wiring → User routes: registers module (evidence: `src/app.module.ts`)
- Application wiring → Login endpoint: registers module (evidence: `src/app.module.ts`)
- Task routes → Task operations: delegates (evidence: `src/task/task.controller.ts`)
- Task operations → In-memory task list: reads and writes (evidence: `src/task/task.service.ts`)
- Task routes → Task model: accepts and returns (evidence: `src/task/task.controller.ts`)
- Task routes → Route guard: guards routes (evidence: `src/task/task.controller.ts`)
- Task routes → HTTP exception filter: uses filter (evidence: `src/task/task.controller.ts`)
- Login endpoint → Credential and token service: delegates (evidence: `src/auth/auth.controller.ts`)
- Credential and token service → User operations: looks up user (evidence: `src/auth/auth.service.ts`)
- Credential and token service → User model: validates credentials (evidence: `src/auth/auth.service.ts`)
- User routes → User operations: delegates (evidence: `src/user/user.controller.ts`)
- User routes → Registration input: accepts registration input (evidence: `src/user/user.controller.ts`)
- User routes → Route guard: guards profile routes (evidence: `src/user/user.controller.ts`)
- User routes → HTTP exception filter: uses filter (evidence: `src/user/user.controller.ts`)
- User operations → User model: creates and updates (evidence: `src/user/user.service.ts`)
- User operations → Registration input: creates from (evidence: `src/user/user.service.ts`)
- User operations → In-memory SQLite: persists users
