A modern React application that compares grocery prices across South African retailers (Checkers, Pick n Pay, Woolworths) to help consumers find the best deals and save money on their shopping.
- Price Comparison: Compare prices across multiple South African grocery stores
- Smart Search: Advanced search with filters and categories
- Interactive Cart: Add products to cart and see total savings
- Real-time Updates: Live price updates and deal notifications
- Responsive Design: Beautiful, mobile-first UI with Tailwind CSS
- Store Integration: Direct integration with store APIs
- Deal Tracking: Track price history and savings over time
- React 18 with functional components and hooks
- Tailwind CSS for styling with custom luxury theme
- React Query for data fetching and caching
- React Router for navigation
- Heroicons for beautiful icons
- AWS ECS Fargate for containerized deployment
- DynamoDB for product and price data storage
- S3 for static asset hosting
- Application Load Balancer for traffic distribution
- Terraform for Infrastructure as Code
- GitHub Actions for automated deployment
- Docker for containerization
- AWS ECR for container registry
- Node.js 18+
- npm or yarn
- AWS CLI configured
- Terraform installed
-
Clone the repository
git clone https://github.com/your-username/MindCart-SA.git cd MindCart-SA -
Install dependencies
npm install
-
Start development server
npm start
-
Open in browser Navigate to
http://localhost:3000
Create a .env.local file in the root directory:
REACT_APP_API_BASE_URL=http://localhost:3001
REACT_APP_ENVIRONMENT=development- Checkers - South Africa's leading grocery retailer
- Pick n Pay - Quality products at great prices
- Woolworths - Premium quality and fresh produce
The application integrates with store APIs to fetch real-time pricing data:
// Example API call
const products = await fetchProductPrices('bananas');mindcart/
βββ public/ # Static assets
β βββ logos/ # Store logos
β βββ index.html # HTML template
βββ src/
β βββ components/ # Reusable UI components
β β βββ Header.jsx
β β βββ Footer.jsx
β β βββ ProductCard.jsx
β β βββ CartSummary.jsx
β β βββ SearchBar.jsx
β β βββ Filters.jsx
β βββ pages/ # Page components
β β βββ Home.jsx
β β βββ Category.jsx
β β βββ StoreComparison.jsx
β β βββ ProductDetail.jsx
β βββ services/ # API and data services
β β βββ api.js
β β βββ storeData.js
β βββ styles/ # Styling
β β βββ tailwind.css
β βββ App.jsx
β βββ index.jsx
βββ terraform/ # Infrastructure as Code
β βββ main.tf
β βββ variables.tf
β βββ outputs.tf
β βββ iam.tf
βββ .github/workflows/ # CI/CD pipelines
β βββ deploy.yml
βββ package.json
βββ tailwind.config.js
βββ README.md
-
Initialize Terraform
cd terraform terraform init -
Plan deployment
terraform plan -var="aws_account_id=YOUR_ACCOUNT_ID" -
Deploy infrastructure
terraform apply -var="aws_account_id=YOUR_ACCOUNT_ID"
The application is automatically deployed via GitHub Actions when code is pushed to the main branch.
-
Build the application
npm run build
-
Build and push Docker image
docker build -t mindcart . docker tag mindcart:latest YOUR_ACCOUNT_ID.dkr.ecr.af-south-1.amazonaws.com/mindcart:latest docker push YOUR_ACCOUNT_ID.dkr.ecr.af-south-1.amazonaws.com/mindcart:latest -
Update ECS service
aws ecs update-service --cluster mindcart-cluster --service mindcart-service --force-new-deployment
# Unit tests
npm test
# E2E tests
npm run test:e2e
# Performance tests
npm run test:performancenpm run test:coverage- Application performance metrics
- Error rates and response times
- Custom business metrics
- Structured logging with CloudWatch
- Error tracking and debugging
- Performance monitoring
| Variable | Description | Default |
|---|---|---|
REACT_APP_API_BASE_URL |
API base URL | http://localhost:3001 |
REACT_APP_ENVIRONMENT |
Environment | development |
REACT_APP_AWS_REGION |
AWS region | af-south-1 |
| Variable | Description | Default |
|---|---|---|
aws_region |
AWS region | af-south-1 |
environment |
Environment | dev |
ecs_cpu |
ECS CPU units | 512 |
ecs_memory |
ECS memory | 1024 |
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the existing code style
- Write tests for new features
- Update documentation as needed
- Ensure all tests pass before submitting
This project is licensed under the MIT License - see the LICENSE file for details.
- South African grocery retailers for providing API access
- React and Tailwind CSS communities
- AWS for cloud infrastructure
- Open source contributors
For support, email support@mindcart.co.za or create an issue in this repository.
- Mobile app (React Native)
- Price alerts and notifications
- User accounts and wishlists
- AI-powered recommendations
- Integration with more stores
- Barcode scanning
- Shopping list management
- Social features and sharing
MindCart SA is a South African grocery price comparison platform that helps users find the cheapest deals across major retailers like Checkers, Pick n Pay, and Woolworths. It features a smart cart calculator, store-to-store price comparisons, and a visual savings dashboard ,all in a clean, mobile-friendly UI.
c9f570cbdc7583946dc024f2b560889c127a01c5 67fc4225eef96736e7f7b6b18720466f372b0830