Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/saurabh9136/user-location-api
User location API is a Spring boot project which allows user to find there nearest users using API. tech stack Used Spring Boot. Gradle. Hibernate JPA, MySQL
https://github.com/saurabh9136/user-location-api
gradle hibernate-jpa mysql-database spring-boot
Last synced: 11 days ago
JSON representation
User location API is a Spring boot project which allows user to find there nearest users using API. tech stack Used Spring Boot. Gradle. Hibernate JPA, MySQL
- Host: GitHub
- URL: https://github.com/saurabh9136/user-location-api
- Owner: saurabh9136
- Created: 2023-08-09T05:51:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-28T06:03:55.000Z (8 months ago)
- Last Synced: 2024-03-28T07:24:57.099Z (8 months ago)
- Topics: gradle, hibernate-jpa, mysql-database, spring-boot
- Language: Java
- Homepage:
- Size: 65.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
**User Location Spring Boot API**
This project implements a Spring Boot application with a REST API for managing user locations.**Features**
User Roles:
ADMIN: CRUD (Create, Read, Update, Delete) operations on user location data.
READER: View nearest N users based on location data.
Database: HSQLDB in-memory database (no manual table creation required).
REST APIs:
POST /create_data: Creates a table named user_location with user name, latitude, and longitude fields.
PUT /update_data: Updates user location data based on user name.
GET /get_users/{N}: Retrieves the N nearest users from a provided location (0,0 by default).**User Roles and Access Control**
The application utilizes Spring Security to enforce role-based access control. Users can be assigned either ADMIN or READER roles:**ADMIN**: Authorized for all API endpoints (create, read, update, and delete).
**READER**: Limited to the GET /get_users/{N} endpoint to retrieve nearest users.**Technologies Used**
Spring Boot
Spring Security
HSQLDB**Running the Application**
Clone the repository.
Install dependencies using Gradle: ./gradlew build
Run the application: ./gradlew bootRun**Code Quality**
Unit tests ensure core functionality.
Checkstyle configuration promotes code readability and maintainability.**Further Enhancements**
Integrate with a real database like MySQL or PostgreSQL.
Enhance location search algorithm with geospatial libraries.