How rutbelcarlostc/cs-project-backend works
Project type and purpose
• This repository contains the server-side component of MapMap, an open-source public transit route mapping kit.
• According to the README, the server’s responsibilities are:
• Receiving georeferenced route data submitted by the Android mobile app
• Exposing RESTful endpoints for data retrieval
• Exporting route data as Shapefiles and CSV
File structure
• Top-level files:
• pom.xml, Maven wrapper, .mvn/ → Java 17+, Spring Boot 3, built with Maven
• scripts-bbdd/ → SQL scripts to seed/create the relational database
• Source code under src/main/java/org/codeandomexico/mapmap/server:
• controller/ → Spring MVC controllers (APIController, ExportController, MainController, UploadController)
• service/ → Business logic (UploadService, MainService, ExportService)
• repository/ → Spring Data JPA repositories (AgencyRepository, RouteRepository, TripPatternRepository, etc.)
• model/ → JPA @Entity classes (Agency, Route, Stop, TripPattern, etc.)
• util/ → Helpers (zip directories, polyline encoding, serializers)
• jpa/ → Hibernate naming strategy customization
• src/main/resources:
• application.properties → config (DB connection, ports, etc.)
• protobuffer/route.proto → definition for Protobuf messages submitted by mobile app
• public/ → static web assets (HTML templates, Mustache views, Bootstrap CSS/JS, Backbone, Leaflet, jQuery, Handlebars)
• templates/ → Mustache templates for server-side view rendering
• src/test/ → unit/integration tests for the Spring Boot application
README for additional insights
• Technology stack: Java 17+, Spring Boot 3, Maven, JPA/Hibernate
• Frontend uses server-rendered Mustache plus client-side Backbone.js, Leaflet.js, and related JS/CSS libraries
• Mobile app communicates via Protobuf messages over HTTP to the server’s upload endpoint
Detail
• Four controllers and their respective service flows
• Protobuf module as a dedicated component
• Where JPA entities map to database tables (scripts-bbdd)
• Two user-facing flows: data collection (upload) and data visualization/export