# Projekt-Setup Standards ## Pflichtdateien für jedes neue Repo ### LICENSE.adoc ```adoc = DB Inner Source License (DBISL) Copyright (c) Deutsche Bahn AG Permission is hereby granted to any employee of Deutsche Bahn AG and its subsidiaries to use, copy, modify, and distribute this software within the Deutsche Bahn group of companies. This software may not be distributed outside of Deutsche Bahn AG without explicit written permission. ``` ### scm-info.yaml ```yaml name: "{project-name}" description: "{kurze Beschreibung}" owner: team: "{team-name}" email: "{team-email}" lifecycle: "active" classification: "internal" language: "{java|python|go|typescript}" ``` ### README.md ```markdown # {Project Name} [![Pipeline](https://git.tech.rz.db.de/{group}/{project}/badges/main/pipeline.svg)] [![Coverage](https://git.tech.rz.db.de/{group}/{project}/badges/main/coverage.svg)] ## Beschreibung {Was macht das Projekt} ## Quickstart {Wie starte ich es lokal} ## Build & Test {Build- und Test-Befehle} ## Deployment {Wie wird es deployed} ``` ### .gitignore Passend zum Stack generieren (Java: target/, .idea/ | Python: __pycache__/, .venv/ | etc.) ### .gitlab-ci.yml Siehe gitlab-ci.md ## Repo-Struktur nach Stack ### Java (Spring Boot) ``` ├── src/main/java/de/db/{team}/{project}/ │ ├── controller/ │ ├── service/ │ ├── repository/ │ ├── model/ │ └── config/ ├── src/main/resources/ │ └── application.yml ├── src/test/java/de/db/{team}/{project}/ ├── pom.xml ├── LICENSE.adoc ├── scm-info.yaml ├── README.md ├── .gitignore └── .gitlab-ci.yml ``` ### Python (FastAPI) ``` ├── src/{project}/ │ ├── __init__.py │ ├── main.py │ ├── api/ │ ├── services/ │ ├── models/ │ └── config.py ├── tests/ ├── pyproject.toml ├── LICENSE.adoc ├── scm-info.yaml ├── README.md ├── .gitignore └── .gitlab-ci.yml ``` ### Go ``` ├── cmd/{project}/main.go ├── internal/ │ ├── handler/ │ ├── service/ │ └── model/ ├── go.mod ├── LICENSE.adoc ├── scm-info.yaml ├── README.md ├── .gitignore └── .gitlab-ci.yml ``` ## Templates Die Vorlagen für Pflichtdateien liegen im Steering-Repo unter `/templates/`: - `templates/LICENSE.adoc` → 1:1 kopieren (DB Inner Source Lizenz, NICHT ändern) - `templates/scm-info.yaml` → kopieren und `{CONTACT_EMAIL}` ersetzen ```bash cp /steering/templates/LICENSE.adoc ./LICENSE.adoc cp /steering/templates/scm-info.yaml ./scm-info.yaml # Platzhalter ersetzen sed -i "s/{CONTACT_EMAIL}/team@deutschebahn.com/" scm-info.yaml ```