A full-stack e-commerce application for plant enthusiasts, built with modern technologies and containerized for easy deployment.
Pandac Store is a complete e-commerce platform specializing in plants and gardening products. It features a React frontend, Spring Boot backend, MySQL database, nginx reverse proxy, and integrated payment processing with Stripe.
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Client β β Nginx Proxy β β Backend β β Database β
β (Browser) ββββββ (Port: 80) ββββββ (Spring Boot) ββββββ (MySQL) β
β β β β β Port: 8080 β β Port: 3306 β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β
β
βββββββββββββββββββ
β Frontend β
β (React/Nginx) β
β Port: 80 β
βββββββββββββββββββ
-
Validate your environment:
./scripts/validate-setup.sh
-
Configure environment variables:
cp .env.example .env # Edit .env file with your actual API keys -
Verify configuration:
./scripts/check-tokens.sh
-
Start the application:
docker-compose up -d
-
Access the application:
- Application: http://localhost (Single entry point via nginx)
- API Endpoint: http://localhost/api/v1
- Database: localhost:3306 (for admin access only)
- Nginx Reverse Proxy - Single entry point, CORS handling, static file serving
- Docker & Docker Compose - Container orchestration
- Multi-stage builds - Optimized container images
- React 19 with modern hooks
- Vite for fast development and building
- Tailwind CSS for responsive styling
- Redux Toolkit for state management
- Stripe Elements for secure payments
- Centralized API Configuration - Single source of truth
- Spring Boot 3.5 with Java 21
- Spring Security with JWT authentication
- Spring Data JPA with Hibernate
- Flyway for database migrations
- Stripe API for payment processing
- MySQL 8.0 database
- Environment-based configuration with Docker
- Health checks for service monitoring
- Centralized API endpoint management
- Production-ready reverse proxy setup
For detailed documentation, see:
- Docker Setup - Complete Docker setup and deployment guide
- Nginx Proxy Configuration - Reverse proxy setup and configuration
- API Configuration Management - Centralized configuration system
- Docker & Docker Compose
- Git
- Your favorite code editor
- Stripe API Keys: Get from Stripe Dashboard
- GitHub Token: Create at GitHub Settings
- Update .env file with real values
The application uses a centralized configuration system:
- Single Source:
/pandac-store-ui/src/config/api.js
// pandac-store-ui/src/config/api.js
export const API_BASE_URL = '/api/v1'; // β Change here only!
export const API_TIMEOUT = 10000;# Start all services (single command!)
docker-compose up -d
# View logs
docker-compose logs -f
# View specific service logs
docker-compose logs -f nginx
docker-compose logs -f frontend
docker-compose logs -f backend
# Restart a service
docker-compose restart nginx
# Stop everything
docker-compose down
# Clean rebuild (if you change configuration)
docker-compose down -v --rmi all
docker-compose up --build
# Check service status
docker-compose ps- Application: http://localhost (nginx proxy)
- API Direct: http://localhost/api/v1/*
- Database: localhost:3306 (admin access)
- Product browsing and search
- Shopping cart management
- Secure checkout with Stripe
- User authentication and profiles
- Order history and tracking
Smart shopping cart with discount code support
- Secure JWT-based login system
- User profile management
- Role-based access control
Clean and secure authentication interface
- Contact form with validation
- Customer inquiries management
- Responsive communication system
Professional contact form for customer support
- Product management
- Order administration
- User management
- Discount code creation
- Sales analytics
- Nginx Reverse Proxy: Single entry point, CORS-free architecture
- Centralized Configuration: Single source of truth for API endpoints
- Responsive design: Mobile-first approach
- JWT-based authentication: Secure user sessions
- Database migrations: Version-controlled schema changes
- File upload with CDN integration: Optimized image delivery
- Comprehensive error handling: User-friendly error management
- Health monitoring: Container health checks and monitoring
pandac-store/
βββ docs/ # π Documentation
β βββ screenshots/ # πΈ Application screenshots
βββ scripts/ # π οΈ Setup scripts
βββ nginx/ # π Reverse proxy configuration
β βββ Dockerfile # Nginx container config
β βββ nginx.conf # Reverse proxy rules
βββ pandac-store-backend/ # π Spring Boot API
βββ pandac-store-ui/ # π₯οΈ React frontend
β βββ src/config/ # βοΈ Centralized configuration
β βββ api.js # π― Single source of truth for API
βββ docker-compose.yml # π³ Container orchestration
βββ .env.example # βοΈ Environment template
βββ README.md # π This file
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Update documentation
- Submit a pull request
This project is licensed under the terms specified in the LICENSE file.
- Documentation: Check the docs/ directory
- Scripts Help: See scripts/README.md
- Issues: Open a GitHub issue
- Security: See SECURITY.md
For production deployment:
- Update environment variables for production
- Change default database passwords
- Use production Stripe keys
- Configure proper domain and SSL
- Set up monitoring and backups
Happy gardening! π±
