This document provides a comprehensive overview of the Real Estate Application, designed to streamline the process of buying, selling, and renting real estate properties. It connects property owners with potential buyers or tenants through a user-friendly interface.
The application leverages a microservices architecture, enhancing scalability and deployment efficiency. Each microservice is dedicated to a specific function within the application, facilitating independent development and maintenance.
-
Advert Service (
/advert
):GET /
: List all adverts.GET /{id}
: Get an advert by ID.POST /
: Create a new advert.PUT /{id}
: Update an advert by ID.DELETE /{id}
: Delete an advert by ID.GET /adverts/{userId}
: Get all adverts by user ID.
-
Auth Service (
/auth
):POST /token
: Generate an authentication token.GET /validate
: Validate an authentication token.POST /register
: Register a new user.
-
Order Service (
/order
):GET /
: List all orders.GET /{id}
: Get an order by ID.POST /
: Create a new order.PUT /{id}
: Update an order by ID.GET /availableAdvertRights/{userId}
: Get available advert rights by user ID.GET /orderByUserId/{userId}
: Get orders by user ID.
-
Payment Service (
/payment
):GET /
: List all payments.GET /{id}
: Get a payment by ID.POST /
: Create a new payment.PUT /{id}
: Update a payment by ID.GET /{orderId}
: Get payments by order ID.
-
User Service (
/user
):GET /
: List all users.GET /{id}
: Get a user by ID.PUT /{id}
: Update a user by ID.GET /exists/{id}
: Check if a user exists by ID.
- Backend: Java with Spring Boot for microservices.
- Frontend: Next.js/Typescript for the user interface.
- Database: PostgreSQL for data storage.
- Messaging: RabbitMQ for asynchronous communication.
- Containerization: Docker & Docker Compose for service orchestration.
To run the application locally:
- Clone the repository:
git clone https://github.com/celebiabdulkadir/realestateapp.git cd realestateapp
Build and start the services using Docker Compose:
docker-compose up --buildDirectory Structure
/advert/: Advert Service and its Dockerfile.
/auth/: Auth Service and its Dockerfile.
/order/: Order Service and its Dockerfile.
/payment/: Payment Service and its Dockerfile.
/user/: User Service and its Dockerfile.
/gateway/: Gateway Service and its Dockerfile.
/serviceregistry/: Service Registry and its Dockerfile.
docker-compose.yaml: Docker Compose configuration.
Detailed API endpoints for each service are provided in the Services and Endpoints section above.
After setting up the microservices, you can start the frontend application as follows:
1- Ensure Node.js is installed on your system. You can download it from https://nodejs.org/.
2- Navigate to the frontend directory:
cd frontend3- Install the necessary dependencies:
npm install4- Start the development server:
npm run devThe application will be accessible at http://localhost:3000.
Path: /
Description: The landing page of the application, showcasing featured properties/adverts and recent listings. Displays a list of properties available for sale or rent
Path: /
Description: You can create and edit the advert that you created
Property Detail Page
Path: /advert/:id
Description: Detailed view of a property, including photos, price, description, and contact information.
User Packages Page
Path: /packages
Description: The packages that user bought and display advert rights
Package Purchase Screen
Path: /packages
Description: You can buy package to get advert right to publish adverts
Login Page
Path: /login
Description: Authentication page for users to log in.
Register Page
path: /register
Desription: Register new user