Skip to content

About

Navigation App Backend For Uni Project. (<3 Springboot)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Indoor Navigation System Backend

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).

Key Features

  • 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.

Tech Stack

  • Java 17
  • Spring Boot 3.2.x (Web, WebSocket, Data JPA)
  • H2 Database (In-Memory)
  • Maven
  • Docker

Prerequisites

Setup & Running the Application

Local Development

  1. Clone the repository:

    git clone https://github.com/YOUR_USERNAME/navigation-backend.git
    cd navigation-backend
  2. Run the application using Maven:

    mvn spring-boot:run
  3. 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.

Database Access (H2 Console)

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)

Test Endpoints

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

Project Architecture

  • 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).

Docker Deployment (Multi-stage Build)

Deployment can effortlessly be carried out utilizing the native lightweight multi-stage Dockerfile.

  1. Build the Docker Image:

    docker build -t navigation-backend .
  2. 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.

Contribution Guidelines

If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.

About

Navigation App Backend For Uni Project. (<3 Springboot)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages