This directory contains all the applications that make up the WebWings project. The project follows a monorepo structure using Turborepo.
apps/
├── api/ # Go-based API service
├── web/ # Frontend web application
├── deployment/ # Deployment service
└── monitoring/ # Monitoring and observability service
- Node.js 18 or higher
- Go 1.21 or higher
- Docker and Docker Compose (for containerized deployment)
- npm (package manager)
- Install dependencies at the root:
npm install- Install Go dependencies for the API:
cd apps/api
go mod tidyTo start the development environment:
# From the root directory
npm run devThis will start all services in development mode using Turborepo's watch mode.
To build all applications:
npm run buildFor production deployment, use Docker Compose:
docker-compose -f docker-compose.prod.yml up -dThe project uses Turborepo for managing the monorepo. The configuration is defined in turbo.json with the following main tasks:
dev: Development mode with watch functionalitybuild: Production build with dependency managementstart: Production mode startup
db:migrate: Database migration executiondb:seed: Database seeding
generate: Code generation (e.g., API clients)install:api: Go dependencies installation
The project requires various environment variables for different tasks. Here are the main categories:
DB_PORTDB_HOSTDB_NAMEDB_USERNAMEDB_PASSWORD
API_URLPUBLIC_API_URLWEB_PORT
GITHUB_OAUTH_CLIENT_IDGITHUB_OAUTH_SECRET_KEYGITHUB_OAUTH_REDIRECT_URLGOOGLE_CLIENT_ID
EMAILEMAIL_PASSWORD
AMQP_URIREDIS_URLDOCKER_REGISTRY_USERCLOUDFLARE_ZONE_IDCLOUDFLARE_API_KEYMAIN_DOMAIN
The project uses npm workspaces for managing multiple packages. The root package.json defines:
- Workspace configuration:
"workspaces": ["apps/*"] - Package manager:
"packageManager": "^npm@10.2.3"
npm run dev- Start development environmentnpm run build- Build all applicationsnpm run start- Start all applications in production modenpm run db:migrate- Run database migrationsnpm run db:seed- Seed the databasenpm run generate- Generate necessary files (e.g., API clients)npm run install:api- Install Go dependencies for the API
Each application can be containerized using the provided Dockerfiles in the docker/apps directory. The main Dockerfile for the entire project is located in the docker directory.
- Copy the example environment file:
cp .env.example .env- Fill in the required environment variables in
.env
- Create a new branch for your feature
- Make your changes
- Submit a pull request
ISC