A professional full-stack web platform for SavedFeast - an innovative food delivery platform that combats food waste by connecting restaurants with consumers.
- Advanced Meal Browsing: Rich filtering with categories, price ranges, and search
- Real-time Inventory: Live meal availability and quantity tracking
- Rich Media Support: High-quality images with lazy loading
- Detailed Meal Information: Complete descriptions, pricing, and restaurant details
- Intelligent Cart Management: Add, remove, and update quantities seamlessly
- Real-time Pricing: Dynamic price calculations with discounts
- Order Tracking: Complete order lifecycle from placement to completion
- Status Updates: Real-time order status notifications
- Multi-Role System: Consumer, Provider, and Admin roles with granular permissions
- Laravel Sanctum: Secure token-based authentication
- Profile Management: Comprehensive user profile editing
- Session Security: Automatic token refresh and secure session handling
- Provider Dashboard: Complete meal and order management for restaurants
- Restaurant Applications: Streamlined business registration process
- Analytics: Sales reports and performance metrics
- Menu Management: Easy meal creation and editing
- User Management: Complete user administration and role assignment
- System Analytics: Comprehensive platform statistics and insights
- Content Moderation: Meal and restaurant approval system
- Platform Configuration: System-wide settings and configurations
- Responsive Design: Optimized for all devices and screen sizes
- Bootstrap 5: Professional, accessible design system
- Dark/Light Themes: Automatic theme switching
- Progressive Web App: Offline capabilities and app-like experience
- Laravel 11: Latest PHP framework with modern features
- React 18: Modern frontend with TypeScript support
- API-First Architecture: RESTful API with comprehensive documentation
- Database Optimization: Efficient queries and proper indexing
- Security Best Practices: Input validation, CORS, rate limiting
| Home Page | Meal Browsing | Shopping Cart | Order Management |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
| Authentication | Provider Dashboard | Admin Panel | Mobile Responsive |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
- PHP 8.2+: Latest PHP with modern features
- Laravel Framework: Robust MVC framework
- Laravel Sanctum: API authentication
- MySQL 8.0+: Reliable database system
- Eloquent ORM: Powerful database abstraction
- React 18: Modern UI library with hooks
- TypeScript: Type safety and better development experience
- Bootstrap 5: Professional CSS framework
- React Router: Client-side routing
- Axios: HTTP client for API communication
- Vite: Fast build tool and development server
- ESLint: Code quality and consistency
- Prettier: Code formatting
- PHPUnit: PHP testing framework
- Vitest: Frontend testing
- Docker: Containerization support
- Laravel Sail: Docker development environment
- GitHub Actions: CI/CD pipeline
- Composer: PHP dependency management
- npm: Node.js package management
The easiest way to get started is using Docker. See DOCKER.md for detailed instructions.
# Clone the repository
git clone https://github.com/yourusername/savedfeast-web.git
cd savedfeast-web
# Copy environment file
cp .env.example .env
# Build and start services
docker-compose up -d --build
# Setup application
docker-compose exec app php artisan key:generate
docker-compose exec app php artisan migrate
docker-compose exec app php artisan db:seed
docker-compose exec app php artisan storage:link
# Access the application
# Web Application: http://localhost:8000
# API Endpoints: http://localhost:8000/api- PHP 8.2 or higher
- Composer 2.0+
- Node.js 18+ and npm
- MySQL 8.0+
- Git
-
Clone the repository
git clone https://github.com/yourusername/savedfeast-web.git cd savedfeast-web -
Install dependencies
# Backend dependencies composer install # Frontend dependencies npm install
-
Environment configuration
# Copy environment file cp .env.example .env # Generate application key php artisan key:generate
-
Database setup
# Create database mysql -u root -p -e "CREATE DATABASE savedfeast CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;" # Run migrations and seed data php artisan migrate:fresh --seed # Create storage link php artisan storage:link
-
Start development servers
# Start both backend and frontend npm run serve:full # Or start separately npm run serve:backend # Backend only npm run serve:frontend # Frontend only
-
Access the application
- Backend API: http://localhost:8000/api
- Frontend: http://localhost:5173
- Admin Panel: http://localhost:8000/admin
SavedFeast-Web/
├── 🖥️ app/ # Laravel application
│ ├── Console/Commands/ # Artisan commands
│ ├── Http/Controllers/ # API controllers
│ │ ├── API/ # API endpoints
│ │ │ ├── AdminController.php
│ │ │ ├── AuthController.php
│ │ │ ├── MealController.php
│ │ │ └── OrderController.php
│ │ └── Controller.php
│ ├── Models/ # Eloquent models
│ ├── Policies/ # Authorization policies
│ └── Providers/ # Service providers
├── 🎨 resources/ # Frontend resources
│ ├── js/ # React application
│ │ ├── components/ # React components
│ │ ├── context/ # React contexts
│ │ ├── routes/ # React pages
│ │ └── App.tsx # Main app component
│ ├── css/ # Stylesheets
│ ├── sass/ # Sass files
│ └── views/ # Blade templates
├── 🗄️ database/ # Database files
│ ├── migrations/ # Database migrations
│ ├── seeders/ # Database seeders
│ └── factories/ # Model factories
├── 🧪 tests/ # Test files
│ ├── Feature/ # Feature tests
│ └── Unit/ # Unit tests
├── 📖 docs/ # Documentation
│ ├── api/ # API documentation
│ └── screenshots/ # App screenshots
├── 🐳 docker/ # Docker configuration
├── 📄 Configuration files
│ ├── composer.json # PHP dependencies
│ ├── package.json # Node.js dependencies
│ ├── vite.config.js # Vite configuration
│ └── phpunit.xml # PHPUnit configuration
└── 🚀 Deployment files
├── .github/ # GitHub Actions
└── docker-compose.yml # Docker setup
- OpenAPI/Swagger:
docs/api/openapi.yaml - Postman Collection:
docs/api/SavedFeast_API.postman_collection.json
| Endpoint | Method | Description | Auth Required |
|---|---|---|---|
/api/register |
POST | User registration | ❌ |
/api/login |
POST | User authentication | ❌ |
/api/logout |
POST | User logout | ✅ |
/api/meals |
GET | List meals with filters | ❌ |
/api/meals/filters |
GET | Get filter options | ❌ |
/api/categories |
GET | Get meal categories | ❌ |
/api/orders |
GET/POST | User orders | ✅ |
/api/orders/{id} |
GET/PUT | Specific order | ✅ |
/api/user/profile |
POST | Update profile | ✅ |
/api/provider/meals |
GET/POST/PUT/DELETE | Provider meal management | ✅ (Provider) |
/api/admin/dashboard |
GET | Admin dashboard | ✅ (Admin) |
# Include Bearer token in requests
Authorization: Bearer {your_access_token}- Auth endpoints: 20 requests/minute
- Public endpoints: 60 requests/minute
- Authenticated endpoints: 120 requests/minute
- Provider endpoints: 300 requests/minute
- Admin endpoints: 600 requests/minute
# Run all tests
composer test
# Run tests with coverage
composer test:coverage
# Run tests in parallel
composer test:parallel
# Run specific test file
php artisan test tests/Feature/AuthTest.php
# Frontend tests
npm test
npm run test:coveragetests/
├── Feature/ # Feature tests
│ ├── AuthTest.php # Authentication tests
│ ├── MealTest.php # Meal management tests
│ └── OrderTest.php # Order processing tests
├── Unit/ # Unit tests
│ └── ExampleTest.php # Unit test examples
└── TestCase.php # Base test class
- Feature Tests: Test complete user workflows
- Unit Tests: Test individual components and methods
- Database Tests: Use database transactions for isolation
- API Tests: Test all API endpoints and responses
- Coverage: Maintain >90% code coverage
# Set production environment
APP_ENV=production
APP_DEBUG=false
APP_URL=https://yourdomain.com
# Database configuration
DB_HOST=your-db-host
DB_DATABASE=your-db-name
DB_USERNAME=your-db-user
DB_PASSWORD=your-db-password
# Mail configuration
MAIL_MAILER=smtp
MAIL_HOST=your-smtp-host
MAIL_PORT=587
MAIL_USERNAME=your-email
MAIL_PASSWORD=your-password
MAIL_ENCRYPTION=tls
# File storage
FILESYSTEM_DISK=s3 # or other cloud storage-
Prepare the application
composer install --optimize-autoloader --no-dev npm run build
-
Database setup
php artisan migrate --force php artisan storage:link
-
Cache optimization
php artisan config:cache php artisan route:cache php artisan view:cache
-
Web server configuration
- Configure Apache/Nginx
- Set up SSL certificate
- Configure queue workers
# Build and run with Docker
docker-compose up -d
# Or use Laravel Sail
./vendor/bin/sail up -d# Backend commands
php artisan serve # Start Laravel server
php artisan migrate # Run migrations
php artisan migrate:fresh --seed # Reset and seed database
php artisan make:controller # Create controller
php artisan make:model # Create model
php artisan make:migration # Create migration
php artisan route:list # List all routes
php artisan tinker # Interactive shell
# Frontend commands
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Run ESLint
npm run lint:fix # Fix linting issues
npm run type-check # Run TypeScript check
# Combined commands
npm run serve:full # Start both servers
composer test # Run PHP tests
npm test # Run frontend tests- Code Style: Follow PSR-12 and ESLint configuration
- Commits: Use conventional commit messages
- Branches: Use feature branches for new development
- Testing: Write tests for new features and bug fixes
- Documentation: Update documentation for API changes
We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch
git checkout -b feature/amazing-feature
- Make your changes
- Run tests and linting
composer test npm run lint npm test
- Commit your changes
git commit -m 'feat: add amazing feature' - Push to the branch
git push origin feature/amazing-feature
- Open a Pull Request
We follow the Conventional Commits specification:
feat:New featuresfix:Bug fixesdocs:Documentation changesstyle:Code style changesrefactor:Code refactoringtest:Test changeschore:Build process or auxiliary tool changes
# Check database configuration
php artisan config:clear
php artisan cache:clear
# Verify database connection
php artisan tinker
DB::connection()->getPdo();# Clear node modules and reinstall
rm -rf node_modules package-lock.json
npm install
# Clear Vite cache
npm run dev -- --force# Set proper permissions
chmod -R 755 storage bootstrap/cache
chown -R www-data:www-data storage bootstrap/cache# Clear composer cache
composer clear-cache
# Update composer
composer self-update- 📖 Documentation: Check this README and inline code comments
- 🐛 Issues: Report bugs via GitHub Issues
- 💬 Discussions: Use GitHub Discussions
- 📧 Email: Contact us at support@savedfeast.com
This project is licensed under the MIT License - see the LICENSE file for details.
- Laravel Team: For the amazing PHP framework
- React Team: For the incredible UI library
- Bootstrap Team: For the excellent CSS framework
- Open Source Community: For the incredible libraries and tools
For support and questions:
- 📧 Email: support@savedfeast.com
- 🐛 Issues: GitHub Issues
- 💬 Discussions: GitHub Discussions
- 📖 Documentation: Check the
docs/folder







