An immersive 3D gaming website built with React, Vite, GSAP, and Tailwind CSS. This project features stunning 3D animations, modern design, and a complete CI/CD pipeline with Docker and Kubernetes support.
- 🎨 Stunning 3D Animations: Powered by GSAP for smooth, performance-optimized animations
- ⚡ Lightning Fast: Built with Vite for optimal development experience and build performance
- 📱 Responsive Design: Tailwind CSS for mobile-first, responsive layouts
- 🎵 Audio Integration: Immersive sound effects and background music
- 🐳 Containerized: Docker support for consistent development and deployment
- ☸️ Kubernetes Ready: Complete K8s manifests for scalable deployment
- 🚀 CI/CD Pipeline: GitHub Actions for automated testing, building, and deployment
- 🔧 Developer Friendly: Comprehensive scripts and tools for easy development
- Node.js 18 or higher
- npm or yarn
- Docker (optional, for containerization)
- kubectl (optional, for Kubernetes deployment)
- minikube (optional, for local Kubernetes)
# Clone the repository
git clone https://github.com/DharshanSR/3D-Gaming-Website.git
cd 3D-Gaming-Website
# Run the setup script
make setup
# or
./scripts/setup.sh# Start development server
make dev
# or
npm run dev
# Start with Docker (optional)
make dev-dockerOpen http://localhost:5173 to view the application.
make help # Show all available commands
make setup # Setup development environment
make dev # Start development server
make build # Build for production
make test # Run tests and quality checks
make docker-build # Build Docker image
make k8s-deploy # Deploy to Kubernetes
make clean # Clean build artifactsnpm run dev # Start development server
npm run build # Build for production
npm run lint # Run ESLint
npm run format # Format code with Prettier
npm run docker:build # Build Docker image
npm run k8s:deploy # Deploy to Kubernetes./scripts/setup.sh # Setup environment
./scripts/dev.sh # Start development
./scripts/build.sh # Build application
./scripts/test.sh # Run quality checks
./scripts/deploy-local.sh # Deploy to local Kubernetes3D-Gaming-Website/
├── public/ # Static assets
│ ├── audio/ # Audio files
│ ├── fonts/ # Custom fonts
│ ├── img/ # Images and graphics
│ └── videos/ # Video files
├── src/ # Source code
│ ├── components/ # React components
│ ├── App.jsx # Main application component
│ ├── main.jsx # Application entry point
│ └── index.css # Global styles
├── k8s/ # Kubernetes manifests
├── scripts/ # Utility scripts
├── .github/workflows/ # GitHub Actions CI/CD
├── Dockerfile # Production Docker image
├── docker-compose.yml # Docker Compose configuration
└── Makefile # Convenient commands
- Frontend: React 18, Vite, Tailwind CSS
- Animations: GSAP (GreenSock Animation Platform)
- Icons: React Icons
- Utilities: Clsx, React Use
- Build Tool: Vite
- Linting: ESLint
- Formatting: Prettier
- Start Development:
make dev - Make Changes: Edit files in
src/ - Check Quality:
make test - Build:
make build - Deploy:
make k8s-deploy
# Build production image
make docker-build
# Run container
make docker-run
# Or use Docker Compose
make docker-compose-up- Production: Multi-stage build with Nginx
- Development: Node.js with hot reload
- Size Optimized: Alpine Linux base images
# Setup Minikube and deploy
make k8s-deploy
# Check deployment status
make k8s-status
# Access application
echo "127.0.0.1 gaming-website.local" | sudo tee -a /etc/hosts
open http://gaming-website.local- Namespace: Isolated environment
- Deployment: 3 replicas with rolling updates
- Service: ClusterIP for internal communication
- Ingress: External access with SSL support
- HPA: Auto-scaling based on CPU/memory
- ConfigMap: Nginx configuration
# Build and push to registry
docker build -t ghcr.io/dharshans/3d-gaming-website:latest .
docker push ghcr.io/dharshans/3d-gaming-website:latest
# Deploy to production cluster
kubectl apply -f k8s/The project uses three distinct GitHub Actions workflows:
- Triggers: Push/PR to any branch
- Purpose: Code quality, testing, building, security scanning
- Stages:
- Code quality checks (ESLint, Prettier, Security audit)
- Unit tests and coverage
- Production build
- Docker image build and vulnerability scanning
- Triggers: Successful CI completion
- Purpose: Automated deployment
- Stages:
- Staging deployment (from
developbranch) - Production deployment (from
mainbranch) - Health checks and verification
- Automatic rollback on failure
- Staging deployment (from
- Triggers: Manual workflow dispatch
- Purpose: On-demand deployments
- Features:
- Environment selection (staging/production)
- Custom image tag deployment
- Force deploy option
- Manual approval for production
graph LR
A[Feature Branch] --> B[Develop Branch]
B --> C[Main Branch]
A --> D[CI Only]
B --> E[CI + Staging Deploy]
C --> F[CI + Production Deploy]
Add these secrets to your GitHub repository:
GITHUB_TOKEN # Automatically provided
KUBECONFIG # Kubernetes configuration (if deploying to external cluster)Create .env.local for local development:
VITE_APP_TITLE=3D Gaming Website
VITE_APP_DESCRIPTION=An immersive 3D gaming experience
VITE_API_URL=http://localhost:3001
VITE_ENV=development- Vite:
vite.config.js - Tailwind:
tailwind.config.js - ESLint:
eslint.config.js - PostCSS:
postcss.config.js - Prettier:
.prettierrc
- Create component in
src/components/ - Export from component file
- Import in
App.jsxor parent component
- Use Tailwind classes for styling
- Custom fonts available in
public/fonts/ - GSAP for animations
- Images: Add to
public/img/ - Videos: Add to
public/videos/ - Audio: Add to
public/audio/ - Fonts: Add to
public/fonts/
make test # Run all checks
./scripts/test.sh --lint # ESLint only
./scripts/test.sh --format # Prettier check
./scripts/test.sh --security # Security audit- Development:
make dev - Production Build:
make build && make preview - Docker:
make docker-build && make docker-run - Kubernetes:
make k8s-deploy
Port already in use
# Kill process on port 5173
lsof -ti:5173 | xargs kill -9Docker build fails
# Clean Docker cache
docker system prune -aKubernetes deployment fails
# Check pod logs
kubectl logs -f deployment/gaming-website-deployment -n gaming-website
# Check events
kubectl get events -n gaming-website --sort-by='.lastTimestamp'Permission denied on scripts
# Make scripts executable
chmod +x scripts/*.sh# Check application logs
kubectl logs -f deployment/gaming-website-deployment -n gaming-website
# Port forward for debugging
kubectl port-forward svc/gaming-website-service 8080:80 -n gaming-website
# Check resource usage
kubectl top pods -n gaming-website- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Run quality checks:
make test - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
- Use Prettier for formatting
- Follow ESLint rules
- Write meaningful commit messages
- Add comments for complex logic
This project is licensed under the MIT License - see the LICENSE file for details.
- GSAP for amazing animation capabilities
- Vite for fast development experience
- Tailwind CSS for utility-first styling
- React for component-based architecture
If you encounter any issues or have questions:
- Check the Troubleshooting section
- Search existing Issues
- Create a new issue with detailed information
Happy Coding! 🚀