A full-stack web application for restaurants to create, manage, and share digital menus via QR codes. Built with Java Spring Boot (backend) and React + Vite (frontend).
- Digital Menu Management: Create, edit, and organize restaurant menus and categories.
- QR Code Generation: Instantly generate QR codes for menus.
- User Roles: Admin, Manager, Co-Manager, and User roles with fine-grained permissions.
- Order Management: Place and track orders, including public order confirmation.
- Favorites & Cart: Users can favorite products and manage a shopping cart.
- Profile Management: Upload and update profile pictures.
- Allergen Information: Display allergen icons for menu items.
- Multi-language Support: Easily switch between supported languages.
- Responsive UI: Modern, mobile-friendly interface.
QR_Menu_Generator/
β
βββ src/ # Backend (Java Spring Boot)
β βββ main/java/com/example/qr_menu/
β βββ configurations/ # Security, CORS, Web config
β βββ controllers/ # REST API endpoints
β βββ dto/ # Data Transfer Objects
β βββ entities/ # JPA Entities
β βββ exceptions/ # Global error handling
β βββ repositories/ # Spring Data JPA Repos
β βββ security/ # JWT, filters, utils
β βββ services/ # Business logic
β βββ utils/ # Utility classes
β
βββ front_end/ # Frontend (React + Vite)
β βββ src/
β β βββ api/ # API calls
β β βββ components/ # React components
β β βββ contexts/ # React context providers
β β βββ pages/ # Page components
β β βββ translations/ # i18n files
β β βββ utils/ # Utility functions
β βββ public/ # Static assets (images, icons)
β βββ index.html
β βββ package.json
β
βββ uploads/ # Uploaded images (profile, menu, products)
βββ README.md # Project documentation
- Java 17+
- Maven 3.6+
- MySQL or compatible database
-
Configure Database:
Editsrc/main/resources/application.propertieswith your DB credentials and JWT secret. -
Database Migration:
Flyway is used for DB migrations (seesrc/main/resources/db/migration/). -
Run the Application:
./mvnw spring-boot:run
The backend runs at http://localhost:8080.
- Authentication:
/api/auth/** - Accounts:
/api/accounts/** - Menus:
/api/menus/** - Products:
/api/products/** - Categories:
/api/categories/** - Orders:
/api/orders/** - Favorites:
/api/favorites/** - Manager Assignments:
/api/manager-assignments/** - Uploads:
/uploads/**(static files)
See controller classes in src/main/java/com/example/qr_menu/controllers/ for details.
- Node.js 18+
- npm 9+
-
Install dependencies:
cd front_end npm install -
Start the development server:
npm run dev
The frontend runs at http://localhost:5173.
-
Build for production:
npm run build
- Uses JWT for stateless authentication.
- Role-based access control is enforced in
SecurityConfig.java. - Public endpoints: login, registration, menu viewing, QR code generation, and static uploads.
- Protected endpoints: menu management, orders, favorites, account updates, etc.
- Uploaded images (profile pictures, menu images, product images) are stored in the
uploads/directory. - Static files are served via
/uploads/**endpoints. - Default images are available for products and profiles.
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature). - Commit your changes.
- Push to your branch and open a Pull Request.
This project is licensed under the MIT License.
For more details, see the code and comments in each module. If you have questions or need help, please open an issue or contact the maintainer.