This project serves as the backend service for the Indoor Navigation System, built with Spring Boot. It provides a real-time tracking, trilateration, and proximity calculation service utilizing standard Bluetooth Low Energy (BLE) beacons. It communicates essentially through robust WebSockets to sync navigation data instantaneously to clients (e.g., mobile apps, web dashboards).
- Real-time WebSocket Communication: Seamless and direct data pushing for location changes.
- BLE Beacon Processing: Algorithms handling RSSI values and parsing beacon packets.
- Proximity & Trilateration Algorithms: Dynamic calculation of user position within indoor mapped areas.
- H2 In-Memory Database: Lightweight and easy setup for bootstrapping the application.
- Scalable Architecture: Capable of handling significant load regarding coordinate translation overheads.
- Docker Ready: Application is containerized for straightforward deployment.
- Java 17
- Spring Boot 3.2.x (Web, WebSocket, Data JPA)
- H2 Database (In-Memory)
- Maven
- Docker
- Java Development Kit (JDK) 17 or higher
- Maven 3.8.x or higher
- Docker (Optional, for containerized deployment)
-
Clone the repository:
git clone https://github.com/YOUR_USERNAME/navigation-backend.git cd navigation-backend -
Run the application using Maven:
mvn spring-boot:run
-
Alternatively, package and run the JAR:
mvn clean package -DskipTests java -jar target/backend-0.0.1-SNAPSHOT.jar
The application will now be running on http://localhost:8080.
You can view the in-memory database layout, tables, and test data during runtime via the H2 Console.
- URL:
http://localhost:8080/h2-console - JDBC URL:
jdbc:h2:mem:navigationdb - User Name:
sa - Password: (Leave blank)
The system supplies lightweight front-end debugging tools by default across static resources.
- Test Page:
http://localhost:8080/test.html - WebSocket Endpoint:
ws://localhost:8080/ws/navigation
config/: Holds configuration files securely mapping global settings like WebSockets.controller/: Traditional REST endpoints, usually for health checks.handler/: Core WebSocket implementations capturing message ingestion and pushing routines.model/: Standard Entities defining domain structures (e.g., Beacons, LocationLogs, Points).repository/: JPA abstraction layers connecting models directly to data clusters.service/: Mathematical processing (Trilateration, Map rendering overrides, Position logic).
Deployment can effortlessly be carried out utilizing the native lightweight multi-stage Dockerfile.
-
Build the Docker Image:
docker build -t navigation-backend . -
Run the Docker Container:
docker run -d -p 8080:8080 --name indoor-nav-container navigation-backend
This spins up the finalized backend purely built out of JRE distributions, effectively dropping image sizes significantly compared to complete JDK instances.
If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.