A full-stack online food delivery application that connects restaurants with food enthusiasts. Built with Spring Boot 3 and React 18, Swarg-Food provides a seamless multi-vendor platform for restaurant owners and customers.
- π Secure user authentication with JWT
- π Browse multiple restaurants and their menus
- β€οΈ Add favorite restaurants and dishes
- π Shopping cart functionality
- π³ Secure payment processing with Stripe
- π§ Email notifications for order updates
- π Password reset via email
- π± Responsive design for all devices
- πͺ Restaurant registration and management
- π Dedicated admin panel for each restaurant
- π½οΈ Menu and food category management
- π₯ Ingredient inventory tracking
- π¦ Order management system
- π Event creation and management
- π Dashboard with analytics
- π Super admin panel
- π Role-based access control
- π’ Multi-vendor management
- π Platform-wide analytics
- Spring Boot 3.3.1 - Core framework
- Spring Security - Authentication & authorization
- Spring Data JPA - Database operations
- MySQL - Relational database
- JWT (JSON Web Tokens) - Secure authentication
- Stripe API - Payment processing
- Java 17 - Programming language
- Lombok - Boilerplate code reduction
- Maven - Dependency management
- React 18.3.1 - UI library
- Redux - State management
- Material-UI (MUI) 5 - Component library
- Tailwind CSS - Utility-first styling
- React Router DOM 6 - Navigation
- Formik & Yup - Form handling and validation
- React Slick - Carousel component
- Day.js - Date manipulation
Before running this project, make sure you have:
- Java 17 or higher
- Node.js 16 or higher
- MySQL 8 or higher
- Maven 3.6 or higher
- Stripe Account (for payment processing)
- Clone the repository
git clone <repository-url>
cd swarg-food- Configure MySQL Database
CREATE DATABASE swarg_food;- Update application properties
Navigate to backend-app/src/main/resources/application.properties and configure:
spring.datasource.url=jdbc:mysql://localhost:3306/swarg_food
spring.datasource.username=your_mysql_username
spring.datasource.password=your_mysql_password
# JWT Configuration
jwt.secret=your_jwt_secret_key
# Stripe Configuration
stripe.api.key=your_stripe_secret_key
# Email Configuration
spring.mail.host=smtp.gmail.com
spring.mail.port=587
spring.mail.username=your_email@gmail.com
spring.mail.password=your_email_password- Run the backend
cd backend-app
./mvnw spring-boot:runThe backend server will start on http://localhost:8080
- Navigate to frontend directory
cd frontend-app- Install dependencies
npm install- Configure environment variables
Create a .env file in the frontend-app directory:
REACT_APP_API_URL=http://localhost:8080
REACT_APP_STRIPE_PUBLIC_KEY=your_stripe_public_key- Start the development server
npm startThe frontend will start on http://localhost:3000
swarg-food/
βββ backend-app/
β βββ src/
β β βββ main/
β β β βββ java/
β β β β βββ com/swarg/
β β β β βββ config/
β β β β βββ controller/
β β β β βββ model/
β β β β βββ repository/
β β β β βββ service/
β β β β βββ security/
β β β βββ resources/
β β βββ test/
β βββ pom.xml
β
βββ frontend-app/
βββ public/
βββ src/
β βββ AdminComponent/
β β βββ Admin/
β β βββ Dashboard/
β β βββ Menu/
β β βββ Orders/
β β βββ Ingredients/
β β βββ Events/
β β βββ FoodCategory/
β βββ component/
β βββ Routers/
β βββ Theme/
β βββ App.js
β βββ index.js
βββ package.json
- JWT-based authentication
- Role-based access control (Customer, Restaurant Owner, Admin)
- Secure password encryption
- Email verification and password reset
- Create and manage restaurant profiles
- Upload restaurant images and details
- Set operating hours and delivery areas
- Manage restaurant status (open/closed)
- Create food categories
- Add/edit/delete menu items
- Manage ingredients and availability
- Set pricing and discounts
- Real-time order tracking
- Order status updates
- Email notifications
- Order history
- Secure Stripe payment gateway
- Multiple payment methods
- Transaction history
- Refund management
- Carousel Display - Showcase featured restaurants and dishes
- Add to Favorites - Save favorite restaurants
- Shopping Cart - Manage orders before checkout
- Responsive Design - Mobile-first approach
- Material-UI Components - Professional and consistent UI
- Tailwind Utilities - Custom styling flexibility
- JWT token-based authentication
- Password encryption with BCrypt
- CORS configuration
- SQL injection prevention
- XSS protection
- CSRF protection
- Order confirmation emails
- Order status updates
- Password reset emails
- Welcome emails for new users
cd backend-app
./mvnw testcd frontend-app
npm testcd backend-app
./mvnw clean package
java -jar target/Online-Food-Order-0.0.1-SNAPSHOT.jarcd frontend-app
npm run buildContributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Swarg-Food Team
- Spring Boot community for excellent documentation
- React team for the powerful UI library
- Material-UI for beautiful components
- Stripe for secure payment processing
For support, email support@swargfood.com or open an issue in the repository.
β If you find this project useful, please consider giving it a star!
Built with β€οΈ using Spring Boot and React