# ogulcantekines/portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/ogulcantekines/portfolio
- Repository: https://github.com/ogulcantekines/portfolio

## Overview

Portfolio is a content-managed personal website: visitors browse profile, projects, and blog content or submit a contact message; an authenticated admin edits that content. The frontend is a Next.js app, while an Express REST API validates requests and delegates database work through services to Prisma and PostgreSQL. The README documents the backend layer sequence and major capabilities; excerpts confirm homepage/contact requests and service persistence. Some frontend-to-API connections and route wiring are documented but not visible in sampled source, so those edges cite the README.

Main entry points: [`apps/backend/src/controllers`](https://github.com/ogulcantekines/portfolio/tree/main/apps/backend/src/controllers) (Domain controllers), [`apps/frontend/app`](https://github.com/ogulcantekines/portfolio/tree/main/apps/frontend/app) (Public site), [`apps/backend/src/app.ts`](https://github.com/ogulcantekines/portfolio/blob/main/apps/backend/src/app.ts) (API app), [`apps/frontend/app/page.tsx`](https://github.com/ogulcantekines/portfolio/blob/main/apps/frontend/app/page.tsx) (Home profile)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Public frontend"]
  node_public_site["Public site"]
  node_home["Home profile<br/>[page.tsx]"]
  node_project_pages["Project pages"]
  node_blog_pages["Blog pages"]
  node_contact_form["Contact form<br/>[page.tsx]"]
  node_motion["Motion components"]
end

subgraph group_admin["Admin experience"]
  node_admin_dashboard["Admin dashboard"]
  node_admin_api["Admin API client<br/>[adminApi.ts]"]
end

subgraph group_backend["REST backend"]
  node_backend_app["API app<br/>[app.ts]"]
  node_api_routes["API routes"]
  node_auth["Login and auth<br/>[auth.controller.ts]"]
  node_controllers["Domain controllers"]
  node_services["Domain services"]
  node_pagination["Pagination<br/>[pagination.ts]"]
end

subgraph group_data["Shared data"]
  node_prisma["Prisma client<br/>[prisma.ts]"]
  node_postgres[("PostgreSQL")]
  node_shared_schemas["Shared schemas<br/>[schemas.ts]"]
  node_contact_records["Contact messages<br/>[contact.service.ts]"]
end

node_visitor(("Visitor"))

node_visitor -->|"browses"| node_public_site
node_public_site -->|"renders"| node_home
node_home -->|"renders"| node_motion
node_home -->|"fetches profile"| node_backend_app
node_public_site -->|"offers projects"| node_project_pages
node_public_site -->|"offers blog"| node_blog_pages
node_visitor -->|"submits message"| node_contact_form
node_contact_form -->|"posts contact"| node_backend_app
node_visitor -->|"manages content"| node_admin_dashboard
node_admin_dashboard -.->|"uses API client"| node_admin_api
node_admin_api -->|"calls REST API"| node_backend_app
node_backend_app -->|"mounts routes"| node_api_routes
node_api_routes -->|"dispatches requests"| node_controllers
node_api_routes -->|"routes login"| node_auth
node_controllers -->|"delegates work"| node_services
node_controllers -->|"validates input"| node_shared_schemas
node_controllers -->|"paginates results"| node_pagination
node_services -->|"queries through"| node_prisma
node_prisma -->|"reads and writes"| node_postgres
node_controllers -->|"delegates contact"| node_contact_records
node_contact_records -->|"persists through"| node_prisma

click node_public_site "https://github.com/ogulcantekines/portfolio/tree/main/apps/frontend/app"
click node_home "https://github.com/ogulcantekines/portfolio/blob/main/apps/frontend/app/page.tsx"
click node_project_pages "https://github.com/ogulcantekines/portfolio/tree/main/apps/frontend/app/projects"
click node_blog_pages "https://github.com/ogulcantekines/portfolio/tree/main/apps/frontend/app/blog"
click node_contact_form "https://github.com/ogulcantekines/portfolio/blob/main/apps/frontend/app/contact/page.tsx"
click node_motion "https://github.com/ogulcantekines/portfolio/tree/main/apps/frontend/components"
click node_admin_dashboard "https://github.com/ogulcantekines/portfolio/tree/main/apps/frontend/app/admin"
click node_admin_api "https://github.com/ogulcantekines/portfolio/blob/main/apps/frontend/lib/adminApi.ts"
click node_backend_app "https://github.com/ogulcantekines/portfolio/blob/main/apps/backend/src/app.ts"
click node_api_routes "https://github.com/ogulcantekines/portfolio/tree/main/apps/backend/src/routes"
click node_auth "https://github.com/ogulcantekines/portfolio/blob/main/apps/backend/src/controllers/auth.controller.ts"
click node_controllers "https://github.com/ogulcantekines/portfolio/tree/main/apps/backend/src/controllers"
click node_services "https://github.com/ogulcantekines/portfolio/tree/main/apps/backend/src/services"
click node_pagination "https://github.com/ogulcantekines/portfolio/blob/main/apps/backend/src/lib/pagination.ts"
click node_prisma "https://github.com/ogulcantekines/portfolio/blob/main/apps/backend/src/lib/prisma.ts"
click node_shared_schemas "https://github.com/ogulcantekines/portfolio/blob/main/packages/shared/src/schemas.ts"
click node_contact_records "https://github.com/ogulcantekines/portfolio/blob/main/apps/backend/src/services/contact.service.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_public_site,node_home,node_project_pages,node_blog_pages,node_contact_form,node_motion toneBlue
class node_admin_dashboard,node_admin_api toneAmber
class node_backend_app,node_api_routes,node_auth,node_controllers,node_services,node_pagination toneMint
class node_prisma,node_postgres,node_shared_schemas,node_contact_records toneRose
class node_visitor toneIndigo
```

## Components

### Public frontend

- [Public site](https://github.com/ogulcantekines/portfolio/tree/main/apps/frontend/app): `apps/frontend/app`
- [Home profile](https://github.com/ogulcantekines/portfolio/blob/main/apps/frontend/app/page.tsx): `apps/frontend/app/page.tsx`
- [Project pages](https://github.com/ogulcantekines/portfolio/tree/main/apps/frontend/app/projects): `apps/frontend/app/projects`
- [Blog pages](https://github.com/ogulcantekines/portfolio/tree/main/apps/frontend/app/blog): `apps/frontend/app/blog`
- [Contact form](https://github.com/ogulcantekines/portfolio/blob/main/apps/frontend/app/contact/page.tsx): `apps/frontend/app/contact/page.tsx`
- [Motion components](https://github.com/ogulcantekines/portfolio/tree/main/apps/frontend/components): `apps/frontend/components`

### Admin experience

- [Admin dashboard](https://github.com/ogulcantekines/portfolio/tree/main/apps/frontend/app/admin): `apps/frontend/app/admin`
- [Admin API client](https://github.com/ogulcantekines/portfolio/blob/main/apps/frontend/lib/adminApi.ts): `apps/frontend/lib/adminApi.ts`

### REST backend

- [API app](https://github.com/ogulcantekines/portfolio/blob/main/apps/backend/src/app.ts): `apps/backend/src/app.ts`
- [API routes](https://github.com/ogulcantekines/portfolio/tree/main/apps/backend/src/routes): `apps/backend/src/routes`
- [Login and auth](https://github.com/ogulcantekines/portfolio/blob/main/apps/backend/src/controllers/auth.controller.ts): `apps/backend/src/controllers/auth.controller.ts`
- [Domain controllers](https://github.com/ogulcantekines/portfolio/tree/main/apps/backend/src/controllers): `apps/backend/src/controllers`
- [Domain services](https://github.com/ogulcantekines/portfolio/tree/main/apps/backend/src/services): `apps/backend/src/services`
- [Pagination](https://github.com/ogulcantekines/portfolio/blob/main/apps/backend/src/lib/pagination.ts): `apps/backend/src/lib/pagination.ts`

### Shared data

- [Prisma client](https://github.com/ogulcantekines/portfolio/blob/main/apps/backend/src/lib/prisma.ts): `apps/backend/src/lib/prisma.ts`
- **PostgreSQL**
- [Shared schemas](https://github.com/ogulcantekines/portfolio/blob/main/packages/shared/src/schemas.ts): `packages/shared/src/schemas.ts`
- [Contact messages](https://github.com/ogulcantekines/portfolio/blob/main/apps/backend/src/services/contact.service.ts): `apps/backend/src/services/contact.service.ts`

### Other components

- **Visitor**

## Connections

- Visitor → Public site: browses (evidence: `README.md`)
- Public site → Home profile: renders (evidence: `apps/frontend/app/page.tsx`)
- Home profile → Motion components: renders (evidence: `apps/frontend/app/page.tsx`)
- Home profile → API app: fetches profile (evidence: `apps/frontend/app/page.tsx`)
- Public site → Project pages: offers projects (evidence: `README.md`)
- Public site → Blog pages: offers blog (evidence: `README.md`)
- Visitor → Contact form: submits message (evidence: `apps/frontend/app/contact/page.tsx`)
- Contact form → API app: posts contact (evidence: `apps/frontend/app/contact/page.tsx`)
- Visitor → Admin dashboard: manages content (evidence: `README.md`)
- Admin dashboard → Admin API client: uses API client
- Admin API client → API app: calls REST API (evidence: `README.md`)
- API app → API routes: mounts routes (evidence: `apps/backend/src/app.ts`)
- API routes → Domain controllers: dispatches requests (evidence: `README.md`)
- API routes → Login and auth: routes login (evidence: `apps/backend/src/routes/auth.route.ts`)
- Domain controllers → Domain services: delegates work (evidence: `README.md`)
- Domain controllers → Shared schemas: validates input (evidence: `apps/backend/src/controllers/profile.controller.ts`)
- Domain controllers → Pagination: paginates results (evidence: `apps/backend/src/controllers/blog.controller.ts`)
- Domain services → Prisma client: queries through (evidence: `apps/backend/src/services/profile.service.ts`)
- Prisma client → PostgreSQL: reads and writes (evidence: `README.md`)
- Domain controllers → Contact messages: delegates contact (evidence: `apps/backend/src/controllers/contact.controller.ts`)
- Contact messages → Prisma client: persists through (evidence: `apps/backend/src/services/contact.service.ts`)
