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.