Folder Structure
As mentioned earlier, the app uses Nx for monorepo setup. The folder structure is as follows:
namviek
├── apps
│   ├── backend
│   ├── frontend
├── docker
├── package.json
├── packages
│   ├── auth-client
│   ├── core
│   ├── database
│   ├── event-bus
│   ├── task-runner
│   └── ui-components
├── scripts
Directory Overview
Apps
The apps directory contains the main applications of our project:
| Application | Description | 
|---|---|
frontend | Next.js web application | 
backend | Express.js server application | 
Docker
The docker directory contains containerization configurations:
- Dockerfile for each service
 - Docker Compose configurations
 - Environment-specific docker settings
 - Container orchestration files
 
Scripts
The scripts directory contains utility scripts:
- AWS Lightsail deployment scripts
 - Database backup and restore utilities (WIP)
 - Environment setup scripts (WIP)
 - CI/CD helper scripts (WIP)
 
Packages
The packages directory contains shared libraries and modules that can be used across different applications:
| Package | Purpose | 
|---|---|
auth-client | Authentication and authorization | 
core | Core business logic and utilities: - Common interfaces - Shared constants - Helper functions - Base configurations - Common types  | 
database | Prisma schema, migration and repository | 
event-bus | Event handling system | 
task-runner | Scheduled tasks | 
ui-components | Reusable UI component library |