How amirka2/unie works
Main Components Identification
• Client / Browser: Represents the end-user’s interface.
• Nginx Server: Acting as a reverse proxy (see the “nginx” directory and its Dockerfile and configuration files), it routes incoming HTTP requests to the appropriate service.
• Next.js Application Container: The core application container built from the Next.js code base. This includes both the frontend and backend API endpoints (see all files under the "src/app" directory).
• Prisma & Database: Although the actual database isn’t directly in the file tree, the presence of “prisma” directories with migrations, seed scripts, and a schema indicate robust ORM usage. The application communicates with a database through Prisma.
• Docker & Deployment Artifacts: Include Dockerfiles, docker-compose files (dev/prod), and environment configuration. These illustrate how the services are containerized and orchestrated.
Relationships and Interactions
• Clients send requests (HTTP/HTTPS) to the Nginx reverse proxy.
• Nginx routes these requests to the Next.js application container.
• The Next.js app processes requests using both its server-side rendered pages and API routes (for authentication, ticket creation, profile manipulation, etc.).
• For persistent storage, the app communicates with the database via Prisma ORM.
• Additionally, build and deployment pipelines (GitHub workflows, scripts like init-docker-dirs.sh, etc.) support CI/CD and container initialization.
Architectural Patterns & Design Principles
• Feature-Based / Domain-Driven Design: Notice clear separations between “entities”, “features”, and “shared” directories.
• Service/Repository Pattern: Within each entity, repositories and service layers define business logic and data abstraction.
• Containerization & Microservice-like isolation: Different containers for the web application and the Nginx reverse proxy, which can be scaled separately.
Relevant Technologies and Frameworks
• Next.js: For both SSR and API routes.
• Prisma: For database migrations, schema definition, and ORM functionalities.
• Docker & Docker Compose: For containerization and orchestration.
• Nginx: For reverse proxying and load balancing.
• Additional tooling such as ESLint, PostCSS, and Tailwind CSS (reference to tailwind.config.mjs).