Architecture Overview
Let's explore the architecture of our restaurant review platform, examining how different components work together to create a robust system for restaurant discovery and reviews.
System Components
Our architecture consists of four main components:
-
Frontend (Next.js)
- Provides the user interface
- Handles client-side interactions
- Communicates with backend via REST API
- While not the focus of our implementation, code will be provided if you wish to run it
-
Backend (Spring Boot)
- Core of our implementation
- Processes business logic
- Manages data flow between frontend and persistence layer
- Handles authentication and authorization
- Exposes REST API endpoints
-
Elasticsearch
- Serves as our persistence layer
- Stores all primary data
- Provides advanced search capabilities
-
Keycloak Server
- Manages authentication and user management
- Implements OAuth 2 and OpenID Connect standards
- Integrates with Spring Security
- Handles user creation and management
Development Environment
Our development environment will utilize Docker to run both Elasticsearch and Keycloak:
- Docker Compose will be used to orchestrate these services
- This approach simplifies the development process
- Allows for consistent environment setup
Technical Considerations
While this architecture involves some trade-offs, particularly in using Elasticsearch as our primary data store, it offers several advantages:
- Advanced search capabilities out of the box
- Geospatial search features
- Flexible schema for storing restaurant and review data
- Powerful text analysis for review content
Architecture Diagram

Summary
- Frontend uses
Next.jsto handle UI and client-side interactions - Backend uses
Spring Bootfor business logic and API endpoints Elasticsearchstores data and enables advanced search featuresKeycloakmanages authentication using OAuth 2 and OpenID Connect