U

Infrastructure Overview

Architecture, deployment, and stack details to assist the development team. This document serves as the primary handover guide for scaling the POC.

Frontend (Web)

  • Framework: Next.js 14 (App Router)
  • Styling: Tailwind CSS & Shadcn UI
  • Language: TypeScript
  • State Management: React Query (via \`apiClient\`)
  • UI Icons: Lucide React

Backend (API)

  • Framework: NestJS
  • Authentication: JWT (Access & Refresh Tokens) + bcrypt
  • ORM: Prisma with PostgreSQL
  • File Storage: MinIO (S3 Compatible)
  • Queues & Caching: Redis (BullMQ via \`BullModule\`)

Docker Deployment

The application is fully containerized using Docker Compose. The \`docker-compose.yml\` defines the following interconnected services:

  • nesteasy_nginx: Reverse proxy listening on port 80. Routes traffic to Web and API.
  • nesteasy_web: Next.js server running the frontend dashboard.
  • nesteasy_api: NestJS backend running on port 3001 internally.
  • nesteasy_postgres: PostGIS PostgreSQL database handling all Prisma queries.
  • nesteasy_redis: In-memory data store for caching and queues.
  • nesteasy_minio: Self-hosted S3 alternative for compliance documents and avatars.

How It Fits Together

The POC successfully bridges the gap between the Next.js frontend and the NestJS backend by establishing a mapped \`apiClient\` configuration. Earlier mock abstractions were stripped away, routing all API requests strictly through the Next.js server (connecting dynamically to the deployed container environment).

The database has been seeded with realistic user accounts corresponding to varying RBAC roles (Admin, Manager, Document Editor, Client, Contractor), enforcing token validation per-endpoint across the API.