A microservices-based web application for parsing, storing, and searching recipes from external websites. The system consists of a parser service, a recipe service, and a frontend application.
The application follows a microservices architecture with the following components:
- Parser Service: Extracts recipe data from websites using web scraping and JSON-LD parsing
- Recipe Service: Stores, manages, and provides search capabilities for recipes
- Frontend: React-based user interface for interacting with the system
- Message Queue: Kafka for asynchronous communication between services
- Storage: PostgreSQL (user data), Elasticsearch (recipe search), Redis (caching)
- Security: JWT-based authentication with token cookies
- Java 21
- Spring Boot 3.x
- Spring Security
- Spring Data JPA
- Spring Data Elasticsearch
- Spring Kafka
- Spring Cloud Vault
- React 19
- React Router
- React Scripts
- PostgreSQL
- Elasticsearch
- Redis
- Apache Kafka
- Docker & Docker Compose
- Vault (secrets management)
- Maven
- Node.js/npm
- Web Scraping: Extracts recipe data from supported websites using Jsoup
- JSON-LD Parsing: Parses structured recipe data from JSON-LD scripts
- Caching: Redis-based caching for visited URLs and parsed recipes
- Scheduled Parsing: Automated recipe fetching at configurable intervals
- Kafka Integration: Sends parsed recipes to Kafka for processing
- Kafka Consumer: Processes recipe messages from Kafka
- Elasticsearch Storage: Indexes recipes for efficient searching
- Advanced Search: Search by name, ingredients, and filterable parameters
- User Management: Registration, authentication, and authorization
- Favorites: Users can save and manage favorite recipes
- CSRF Protection: Built-in CSRF token protection
- React 19: Modern React with hooks and functional components
- Routing: React Router for navigation
- API Integration: RESTful API communication with the backend
POST /api/v1/auth/reg - User registration
POST /api/v1/auth/login - User login
GET /api/v1/account/favorite - Get favorite recipes
POST /api/v1/account/favorite - Add recipe to favorites
DELETE /api/v1/account/favorite - Remove recipe from favorites
GET /api/v1/search/name/{name} - Search by recipe name
POST /api/v1/search/ingredients - Search by ingredients
POST /api/v1/search/with-filtering - Search with filters
GET /csrf - Get CSRF token
- Docker and Docker Compose
- Java 21
- Maven
- Node.js and npm
# Build all services
docker-compose build
# Start all services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop all services
docker-compose down- Start Infrastructure:
docker-compose up -d kafka postgres elasticsearch redis vault- Build and Run Parser Service:
cd parser-service-api
mvn clean install
mvn spring-boot:run- Build and Run Recipe Service:
cd recipe-service-api
mvn clean install
mvn spring-boot:run- Run Frontend:
cd frontend
npm install
npm start- JWT-based authentication with cookie storage
- CSRF protection with token-based validation
- Password encryption using BCrypt
- Role-based access control
- Secure HTTP-only cookies
-
Recipe Parsing Flow:
Parser Service -> Web Scraping -> Recipe Extraction -> Kafka -> Recipe Service -> Elasticsearch -
Search Flow:
Frontend -> Recipe Service -> Elasticsearch -> Filtered Results -> Frontend -
Authentication Flow:
Frontend -> Login/Register -> JWT Token -> Cookie -> Subsequent Requests
- Health Checks: Spring Boot Actuator endpoints available
- Logging: Structured logging with logback configuration