- Overview
- Architecture
- Tech Stack
- Architecture Explained
- Local Development Setup
- Development Roadmap
- License
- Support
GymFuel is a complete full-stack project that demonstrates modern web application development and production ready DevOps practices. This project showcases a Next.js frontend with a FastAPI backend, featuring AI-powered recipe generation, meal planning, grocery tracking, and a coach-client system. This is deployed on AWS ECS with containerised infrastructure.
- CI/CD Pipeline: GitHub Actions → Terraform → AWS
- Container Registry: Docker → Amazon ECR
- Load Balancing: Application Load Balancer with health checks
- Container Orchestration: ECS Fargate across multiple AZs
- Monitoring: CloudWatch logs and metrics
- Frontend: Next.js 16, React 19, TypeScript, Tailwind CSS v4, shadcn/ui
- Backend: FastAPI (Python 3.11), PostgreSQL
- Authentication: JWT with role-based access (client/coach)
- AI Integration: Recipe generation API (coming soon!)
- Containerisation: Docker multi-stage builds for optimised image sizes
- Orchestration: AWS ECS (Elastic Container Service) with Fargate, Production Ready
- Container Registry: AWS ECR (Elastic Container Registry)
- Database: AWS RDS PostgreSQL with optional automated backups
- Networking: AWS VPC with public/private subnets/database subnets, Application Load Balancer, Multi-AZ deployment
- Infrastructure as Code: Terraform for cloud infrastructure, Docker Compose for local development
- Reverse Proxy: Nginx for request routing (only for docker-compose)
- IAM Roles: IAM Role-based access control for AWS resources, least privilege principle
- Logging: AWS CloudTrail for activity logging
- HTTPS: Automatically provisioned SSL/TLS certificates using AWS Certificate Manager (ACM)
- Security Groups: AWS Security Groups for network traffic control
- Remote Backend: S3 bucket in
eu-west-2with encryption enabled - Benefits: Centralised state storage, team collaboration, automated backups, cross-environment consistency
- CI Pipeline (ci.yml)
- Trigger: On push to main branch
- Actions:
- Build Docker image using Dockerfile
- Scan Images using Trivy
- Push Docker image to ECR
- Deploy to ECS Fargate
Image is showing Trivy blocking a CRITICAL vulnerability, stopping my workflow from proceeding and preventing deployment.
- Docker
- AWS CLI
- Terraform for Terraform Setup
- Added access keys to use workflow automation (GitHub Actions)
- Clone the repository:
git clone https://github.com/wegoagain-dev/ECS-GymFuel.git cd ECS-GymFuel - Configure terraform.tfvars and modify where needed
cd terraform cp terraform.tfvars.example terraform.tfvars - Create a new S3 bucket for Terraform state storage:
# create bucket (with same name as the backend s3) first in aws with bucket name, region, versioning, encryption, block public access - Initialise Terraform:
terraform init
- Apply Terraform configuration:
terraform apply
- Initialise GitHub Actions:
cd .. git init git add . git commit -m "Initial commit" git branch -M main git remote add origin https://github.com/<your-name>/<your-repo-name>.git # create a new repository on GitHub and replace <your-name> with your username git push -u origin main
- Configure Environment Variables
Copy the example configuration file to create your local secrets file:
cp .env.example .env
- Start the Application
Build and start the containers in the background:
docker-compose up -d --build
- Access Services
- Web App: http://localhost (http://localhost) (Proxied via Nginx)
- API Docs: http://localhost:8000/docs (http://localhost:8000/docs) (Swagger UI)
- Database: localhost:5432 (User/Pass: postgres/postgres from default .env)
- Stop the Application
To stop all running containers:
docker-compose down
- Full AI Recipe Generation
- Mobile app (React Native)
- Implement OIDC instead of manual github actions keys
- Monitoring and Observability (CPU, Memory, Disk Space)
Copyright (c) 2026 Tawfiq Rahman. All Rights Reserved. This project is proprietary and may not be copied, modified, or distributed without written permission.
For support, email tsdevelops00@gmail.com or open an issue in the repository. Dont be shy to contact me!

