A full-stack Expense Tracker built with the MERN Stack, containerized using Docker, and automatically deployed to an AWS EC2 instance using GitHub Actions CI/CD.
This project was built to learn Docker, Docker Compose, AWS deployment, and CI/CD automation while developing a production-like full-stack application.
| Category | Technologies |
|---|---|
| Frontend | React.js, Vite, NGINX |
| Backend | Node.js, Express.js |
| Database | MongoDB |
| DevOps | Docker, Docker Compose, GitHub Actions, AWS EC2, SSH, rsync |
- Add, edit and delete expenses
- Search by title
- Filter by category
- Filter by date
- Expense summary dashboard
- Category-wise analytics
- CSV export
- Responsive UI
- Dockerized development & production setup
- Automated deployment to AWS EC2
GitHub Repository
│
Push to main
│
GitHub Actions CI/CD
│
SSH + rsync
│
AWS EC2
│
Docker Compose
│
┌────────────┬─────────────┬─────────────┐
│ │ │
Frontend Backend MongoDB
(NGINX) Express
.
├── README.md
├── backend
│ ├── Dockerfile
│ ├── Dockerfile.dev
│ ├── package.json
│ └── src
│ ├── models
│ ├── routes
│ └── server.js
│
├── frontend
│ ├── Dockerfile
│ ├── Dockerfile.dev
│ ├── nginx
│ │ └── default.conf
│ ├── package.json
│ ├── src
│ └── vite.config.js
│
├── scripts
│ └── ec2.bootstrap.sh
│
├── .github
│ └── workflows
│ └── deploy.yml
│
├── docker-compose.yml
└── docker-compose-dev.yml
Start the development environment with hot reload.
docker compose -f docker-compose-dev.yml upRun the production setup locally.
docker compose up -d --buildOpen the application:
http://localhost
| Service | Description |
|---|---|
| frontend | React application served by NGINX |
| backend | Express REST API |
| mongo | MongoDB database |
Every push to the main branch automatically deploys the latest version to the AWS EC2 server.
Developer
│
git push
│
GitHub Actions
│
Checkout Repository
│
Configure SSH
│
Bootstrap EC2
│
Sync Project (rsync)
│
Create .env Files
│
Docker Compose Build
│
Restart Containers
│
Deployment Complete
- Building multi-container applications
- Managing development and production environments
- Networking, volumes, and container lifecycle
- Running React, Node.js, and MongoDB together
- Deploying Docker applications to AWS EC2
- Automating deployments with GitHub Actions
- Managing environment variables using GitHub Secrets
- SSH-based deployment with
rsyncand Docker Compose
During development, I encountered and resolved several real-world issues:
- Vite Hot Reload not working inside Docker
- Docker Compose networking and volume configuration
- AWS EC2 server setup and permissions
- Environment variable management
- Docker image cleanup and rebuilds
Start containers
docker compose up -dBuild containers
docker compose up -d --buildView logs
docker compose logs -fList running containers
docker compose psStop containers
docker compose downRemove containers and volumes
docker compose down -v- User Authentication
- Budget Management
- Monthly Reports
- Charts & Analytics
- HTTPS with SSL
- MongoDB Atlas
- Monitoring & Logging
This project is intended for learning, portfolio demonstration, and showcasing modern full-stack development with Docker and CI/CD.