Description: EstateAPI is a web application built using Java 17, PostgreSQL, Spring Security with JWT authentication, and a frontend developed in React JS. The application serves as a platform for managing real estate properties and user accounts.
Features:
1) User Authentication and Authorization: Utilizes Spring Security with JWT authentication to secure endpoints and manage user authentication and authorization.
2) User Management: Allows users to sign up, log in, and manage their accounts.
3) Real Estate Management: Provides functionalities to create, retrieve, update, and delete real estate properties.
4) RESTful API: Implements a RESTful API architecture for communication between the frontend and backend components. 5) Data Persistence: Utilizes PostgreSQL database to store user and real estate data securely. 6) Frontend Interface: The frontend interface is developed using React JS, providing a user-friendly interface for interacting with the application.
Technologies Used: ·Java 17
·Spring Security with JWT
·PostgreSQL
·React JS
Endpoints:
Authentication:
POST /auth/authenticate: Authenticates users and generates JWT token.
POST /auth/signup: Allows users to sign up and creates a new account.
User Management:
GET /api/users/me: Retrieves the current user's information.
GET /api/users: Retrieves a list of all users.
GET /api/users/{username}: Retrieves user information by username.
DELETE /api/users/{username}: Deletes a user account.
Real Estate Management:
GET /api/estates: Retrieves a list of all real estate properties.
GET /api/estates?text={searchText}: Retrieves real estate properties containing the specified text.
POST /api/estates: Creates a new real estate property.
DELETE /api/estates/{id}: Deletes a real estate property by ID.
Public Endpoints:
GET /public/numberOfUsers: Retrieves the total number of users.
GET /public/numberOfEstates: Retrieves the total number of real estate properties.
Setup Instructions:
Clone the repository containing the backend Java project. Set up a PostgreSQL database and configure the database connection in the application properties. Build and run the Java application using Maven or your preferred IDE. Clone the repository containing the React JS frontend. Install dependencies and start the frontend development server using npm. Access the application via the provided URL and begin using the features.
To install necessary libraries (node_modules) for React JS frontend npm install or npm i react-scripts and then in terminal of client part npm run start
-
To look Admin part: log: admin pas: admin
-
To look User part: log: user pas: user or sign up your own account
Screenshots of the project:
![image](https://private-user-images.githubusercontent.com/146642629/292860373-b53093c1-1d0d-4b82-ac98-1bdffe097c69.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjo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l9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.RRMfEI42oLW7EQNFZvFza68zCHNC59hV3mv8DF4d8BE)
![image](https://private-user-images.githubusercontent.com/146642629/292860543-f01e256a-c4f3-493e-beb7-5d0b44643320.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4MjUxNTMsIm5iZiI6MTcyMzgyNDg1MywicGF0aCI6Ii8xNDY2NDI2MjkvMjkyODYwNTQzLWYwMWUyNTZhLWM0ZjMtNDkzZS1iZWI3LTVkMGI0NDY0MzMyMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODE2JTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgxNlQxNjE0MTNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT01ODg4MWUxZDIxNzlhYWFkYWYyOGRlNTkwYTBlZTg2YWFhOTQ3YWQ4NjM3MzJhYWVhY2MyODA2ZGI1MDNkZGJiJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.h9CczI2Tvf8X8h17O8mKm4Ttz6p0NQB0xI32vl0AWyQ)
![image](https://private-user-images.githubusercontent.com/146642629/292860767-91049b9f-9c35-4f40-afaa-3d39e51bead0.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM4MjUx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