A modern, scalable recipe management application built with Spring Boot microservices architecture and a React frontend. This project demonstrates enterprise-level microservices patterns including service discovery, API gateway, and distributed data management.
SmartRecipes implements a microservices architecture with the following components:
- Port:
8761 - Purpose: Service registry and discovery
- Technology: Spring Cloud Netflix Eureka
- URL:
http://localhost:8761
Features:
- Central service registry
- Health monitoring
- Load balancing support
- Service instance management
- Port:
8888 - Purpose: Centralized configuration management
- Technology: Spring Cloud Config Server
Features:
- External configuration management
- Environment-specific configurations
- Dynamic configuration updates
- Port:
9999 - Purpose: API Gateway and routing
- Technology: Spring Cloud Gateway
- URL:
http://localhost:9999
Features:
- Unified entry point for all microservices
- Request routing and filtering
- Load balancing
- Cross-cutting concerns (CORS, authentication)
Routing:
/api/users/**β User Service/api/recipes/**β Recipe Service/api/ratings/**β Rating Service
- Port:
8081 - Purpose: User management and authentication
- Database:
userdb(MySQL) - URL:
http://localhost:9999/api/users
Endpoints:
POST /api/users/register- Register new userPOST /api/users/login- User authenticationGET /api/users/{id}- Get user detailsPUT /api/users/{id}- Update user profile
Entity Model: ```java User { Long id String username String email String password LocalDateTime createdAt } ```
- Port:
8082 - Purpose: Recipe CRUD operations
- Database:
recipedb(MySQL) - URL:
http://localhost:9999/api/recipes
Endpoints:
GET /api/recipes- List all recipesGET /api/recipes/{id}- Get recipe detailsPOST /api/recipes- Create new recipePUT /api/recipes/{id}- Update recipeDELETE /api/recipes/{id}- Delete recipeGET /api/recipes/user/{userId}- Get user's recipes
Entity Model: ```java Recipe { Long id String title String description String ingredients String steps String category Long userId LocalDateTime createdAt } ```
- Port:
8083 - Purpose: Recipe rating and review system
- Database:
ratingdb(MySQL) - URL:
http://localhost:9999/api/ratings
Endpoints:
POST /api/ratings- Add rating to recipeGET /api/ratings/recipe/{recipeId}- Get recipe ratingsGET /api/ratings/user/{userId}- Get user's ratingsGET /api/ratings/average/{recipeId}- Get average rating
Entity Model: ```java Rating { Long id Long recipeId Long userId Integer rating (1-5) String comment LocalDateTime createdAt } ```
- Java 17 - Core language
- Spring Boot 3.x - Application framework
- Spring Cloud - Microservices infrastructure
- Spring Cloud Netflix Eureka - Service discovery
- Spring Cloud Gateway - API Gateway
- Spring Cloud Config - Configuration management
- H2 - Database (3 separate databases)
- Maven - Build tool
- Lombok - Boilerplate code reduction
- JPA/Hibernate - ORM
- Next.js 16 - React framework
- React 19 - UI library
- TypeScript - Type safety
- Tailwind CSS v4 - Styling
- shadcn/ui - Component library
- Java 17 or higher
- MySQL Server 8.0+
- Node.js 18+ (for frontend)
- Maven 3.6+
Update database credentials in each service's application.yml:
Start services in this order:
-
Config Service (Optional) ```bash cd config-service mvn spring-boot:run ```
-
Discovery Service (Eureka) ```bash cd discovery-service mvn spring-boot:run Access at http://localhost:8761 ```
-
Gateway Service ```bash cd gateway-service mvn spring-boot:run API available at http://localhost:9999 ```
-
Business Services (parallel) ```bash ```
-
Frontend ```bash npm install npm run dev
Access at http://localhost:3000
```
Check Eureka Dashboard to see all registered services: http://localhost:8761
- β Service Discovery - Eureka for dynamic service registration
- β API Gateway - Single entry point with routing
- β Database per Service - Each microservice has its own database
- β RESTful APIs - Standard HTTP methods for CRUD operations
- β Distributed Data Management - Independent data stores
- β Health Monitoring - Service health checks via Eureka
- π User registration and authentication
- π Full CRUD operations for recipes
- β 5-star rating system with comments
- π€ User profile management
- π Average rating calculations
- π¨ Modern, responsive UI
- π½οΈ Recipe categorization (Breakfast, Lunch, Dinner, etc.)
Each microservice registers with Eureka and can be accessed through the Gateway on port 9999.
Service Ports:
| Service | Port | Access Via Gateway |
|---|---|---|
| Discovery (Eureka) | 8761 | Direct only |
| Config Server | 8888 | Direct only |
| Gateway | 9999 | Main entry point |
| User Service | 8081 | /api/users/** |
| Recipe Service | 8082 | /api/recipes/** |
| Rating Service | 8083 | /api/ratings/** |
- Fork the repository
- Create your 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
- Amine ELFALKI - GitHub Profile
β If you found this project helpful, please give it a star!