Backend for the Netzgrafik-Editor | Read-only mirror of https://github.com/SchweizerischeBundesbahnen/netzgrafik-editor-backend — SBB. Issues & pull requests at the source.
  • Java 99.9%
  • Shell 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-24 15:07:27 +01:00
.github chore(ci): bump the github-actions group with 5 updates 2026-11-04 09:11:51 +00:00
keycloak/config Add netzgrafik-editor backend source 2024-02-13 21:11:54 +01:00
src Merge pull request #73 from OpenRailAssociation/dependabot/maven/org.springframework.boot-spring-boot-starter-parent-4.1.2 2026-11-19 14:07:07 +01:00
.gitignore chore: ignore .vscode/settings.json 2026-05-04 09:55:25 +02:00
.release-please-manifest.json chore(main): release 3.0.3 2026-11-24 13:05:10 +01:00
CHANGELOG.md chore(main): release 3.0.3 2026-11-24 12:23:28 +00:00
CI.md Add Manifest Driven release-please. 2024-08-06 08:16:05 +02:00
CODE_OF_CONDUCT.md docs(CODE_OF_CONDUCT): update email address 2025-05-19 13:08:18 +02:00
CODING_STANDARDS.md Add netzgrafik-editor backend source 2024-02-13 21:11:54 +01:00
CONTRIBUTING.md Update CONTRIBUTING.md 2024-08-21 07:40:20 +02:00
docker-compose.yml Merge pull request #70 from OpenRailAssociation/dependabot/docker_compose/keycloak/keycloak-26.8 2026-11-19 13:51:28 +01:00
GOVERNANCE.md chore: add MAINTAINERS and GOVERNANCE 2025-05-19 13:08:35 +02:00
LICENSE chore: add full Apache 2.0 license text 2025-06-06 11:28:23 +02:00
MAINTAINERS.md Update MAINTAINERS.md 2025-05-21 08:09:09 +02:00
pom.xml Merge pull request #91 from OpenRailAssociation/chore/release-3.0.3 2026-11-24 13:13:30 +01:00
README.md Add link to one-stop-shop Docker Compose based demo. 2025-02-07 15:28:29 +01:00
release-please-config.json chore(main): release 3.0.3 2026-11-24 13:05:10 +01:00
run.sh fix: user email ignore equalIgnoreCase 2026-03-26 10:16:57 +01:00

Netzgrafik-Editor Backend API

This repository contains the source for the backend API for the Netzgrafik-Editor frontend.

  • Spring Framework with Spring Boot is used to implement the REST API.
  • Data is stores in the PostgreSQL relational database.
  • jOOQ is used to access the database through a database-independent SQL-Like Domain-Specific-Language. For that the jOOQ framework generates classes for every table, row, index and sequence in the database. This allows for type-save declarations of SQL queries.
  • Flyway migrations are used to manage the database schema (see src/main/resources/db.migration).
  • Project Lombok enhances the Java code with additional language features.
  • H2 is used as an in-memory database for end-to-end integration tests.

Online Demo

Extern: nge.flatland.cloud - powered by Flatland Association

( Sample Netzgrafik - How to Import JSON )

Setup Local Demo Environment with Docker Compose

Use extern: netzgrafik-editor-docker-compose for a one-line setup based on Docker Compose - powered by Flatland Association.

Getting-Started

Setup Development Environment

Prerequisites

  • Java JDK 21
  • Maven >= 3.9.7
  • Docker and docker-compose

Command line setup guide

  1. Clone the repository:

    git clone https://github.com/SchweizerischeBundesbahnen/netzgrafik-editor-backend.git
    cd netzgrafik-editor-backend
    
  2. Start the local development environment (PostgreSQL, Keycloak):

    docker compose up -d
    
  3. Setup environment variables

    export DB_URL=jdbc:postgresql://localhost/netzgrafikeditor
    export DB_USER=netzgrafikeditor
    export DB_PASSWORD=netzgrafikeditor
    export CORS_ALLOWED_ORIGINS=*
    export AUTH_SERVICE_NAME=fc44839c-e95f-4854-a52d-449867a9aa62
    
  4. Start the app using maven

    # run application with Flyway migration
    mvn spring-boot:run
    

    The database schema is managed using Flyway. Migrations are placed under src/main/resources/db/migration and can be executed using maven. Automatic migrations can be disabled using -Dspring.flyway.enabled=false (see e.g. https://www.baeldung.com/database-migrations-with-flyway)

    Migrations can also be run separately:

    mvn flyway:migrate
    

License

This project is licensed under Apache 2.0.

Contributing

This repository includes a CONTRIBUTING.md file that outlines how to contribute to the project, including how to submit bug reports, feature requests, and pull requests.

Coding Standards

This repository includes a CODING_STANDARDS.md file that outlines the coding standards that you should follow when contributing to the project.

Code of Conduct

To ensure that your project is a welcoming and inclusive environment for all contributors, you should establish a good CODE_OF_CONDUCT.md

Continuous Integration

This repository uses release-please for CHANGELOG generation, the creation of GitHub releases, and version bumps for your projects. See CI.md for details.