This repository is a demo application used for an internal campus showing the usage of MongoDBs geospatial index capabilities. The database stores points of interest (POI) that are shown on a map on frontend websites. The websites call backend services that connect to the MongoDB database. To show different ways of working with MongoDB, multiple backend technologies (.NET Core, JEE/Jakarta, Spring) and frontend technologies (Angular, ASP.NET Core MVC) are included in the repo.
- AI-Assisted Code Generation
- Quickstart
- Prerequisites
- Run the demo (fast path)
- Subprojects / Layout
- Test data
- Development notes
- License
- Contact
This project includes code that has been partially generated or written using artificial intelligence (AI) tools. These AI tools have been utilized to enhance productivity, ensure code quality, and expedite development processes. While AI has contributed to the creation of certain segments of the code, all outputs have been thoroughly reviewed and tested by human developers to ensure accuracy and reliability.
- GitHub Copilot Business: Utilized to assist in code completion and generation, enhancing developer productivity and code quality. GitHub Copilot Business offers advanced features tailored for enterprise use, including compliance and administrative controls.
Despite the involvement of AI in code generation, every piece of code has undergone rigorous review and testing by our development team. This ensures that the code meets our quality standards and functions as intended within the project.
We acknowledge the advancements in AI technology that have made these tools available and appreciate the support they provide in modern software development.
For any questions or concerns regarding the AI-generated code, please feel free to contact us.
These steps will get a local demo running (frontend + example backend + local MongoDB).
-
Start MongoDB (from the
MongoDBfolder)- Windows PowerShell:
docker-compose -f [docker-compose.yml](http://_vscodecontentref_/6) up -d - Confirm MongoDB is up:
docker ps - Of course you can use any other MongoDB installation.
- For more information (i.e. database prerequisites) see the folders README.
- Windows PowerShell:
-
Start a backend and a frontend:
- See each subproject README for exact commands and ports (examples below).
- The backends are configured to run under http://localhost:8080/zdi-geo-service/api/
- Swagger for the backends is available under http://localhost:8080/zdi-geo-service/swagger/
-
Open a frontend in your browser:
- Angular frontend: http://localhost:4200
- ASP.NET Core frontend: http://localhost:4200 (same port for consistency)
Frontend demo: POIs loaded relative to the map center — click to view full-size.
Frontend demo: List of POIs loaded with the given coordinates — click to view full-size.
- Docker & Docker Compose (when using the provided Docker files).
- Node.js (for the Angular frontend) and npm/yarn
- Java 21+ and Maven (for the JEE / Spring backend and the testdata generator)
- .NET 9.0 SDK (for the .NET backend and ASP.NET Core frontend)
Its not necessary to have all technologies - select the frontend and backend of your choice.
This demo offers multiple technology combinations:
Frontend Options:
- Angular (
angular-maps-frontend/) - SPA with TypeScript - ASP.NET Core MVC (
dotnet-maps-frontend/) - Server-side rendering with Razor Backend Options: - JEE/Jakarta (
jee-mongodb-backend/) - Traditional enterprise Java - .NET Core (
dotnet-mongodb-backend/) - Modern C# async API - Java Spring (
spring-mongodb-backend) - Spring Boot technology
- Start MongoDB:
- PowerShell:
cd MongoDB docker-compose up -d
- PowerShell:
- Run a backend (choose one):
- JEE Backend (example):
cd jee-mongodb-backend mvn clean package # deployment will depend on how the JEE war is executed; see the sub-README - OR .NET Backend:
cd dotnet-mongodb-backend dotnet run - OR Spring Backend:
cd spring-mongodb-backend mvn clean package mvn spring-boot:run
- JEE Backend (example):
- Run a frontend (choose one):
- Angular Frontend:
cd angular-maps-frontend npm install npm start - OR ASP.NET Core Frontend:
cd dotnet-maps-frontend dotnet run # Access at: http://localhost:4200/Map
- Angular Frontend:
Note: exact ports and steps vary by backend. See the subproject READMEs for full, correct commands.
angular-maps-frontend— Angular app that displays POIs on a map and calls the backend for POIs near the current map center. See Angular Frontend Readme.dotnet-maps-frontend— ASP.NET Core MVC app with full CRUD operations (Create, Edit, Delete POIs). Features interactive maps with Leaflet.js, dual list views (cards/table), synchronized controls between pages, and localStorage-based settings. See Dotnet Frontend Readme.jee-mongodb-backend— Jakarta (JEE) backend service. Contains REST endpoints and mapping to MongoDB. Integration tests use Testcontainers for MongoDB. See JEE Backend Readme.dotnet-mongodb-backend— .NET Core backend service with MongoDB integration. High-performance async REST API. Integration tests use Testcontainers for MongoDB. See Dotnet Backend Readme.spring-mongodb-backend- Java Spring backend service with MongoDB integration. Integration tests use Testcontainers for MongoDB. See Spring Backend Readme.MongoDB— Docker + compose configuration and initialization scripts. Use this to run a MongoDB instance with Docker.testdata-generation— Java tool to parse GPX files and POST POIs to a running backend to populate test data.
Use the testdata-generation project to generate and POST sample POIs:
- Build the generator:
cd testdata-generation
mvn clean package
Run with the generated jar (example):
java -jar target/geo-service-testdata-generation-1.0-SNAPSHOT.jar
See testdata-generation/README.md for full options.
- The frontend loads POIs relative to the map center. Adjust backend query parameters to test different geospatial queries.
- The
MongoDB/init-mongo.jsscript contains example index creation and sample dataset initialization. - If you modify backend data models, ensure the frontend and test-data generator still post/consume the same JSON shape.
This project is licensed under the terms of the MIT license. See LICENSE.md for details.
Maintainers / Authors: see repository metadata or contact the repository owner.