From Nothing to an Automated CI/CD Deploying APP on AWS
-
Project Setup and Organization
- Set up a monorepo using Turborepo.
- Set up ./config workspaces (eslint, prettier and typescript).
- Set up a ./apps/web workspace with a create t3-app + shadcn/ui + vitest
- Set up a ./apps/api workspace with a new fastify api
-
Domain - Business Logic
- Define domain entities and value objects.
- Create use cases and unit tests for business logic.
-
Frontend Development with Next.js
- Develop frontend components and UI using Next.js and Shadcn/ui.
- Implement unit tests using Vitest for frontend components.
- Implement end-to-end tests with Playwright to validate frontend functionality.
-
Backend Development with Nest.js
- Implement backend APIs and business logic with Fastify.
- Implement end-to-end tests with vitest to validate all backend routes.
-
Docker
- Create a docker-compose.yml file for local development.
- Set up a Dockerfile for the Web and API workspaces.
-
CI/CD Pipeline
- Run all tests and build the application using GitHub Actions.
- Publish Docker images to Docker Hub and AWS ECR.
- Use semantic release to automate versioning and release management.
- Configure deployment to AWS App Runner for automated deployment.
-
Infrastructure as Code (IaC) with Terraform
- Define infrastructure requirements using Terraform.
- Provision AWS resources including ECR, App Runner, database, and Redis.
- Run
pnpm install
to install dependencies on the root folder. - Run docker-compose up -d to start the database
- Run
pnpm run dev
to start the application on port 3000 and api on port 4000.