# oxilonx/chouf-dev architecture

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

- Interactive diagram: https://gitdiagram.com/oxilonx/chouf-dev
- Repository: https://github.com/oxilonx/chouf-dev

## Overview

ChoufDev is a developer-discovery platform focused on making Algerian tech talent visible to clients and teams. The intended user journey spans public discovery and account access, with developer profiles, skills, portfolios, and location represented in shared API types. The sampled backend exposes session/auth handling and a user-list endpoint; the user controller queries profiles with location and skills. Frontend discovery features are present in the tree, but their data-fetching links were not shown, so those connections are left out. Auth client-to-server communication is shown as unverified.

Main entry points: [`frontend/src/app`](https://github.com/oxilonx/chouf-dev/tree/main/frontend/src/app) (Web application), [`backend/src/prisma.ts`](https://github.com/oxilonx/chouf-dev/blob/main/backend/src/prisma.ts) (Prisma client), [`backend/src/server.ts`](https://github.com/oxilonx/chouf-dev/blob/main/backend/src/server.ts) (Express API server), [`backend/src/auth.ts`](https://github.com/oxilonx/chouf-dev/blob/main/backend/src/auth.ts) (Authentication service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Frontend experience"]
  node_frontend["Web application"]
  node_guest["Public discovery<br/>[GuestHome.tsx]"]
  node_userhome["Developer home<br/>[UserHome.tsx]"]
  node_discoveryui["Search and profiles"]
  node_marketing["Landing and onboarding"]
  node_about["About and stack<br/>[AboutAppInfos.tsx]"]
  node_authforms["Sign-in and signup"]
end

subgraph group_identity["Identity and API"]
  node_authclient["Browser auth client<br/>[auth-client.ts]"]
  node_api["Express API server<br/>[server.ts]"]
  node_auth["Authentication service<br/>[auth.ts]"]
  node_useroutes["User routes<br/>[user.routes.ts]"]
end

subgraph group_data["Developer data"]
  node_usercontroller["User queries<br/>[user.controller.ts]"]
  node_prisma["Prisma client<br/>[prisma.ts]"]
  node_postgres[("PostgreSQL database")]
  node_seed["Location and skill seed<br/>[seed.ts]"]
end

subgraph group_contracts["Shared contracts"]
  node_types["API domain types<br/>[api.types.ts]"]
end

node_visitor(("Visitor or client"))

node_visitor -->|"uses"| node_frontend
node_frontend -.->|"renders"| node_guest
node_frontend -.->|"renders"| node_userhome
node_frontend -.->|"renders"| node_marketing
node_frontend -.->|"renders"| node_about
node_frontend -.->|"renders"| node_authforms
node_authclient -.->|"auth requests"| node_api
node_api -->|"dispatches auth"| node_auth
node_api -->|"mounts routes"| node_useroutes
node_useroutes -->|"routes to"| node_usercontroller
node_usercontroller -->|"queries users"| node_prisma
node_auth -->|"uses adapter"| node_prisma
node_prisma -->|"connects"| node_postgres
node_seed -->|"seeds records"| node_prisma

click node_frontend "https://github.com/oxilonx/chouf-dev/tree/main/frontend/src/app"
click node_guest "https://github.com/oxilonx/chouf-dev/blob/main/frontend/src/pages/GuestHome.tsx"
click node_userhome "https://github.com/oxilonx/chouf-dev/blob/main/frontend/src/pages/UserHome.tsx"
click node_discoveryui "https://github.com/oxilonx/chouf-dev/tree/main/frontend/src/components/local/UserHomeComps"
click node_marketing "https://github.com/oxilonx/chouf-dev/tree/main/frontend/src/sections"
click node_about "https://github.com/oxilonx/chouf-dev/blob/main/frontend/src/components/local/AboutAppInfos.tsx"
click node_authforms "https://github.com/oxilonx/chouf-dev/tree/main/frontend/src/components/local"
click node_authclient "https://github.com/oxilonx/chouf-dev/blob/main/frontend/src/lib/auth-client.ts"
click node_api "https://github.com/oxilonx/chouf-dev/blob/main/backend/src/server.ts"
click node_auth "https://github.com/oxilonx/chouf-dev/blob/main/backend/src/auth.ts"
click node_useroutes "https://github.com/oxilonx/chouf-dev/blob/main/backend/src/routes/user.routes.ts"
click node_usercontroller "https://github.com/oxilonx/chouf-dev/blob/main/backend/src/controllers/user.controller.ts"
click node_prisma "https://github.com/oxilonx/chouf-dev/blob/main/backend/src/prisma.ts"
click node_seed "https://github.com/oxilonx/chouf-dev/blob/main/backend/prisma/seed.ts"
click node_types "https://github.com/oxilonx/chouf-dev/blob/main/shared/src/api.types.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_frontend,node_guest,node_userhome,node_discoveryui,node_marketing,node_about,node_authforms,node_visitor toneBlue
class node_authclient,node_api,node_auth,node_useroutes toneAmber
class node_usercontroller,node_prisma,node_postgres,node_seed toneMint
class node_types toneRose
```

## Components

### Frontend experience

- [Web application](https://github.com/oxilonx/chouf-dev/tree/main/frontend/src/app): `frontend/src/app`
- [Public discovery](https://github.com/oxilonx/chouf-dev/blob/main/frontend/src/pages/GuestHome.tsx): `frontend/src/pages/GuestHome.tsx`
- [Developer home](https://github.com/oxilonx/chouf-dev/blob/main/frontend/src/pages/UserHome.tsx): `frontend/src/pages/UserHome.tsx`
- [Search and profiles](https://github.com/oxilonx/chouf-dev/tree/main/frontend/src/components/local/UserHomeComps): `frontend/src/components/local/UserHomeComps`
- [Landing and onboarding](https://github.com/oxilonx/chouf-dev/tree/main/frontend/src/sections): `frontend/src/sections`
- [About and stack](https://github.com/oxilonx/chouf-dev/blob/main/frontend/src/components/local/AboutAppInfos.tsx): `frontend/src/components/local/AboutAppInfos.tsx`
- [Sign-in and signup](https://github.com/oxilonx/chouf-dev/tree/main/frontend/src/components/local): `frontend/src/components/local`

### Identity and API

- [Browser auth client](https://github.com/oxilonx/chouf-dev/blob/main/frontend/src/lib/auth-client.ts): `frontend/src/lib/auth-client.ts`
- [Express API server](https://github.com/oxilonx/chouf-dev/blob/main/backend/src/server.ts): `backend/src/server.ts`
- [Authentication service](https://github.com/oxilonx/chouf-dev/blob/main/backend/src/auth.ts): `backend/src/auth.ts`
- [User routes](https://github.com/oxilonx/chouf-dev/blob/main/backend/src/routes/user.routes.ts): `backend/src/routes/user.routes.ts`

### Developer data

- [User queries](https://github.com/oxilonx/chouf-dev/blob/main/backend/src/controllers/user.controller.ts): `backend/src/controllers/user.controller.ts`
- [Prisma client](https://github.com/oxilonx/chouf-dev/blob/main/backend/src/prisma.ts): `backend/src/prisma.ts`
- **PostgreSQL database**
- [Location and skill seed](https://github.com/oxilonx/chouf-dev/blob/main/backend/prisma/seed.ts): `backend/prisma/seed.ts`

### Shared contracts

- [API domain types](https://github.com/oxilonx/chouf-dev/blob/main/shared/src/api.types.ts): `shared/src/api.types.ts`

### Other components

- **Visitor or client**

## Connections

- Visitor or client → Web application: uses
- Web application → Public discovery: renders
- Web application → Developer home: renders
- Web application → Landing and onboarding: renders
- Web application → About and stack: renders
- Web application → Sign-in and signup: renders
- Browser auth client → Express API server: auth requests
- Express API server → Authentication service: dispatches auth (evidence: `backend/src/server.ts`)
- Express API server → User routes: mounts routes (evidence: `backend/src/server.ts`)
- User routes → User queries: routes to (evidence: `backend/src/routes/user.routes.ts`)
- User queries → Prisma client: queries users (evidence: `backend/src/controllers/user.controller.ts`)
- Authentication service → Prisma client: uses adapter (evidence: `backend/src/auth.ts`)
- Prisma client → PostgreSQL database: connects (evidence: `backend/src/prisma.ts`)
- Location and skill seed → Prisma client: seeds records (evidence: `backend/prisma/seed.ts`)
