Scalable serverless online bookstore built on AWS with React frontend, Lambda backend, and full CI/CD pipeline.
View Demo
·
Report Bug
·
Request Feature
Cloud BookHub demonstrates a production-ready serverless e-commerce pattern on AWS. The React SPA serves book catalog via CloudFront CDN from S3, with backend API powered by Lambda behind API Gateway. Full CI/CD pipeline automates deployments from GitHub, and CloudWatch provides observability [web:1].
Cloud BookHub architecture: React on S3+CloudFront → API Gateway+Lambda → RDS MySQL (planned).
- Book catalog with images, categories, and rupee pricing
- Search by title and category filtering
- Book details modal with descriptions and stock info
- Client-side shopping cart with quantity controls and totals
- Responsive UI optimized for mobile and desktop
- Serverless backend with CORS-enabled API Gateway
- Automated CI/CD pipeline with CodePipeline and CodeBuild
- CloudWatch monitoring for Lambda and build logs
-
Clone the repository git clone https://github.com/purvii12/Online-Bookstore.git cd Online-Bookstore
-
Frontend setup npm install npm run build
-
Deploy to AWS manually (before CI/CD) Upload build/ to S3 bucket aws s3 sync build/ s3://bookstore-frontend-khand-123 --delete
Create CloudFront distribution pointing to S3 website endpoint
- Backend deployment Create Lambda function with provided code Create API Gateway HTTP API with GET /books → Lambda integration Test: https://YOUR_API_ID.execute-api.us-east-1.amazonaws.com/books(replace with your id)
- Access frontend via URL:
https://online-bookstore-frontend-zyyx.onrender.com/ - Browse books, use search and category filters
- Click book cards for details modal with stock info
- Add items to cart, adjust quantities, view running totals
CI/CD Workflow: Push to main branch triggers: GitHub → CodePipeline → CodeBuild → S3 deployment git add . git commit -m "Update UI" git push origin main
- Navigate to ACM console in us-east-1 (required for CloudFront)
- Request public certificate for your domain (e.g.,
yourdomain.com,*.yourdomain.com) - Choose DNS validation and add CNAME records to Route 53
- Wait for "Issued" status (5-30 minutes)
- Attach certificate to CloudFront: Distributions → Edit → Custom SSL Certificate [web:2][web:6]
CloudFront Custom Domain Configuration Alternate Domain Names (CNAMEs): yourdomain.com, www.yourdomain.com Custom SSL Certificate: arn:aws:acm:us-east-1:ACCOUNT:certificate/CERT-ID
-
Infrastructure (AWS Console) S3 bucket → CloudFront → Lambda → API Gateway → RDS (optional) IAM roles → CodeBuild project → CodePipeline
-
CI/CD Setup Connect GitHub repo → Create buildspec.yml → CodeBuild project CodePipeline: Source(github) → Build(codebuild) → Deploy(S3)
-
Frontend Configuration Update
API_BASEinApp.jsto your API Gateway URL, rebuild, commit to main
- React SPA on S3 + CloudFront with HTTPS
- Lambda + API Gateway serverless backend
- Complete CI/CD pipeline automation
- CloudWatch monitoring and logging
- RDS MySQL instance provisioned
- RDS database integration in Lambda
- Amazon Cognito authentication
- AWS WAF protection for CloudFront
- Custom domain with Route 53
- Fork the project
- Create feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Purvii - @purvii12
Project Link: https://github.com/purvii12/Online-Bookstore
- AWS Documentation for serverless patterns [web:1]
- AWS Samples bookstore demo for reference architecture [web:2]
- React community for excellent frontend ecosystem


