A production-grade, fully open-source E-Commerce platform built with Laravel 11 (API) and React 18. Designed for scalability, security, and exceptional developer experience.
- Multi-role Authentication: Users, Admins, and Super Admins
- Product Catalog: Complete CRUD with image uploads and categories
- Shopping Cart: Persistent cart with real-time updates
- Order Management: Full order lifecycle with status tracking
- Payment Integration: Secure Razorpay payments with server-side verification
- Responsive Design: Mobile-first approach with Tailwind CSS
- Authentication: Laravel Sanctum token-based authentication
- RBAC: Role-Based Access Control via Spatie Permissions
- API Standards: RESTful design with proper HTTP codes
- Security: Input validation, rate limiting, and CORS protection
- Modern Stack: React 18, Vite, Tailwind CSS
- State Management: Context API with custom hooks
- Admin Dashboard: Complete admin panel for store management
- SPA Architecture: Seamless client-side routing
| Component | Technology |
| Info | Details |
|---|---|
| Backend | PHP 8.2+, Laravel 11, MySQL 8 |
| Frontend | React 18, Vite, Tailwind CSS, Headless UI |
| Auth | Laravel Sanctum, Spatie Permission |
| DevOps | Docker, GitHub Actions, Vercel |
ecomer/
βββ backend/ # Laravel API Backend
βββ frontend/ # React Frontend
βββ .github/ # CI/CD & Community Files
βββ docker/ # Docker Configs
βββ vercel.json # Vercel Deployment Config
βββ Dockerfile # Production Frontend Build
βββ README.md # Documentation- PHP 8.2+ & Composer
- Node.js 18+ & NPM
- MySQL 8+
git clone https://github.com/abx15/laravel-react-ecommerce.git
cd laravel-react-ecommercecd backend
composer install
cp .env.example .env
php artisan key:generate
php artisan migrate --seed
php artisan storage:link
php artisan servecd frontend
npm install
npm run devAccess the app at http://localhost:5175.
We provide a production-ready Docker setup for the frontend.
# Build the image
docker build -t ecomer-frontend .
# Run the container
docker run -p 8080:80 ecomer-frontendAccess the frontend at http://localhost:8080.
This repository uses GitHub Actions for continuous integration:
- Frontend Build: Linting and building the React application.
- Backend Tests: Running PHPUnit tests with a MySQL service.
Check .github/workflows/ci.yml for details.
This project is configured for Vercel. The vercel.json ensures that client-side routing works correctly.
- Import project to Vercel.
- Set Root Directory to
frontend(or keep root and set Build Commandnpm run buildinfrontend). - Deploy!
See backend/.env.example and frontend/.env.example for required variables.
We welcome contributions! Please see CONTRIBUTING.md for details.
If you find this project useful, please consider sponsoring:
This project is licensed under the MIT License - see the LICENSE file for details.
Maintained by Arun Kumar Bind