This is a full-stack e-commerce web application built with FastAPI (backend) and Next.js (frontend). The project demonstrates modern full-stack practices including:
- Type-safe React frontend with TypeScript
- Scalable RESTful APIs with FastAPI
- PostgreSQL (AWS RDS) as the database
- Redis caching for performance
- AWS ECS Fargate for containerized deployment
- CI/CD with GitHub Actions
- Monitoring with Sentry + CloudWatch
Core
- Frontend: Next.js (React + TypeScript)
- Backend: FastAPI (Python)
- Database: PostgreSQL (AWS RDS)
- Deployment: AWS ECS Fargate + ECR
- CI/CD: GitHub Actions
Advanced
- Cache: Redis
- Secrets Management: AWS Secrets Manager
- Monitoring/Logging: Sentry, CloudWatch
- Search: Elasticsearch (optional)
- Domain & TLS: Route 53 + AWS ACM
- User registration & login (JWT auth)
- Product catalog (CRUD)
- Shopping cart
- Checkout flow (with order persistence)
- Basic admin panel (manage products)
- API documentation auto-generated by FastAPI (Swagger UI)
- Unit & integration tests (pytest + Jest/RTL)
Frontend
- Next.js
- React
- TypeScript
- Jest + React Testing Library
Backend
- Python
- FastAPI
- SQLAlchemy + Alembic
- PostgreSQL
- Redis
- pytest
DevOps / Infra
- Docker & Docker Compose
- AWS ECS Fargate
- AWS RDS (PostgreSQL)
- AWS Secrets Manager
- AWS CloudWatch
- GitHub Actions
- Node.js (>=18)
- Python (>=3.10)
- Docker & Docker Compose
- AWS account
git clone https://github.com/your-username/fastapi-next-ecommerce.git
cd fastapi-next-ecommerce
docker-compose up --build
Frontend: http://localhost:3000
Backend: http://localhost:8000/docs
cd backend
pytest
cd frontend
npm test
-
PRs trigger GitHub Actions pipeline:
- Run tests (frontend + backend)
- Build Docker images
- Push to AWS ECR
- Deploy to ECS Fargate
- Sentry for error tracking
- AWS CloudWatch for logs & metrics
- Secrets managed via AWS Secrets Manager
- HTTPS enabled via AWS ACM + Route 53 + ALB
/frontend -> Next.js app
/backend -> FastAPI app
/infra -> Terraform/CDK scripts (infra as code)
/.github -> CI/CD workflows
- Core CRUD APIs
- Auth & JWT
- Cart & Checkout
- Admin panel
- CI/CD pipeline
- Monitoring & logging
- Advanced search (Elasticsearch)