# devxniv/landed architecture

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

- Interactive diagram: https://gitdiagram.com/devxniv/landed
- Repository: https://github.com/devxniv/landed

## Overview

Landed is presented as a job-application tracker with analytics, but the available runtime excerpts chiefly implement registration and login. The visible workflow is a user entering credentials in the React client, which calls Express authentication routes; the server validates input, queries PostgreSQL, and returns a response. The migrations indicate resume, application, interview-round, and task data models, but their runtime workflows and the analytics dashboard are not shown. The graph preserves those documented product stages without inventing their connections.

Main entry points: [`Server/src/controllers/authUser.controller.js`](https://github.com/devxniv/landed/blob/main/Server/src/controllers/authUser.controller.js) (Registration and login), [`Server/src/routes/auth.routes.js`](https://github.com/devxniv/landed/blob/main/Server/src/routes/auth.routes.js) (Auth routes), [`Client/src/context/AuthContext.jsx`](https://github.com/devxniv/landed/blob/main/Client/src/context/AuthContext.jsx) (Auth session), [`Server/src/controllers/healthcheck.controller.js`](https://github.com/devxniv/landed/blob/main/Server/src/controllers/healthcheck.controller.js) (Health response)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_app["Client routing<br/>[App.jsx]"]
  node_auth_pages["Login and register"]
  node_auth_context["Auth session<br/>[AuthContext.jsx]"]
  node_auth_hook["Auth hook<br/>[useAuth.js]"]
  node_analytics["Analytics dashboard"]
end

subgraph group_server["API server"]
  node_express_app["API routing<br/>[app.js]"]
  node_auth_routes["Auth routes<br/>[auth.routes.js]"]
  node_validators["Request validators"]
  node_validator_middleware["Validation middleware"]
  node_auth_controller["Registration and login"]
  node_jwt_middleware["JWT verification<br/>[auth.middleware.js]"]
  node_health_route["Health route"]
  node_health_controller["Health response"]
end

subgraph group_data["Persistence"]
  node_pool["PostgreSQL pool<br/>[dbConnection.js]"]
  node_postgres[("PostgreSQL")]
  node_schema[("Domain schema")]
end

subgraph group_shared["Shared utilities"]
  node_api_response["API response<br/>[apiResponse.js]"]
  node_api_error["API errors<br/>[apiError.js]"]
  node_async_handler["Async handler<br/>[asyncHandler.js]"]
end

node_user(("User"))
node_browser_storage[("Browser storage")]

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_auth_pages
node_auth_pages -.->|"authenticates via"| node_auth_context
node_auth_hook -->|"reads"| node_auth_context
node_auth_context -->|"persists session"| node_browser_storage
node_auth_context -->|"posts credentials"| node_auth_routes
node_express_app -->|"mounts"| node_auth_routes
node_express_app -->|"mounts"| node_health_route
node_auth_routes -->|"uses rules"| node_validators
node_auth_routes -->|"validates with"| node_validator_middleware
node_auth_routes -->|"dispatches to"| node_auth_controller
node_auth_controller -->|"queries"| node_pool
node_pool -->|"connects to"| node_postgres
node_schema -.->|"defines tables"| node_postgres
node_health_route -->|"dispatches to"| node_health_controller
node_auth_controller -->|"formats response"| node_api_response
node_auth_controller -->|"raises errors"| node_api_error
node_auth_controller -->|"wraps handler"| node_async_handler
node_health_controller -->|"formats response"| node_api_response
node_health_controller -->|"wraps handler"| node_async_handler
node_jwt_middleware -->|"looks up user"| node_pool

click node_app "https://github.com/devxniv/landed/blob/main/Client/src/App.jsx"
click node_auth_pages "https://github.com/devxniv/landed/tree/main/Client/src/pages"
click node_auth_context "https://github.com/devxniv/landed/blob/main/Client/src/context/AuthContext.jsx"
click node_auth_hook "https://github.com/devxniv/landed/blob/main/Client/src/context/useAuth.js"
click node_express_app "https://github.com/devxniv/landed/blob/main/Server/src/app.js"
click node_auth_routes "https://github.com/devxniv/landed/blob/main/Server/src/routes/auth.routes.js"
click node_validators "https://github.com/devxniv/landed/tree/main/Server/src/validators"
click node_validator_middleware "https://github.com/devxniv/landed/blob/main/Server/src/middlewares/validator.middleware.js"
click node_auth_controller "https://github.com/devxniv/landed/blob/main/Server/src/controllers/authUser.controller.js"
click node_jwt_middleware "https://github.com/devxniv/landed/blob/main/Server/src/middlewares/auth.middleware.js"
click node_health_route "https://github.com/devxniv/landed/blob/main/Server/src/routes/healthcheck.route.js"
click node_health_controller "https://github.com/devxniv/landed/blob/main/Server/src/controllers/healthcheck.controller.js"
click node_pool "https://github.com/devxniv/landed/blob/main/Server/src/db/dbConnection.js"
click node_schema "https://github.com/devxniv/landed/tree/main/Server/src/db/migrations"
click node_api_response "https://github.com/devxniv/landed/blob/main/Server/src/utils/apiResponse.js"
click node_api_error "https://github.com/devxniv/landed/blob/main/Server/src/utils/apiError.js"
click node_async_handler "https://github.com/devxniv/landed/blob/main/Server/src/utils/asyncHandler.js"
click node_analytics "https://github.com/devxniv/landed/tree/main/Client/src"

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,node_auth_pages,node_auth_context,node_auth_hook,node_analytics,node_user toneBlue
class node_express_app,node_auth_routes,node_validators,node_validator_middleware,node_auth_controller,node_jwt_middleware,node_health_route,node_health_controller,node_browser_storage toneAmber
class node_pool,node_postgres,node_schema toneMint
class node_api_response,node_api_error,node_async_handler toneRose
```

## Components

### Web client

- [Client routing](https://github.com/devxniv/landed/blob/main/Client/src/App.jsx): `Client/src/App.jsx`
- [Login and register](https://github.com/devxniv/landed/tree/main/Client/src/pages): `Client/src/pages`
- [Auth session](https://github.com/devxniv/landed/blob/main/Client/src/context/AuthContext.jsx): `Client/src/context/AuthContext.jsx`
- [Auth hook](https://github.com/devxniv/landed/blob/main/Client/src/context/useAuth.js): `Client/src/context/useAuth.js`
- [Analytics dashboard](https://github.com/devxniv/landed/tree/main/Client/src): `Client/src`

### API server

- [API routing](https://github.com/devxniv/landed/blob/main/Server/src/app.js): `Server/src/app.js`
- [Auth routes](https://github.com/devxniv/landed/blob/main/Server/src/routes/auth.routes.js): `Server/src/routes/auth.routes.js`
- [Request validators](https://github.com/devxniv/landed/tree/main/Server/src/validators): `Server/src/validators`
- [Validation middleware](https://github.com/devxniv/landed/blob/main/Server/src/middlewares/validator.middleware.js): `Server/src/middlewares/validator.middleware.js`
- [Registration and login](https://github.com/devxniv/landed/blob/main/Server/src/controllers/authUser.controller.js): `Server/src/controllers/authUser.controller.js`
- [JWT verification](https://github.com/devxniv/landed/blob/main/Server/src/middlewares/auth.middleware.js): `Server/src/middlewares/auth.middleware.js`
- [Health route](https://github.com/devxniv/landed/blob/main/Server/src/routes/healthcheck.route.js): `Server/src/routes/healthcheck.route.js`
- [Health response](https://github.com/devxniv/landed/blob/main/Server/src/controllers/healthcheck.controller.js): `Server/src/controllers/healthcheck.controller.js`

### Persistence

- [PostgreSQL pool](https://github.com/devxniv/landed/blob/main/Server/src/db/dbConnection.js): `Server/src/db/dbConnection.js`
- **PostgreSQL**
- [Domain schema](https://github.com/devxniv/landed/tree/main/Server/src/db/migrations): `Server/src/db/migrations`

### Shared utilities

- [API response](https://github.com/devxniv/landed/blob/main/Server/src/utils/apiResponse.js): `Server/src/utils/apiResponse.js`
- [API errors](https://github.com/devxniv/landed/blob/main/Server/src/utils/apiError.js): `Server/src/utils/apiError.js`
- [Async handler](https://github.com/devxniv/landed/blob/main/Server/src/utils/asyncHandler.js): `Server/src/utils/asyncHandler.js`

### Other components

- **User**
- **Browser storage**

## Connections

- User → Client routing: uses (evidence: `Client/src/App.jsx`)
- Client routing → Login and register: routes to (evidence: `Client/src/App.jsx`)
- Login and register → Auth session: authenticates via
- Auth hook → Auth session: reads (evidence: `Client/src/context/useAuth.js`)
- Auth session → Browser storage: persists session (evidence: `Client/src/context/AuthContext.jsx`)
- Auth session → Auth routes: posts credentials (evidence: `Client/src/context/AuthContext.jsx`)
- API routing → Auth routes: mounts (evidence: `Server/src/app.js`)
- API routing → Health route: mounts (evidence: `Server/src/app.js`)
- Auth routes → Request validators: uses rules (evidence: `Server/src/routes/auth.routes.js`)
- Auth routes → Validation middleware: validates with (evidence: `Server/src/routes/auth.routes.js`)
- Auth routes → Registration and login: dispatches to (evidence: `Server/src/routes/auth.routes.js`)
- Registration and login → PostgreSQL pool: queries (evidence: `Server/src/controllers/authUser.controller.js`)
- PostgreSQL pool → PostgreSQL: connects to (evidence: `Server/src/db/dbConnection.js`)
- Domain schema → PostgreSQL: defines tables
- Health route → Health response: dispatches to (evidence: `Server/src/routes/healthcheck.route.js`)
- Registration and login → API response: formats response (evidence: `Server/src/controllers/authUser.controller.js`)
- Registration and login → API errors: raises errors (evidence: `Server/src/controllers/authUser.controller.js`)
- Registration and login → Async handler: wraps handler (evidence: `Server/src/controllers/authUser.controller.js`)
- Health response → API response: formats response (evidence: `Server/src/controllers/healthcheck.controller.js`)
- Health response → Async handler: wraps handler (evidence: `Server/src/controllers/healthcheck.controller.js`)
- JWT verification → PostgreSQL pool: looks up user (evidence: `Server/src/middlewares/auth.middleware.js`)
