Compare commits
9 Commits
37bc8170db
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 1de1c9dcde | |||
| 2f94039f02 | |||
| 6ebebfad9a | |||
| ed0be3b583 | |||
| 666c7724c5 | |||
| 94206afd49 | |||
| 0084c5f05b | |||
|
|
d93f43bf01 | ||
|
|
7b22fdbc22 |
307
AGENTS.md
Normal file
307
AGENTS.md
Normal file
@@ -0,0 +1,307 @@
|
|||||||
|
# Universal AI Coding Agent Workflow (Codex / Gemini / Claude)
|
||||||
|
|
||||||
|
## Workflow Orchestration
|
||||||
|
|
||||||
|
### 1. Plan Mode Default
|
||||||
|
- Enter planning mode for ANY non-trivial task (3+ steps or architecture decisions)
|
||||||
|
- Analyze the codebase before making changes
|
||||||
|
- Break problems into clear subtasks
|
||||||
|
- Produce an implementation plan before writing code
|
||||||
|
- If assumptions are uncertain, inspect files or run tools first
|
||||||
|
- Prefer incremental progress over large rewrites
|
||||||
|
|
||||||
|
Plan format:
|
||||||
|
|
||||||
|
PLAN
|
||||||
|
1. Understand the task
|
||||||
|
2. Identify affected files
|
||||||
|
3. Design the implementation
|
||||||
|
4. Implement step-by-step
|
||||||
|
5. Verify results
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Multi-Agent Strategy
|
||||||
|
|
||||||
|
### 2. Agent Decomposition
|
||||||
|
|
||||||
|
Use specialized agents for complex work.
|
||||||
|
|
||||||
|
Core roles:
|
||||||
|
|
||||||
|
- Orchestrator Agent
|
||||||
|
- Research Agent
|
||||||
|
- Implementation Agent
|
||||||
|
- Test Agent
|
||||||
|
- Code Review Agent
|
||||||
|
- Debug Agent
|
||||||
|
- Documentation Agent
|
||||||
|
|
||||||
|
Rules:
|
||||||
|
- One responsibility per agent
|
||||||
|
- Prefer parallel execution
|
||||||
|
- Agents should operate on independent files when possible
|
||||||
|
- The orchestrator coordinates execution
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Agent Responsibilities
|
||||||
|
|
||||||
|
### Orchestrator Agent
|
||||||
|
- analyzes the user request
|
||||||
|
- creates task list
|
||||||
|
- assigns tasks to agents
|
||||||
|
- merges results
|
||||||
|
|
||||||
|
### Research Agent
|
||||||
|
- scans repository
|
||||||
|
- searches dependencies
|
||||||
|
- analyzes architecture
|
||||||
|
- produces context summary
|
||||||
|
|
||||||
|
### Implementation Agent
|
||||||
|
- writes code
|
||||||
|
- edits files
|
||||||
|
- follows project conventions
|
||||||
|
- implements features
|
||||||
|
|
||||||
|
### Test Agent
|
||||||
|
- writes tests
|
||||||
|
- verifies functionality
|
||||||
|
- checks edge cases
|
||||||
|
|
||||||
|
### Code Review Agent
|
||||||
|
- reviews diffs
|
||||||
|
- checks maintainability
|
||||||
|
- suggests improvements
|
||||||
|
|
||||||
|
### Debug Agent
|
||||||
|
- analyzes logs
|
||||||
|
- identifies root causes
|
||||||
|
- implements fixes
|
||||||
|
|
||||||
|
### Documentation Agent
|
||||||
|
- updates docs
|
||||||
|
- writes README sections
|
||||||
|
- explains new features
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Execution Pipeline
|
||||||
|
|
||||||
|
### 3. Execution Phases
|
||||||
|
|
||||||
|
PHASE 1 — Discovery
|
||||||
|
- explore repository
|
||||||
|
- load relevant files
|
||||||
|
- understand architecture
|
||||||
|
|
||||||
|
PHASE 2 — Planning
|
||||||
|
- generate implementation plan
|
||||||
|
- break plan into tasks
|
||||||
|
|
||||||
|
PHASE 3 — Task Creation
|
||||||
|
|
||||||
|
Create tasks like:
|
||||||
|
|
||||||
|
[ ] analyze codebase
|
||||||
|
[ ] implement feature
|
||||||
|
[ ] add tests
|
||||||
|
[ ] review code
|
||||||
|
[ ] update documentation
|
||||||
|
|
||||||
|
PHASE 4 — Implementation
|
||||||
|
- execute tasks sequentially or in parallel
|
||||||
|
- commit progress
|
||||||
|
|
||||||
|
PHASE 5 — Verification
|
||||||
|
- run tests
|
||||||
|
- check logs
|
||||||
|
- verify feature works
|
||||||
|
|
||||||
|
PHASE 6 — Review
|
||||||
|
- review code quality
|
||||||
|
- refactor if necessary
|
||||||
|
|
||||||
|
PHASE 7 — Documentation
|
||||||
|
- document changes
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Verification System
|
||||||
|
|
||||||
|
### 4. Verification Before Done
|
||||||
|
|
||||||
|
Never mark a task complete without proof.
|
||||||
|
|
||||||
|
Checks:
|
||||||
|
- code compiles
|
||||||
|
- feature works
|
||||||
|
- tests pass
|
||||||
|
- no new errors introduced
|
||||||
|
|
||||||
|
Ask:
|
||||||
|
|
||||||
|
"Would a senior engineer approve this implementation?"
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Autonomous Debugging
|
||||||
|
|
||||||
|
### 5. Autonomous Bug Fixing
|
||||||
|
|
||||||
|
When encountering a bug:
|
||||||
|
|
||||||
|
1. analyze error message
|
||||||
|
2. inspect stack trace
|
||||||
|
3. identify root cause
|
||||||
|
4. implement fix
|
||||||
|
5. verify with tests
|
||||||
|
|
||||||
|
Rules:
|
||||||
|
- Never apply random fixes
|
||||||
|
- Always understand the root cause first
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Context Management
|
||||||
|
|
||||||
|
### 6. Context Awareness
|
||||||
|
|
||||||
|
Before implementing anything:
|
||||||
|
|
||||||
|
- load relevant files
|
||||||
|
- inspect dependencies
|
||||||
|
- understand architecture
|
||||||
|
- read configuration files
|
||||||
|
|
||||||
|
Always maintain awareness of:
|
||||||
|
|
||||||
|
- system architecture
|
||||||
|
- data flow
|
||||||
|
- dependencies
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Memory System
|
||||||
|
|
||||||
|
### 7. Persistent Memory
|
||||||
|
|
||||||
|
Store long-term knowledge in:
|
||||||
|
|
||||||
|
memory/
|
||||||
|
- project_summary.md
|
||||||
|
- architecture.md
|
||||||
|
- lessons.md
|
||||||
|
- coding_standards.md
|
||||||
|
|
||||||
|
This prevents repeated mistakes.
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Learning Loop
|
||||||
|
|
||||||
|
### 8. Self-Improvement
|
||||||
|
|
||||||
|
After errors or corrections:
|
||||||
|
|
||||||
|
Update:
|
||||||
|
|
||||||
|
tasks/lessons.md
|
||||||
|
|
||||||
|
Include:
|
||||||
|
- mistake pattern
|
||||||
|
- root cause
|
||||||
|
- prevention rule
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
Lesson:
|
||||||
|
Always validate API responses before processing them.
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Safety Rules
|
||||||
|
|
||||||
|
### 9. Safety
|
||||||
|
|
||||||
|
Never perform dangerous actions automatically.
|
||||||
|
|
||||||
|
Rules:
|
||||||
|
|
||||||
|
- never delete files without confirmation
|
||||||
|
- avoid modifying production configuration automatically
|
||||||
|
- create backups before large refactors
|
||||||
|
- avoid irreversible operations
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Iteration Control
|
||||||
|
|
||||||
|
### 10. Infinite Loop Protection
|
||||||
|
|
||||||
|
If the same error happens more than 3 times:
|
||||||
|
|
||||||
|
STOP
|
||||||
|
|
||||||
|
- re-evaluate the strategy
|
||||||
|
- re-plan the solution
|
||||||
|
- choose a different debugging approach
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Core Engineering Principles
|
||||||
|
|
||||||
|
### Simplicity First
|
||||||
|
Prefer the simplest solution that works.
|
||||||
|
|
||||||
|
### Root Cause Fixes
|
||||||
|
Always fix the underlying problem, not symptoms.
|
||||||
|
|
||||||
|
### Minimal Impact
|
||||||
|
Touch the smallest amount of code possible.
|
||||||
|
|
||||||
|
### Maintainability
|
||||||
|
Code should remain readable and maintainable.
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Final Rule
|
||||||
|
|
||||||
|
Before delivering a solution ask:
|
||||||
|
|
||||||
|
Is this solution correct, maintainable, and verifiable?
|
||||||
|
|
||||||
|
If not:
|
||||||
|
|
||||||
|
Refine it before presenting it.
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Recommended File Usage
|
||||||
|
|
||||||
|
You can place this workflow in one of the following files:
|
||||||
|
|
||||||
|
AGENT_WORKFLOW.md
|
||||||
|
CLAUDE.md
|
||||||
|
AGENTS.md
|
||||||
|
|
||||||
|
This allows it to be used by:
|
||||||
|
|
||||||
|
- Claude Code Agent Teams
|
||||||
|
- Codex CLI
|
||||||
|
- Gemini Code Assist
|
||||||
|
- Cursor Agents
|
||||||
239
email.md
Normal file
239
email.md
Normal file
@@ -0,0 +1,239 @@
|
|||||||
|
# InnungsApp Outreach Emails
|
||||||
|
|
||||||
|
## Allgemeine Verband-Varianten
|
||||||
|
|
||||||
|
### Variante 1: Standardisierung / Kontrolle
|
||||||
|
|
||||||
|
**Betreff:** Ihre Innungen digital einheitlich organisieren
|
||||||
|
**Betreff:** Digitale Infrastruktur fuer Ihre angeschlossenen Innungen
|
||||||
|
|
||||||
|
Hallo Herr/Frau [Nachname],
|
||||||
|
|
||||||
|
viele Kreishandwerksverbaende koordinieren heute 20 oder mehr Innungen, ohne ein gemeinsames System fuer Kommunikation, Termine und Mitgliedsinfos.
|
||||||
|
|
||||||
|
Das Ergebnis ist meist:
|
||||||
|
- Excel-Listen
|
||||||
|
- Rundmails ohne Rueckmeldung
|
||||||
|
- WhatsApp als inoffizieller Kanal
|
||||||
|
- kein einheitlicher Standard ueber alle Innungen hinweg
|
||||||
|
|
||||||
|
Genau dafuer haben wir `InnungsApp` gebaut: eine Verbandsloesung, mit der Sie Kommunikation und Organisation ueber angeschlossene Innungen hinweg standardisieren koennen.
|
||||||
|
|
||||||
|
Der Einstieg ist einfach:
|
||||||
|
- Verband-Setup
|
||||||
|
- Start mit 3 Pilot-Innungen
|
||||||
|
- danach schrittweiser Rollout auf weitere Innungen
|
||||||
|
|
||||||
|
Haetten Sie naechste Woche 20 Minuten fuer einen kurzen Austausch?
|
||||||
|
|
||||||
|
Viele Gruesse
|
||||||
|
[Name]
|
||||||
|
|
||||||
|
### Variante 2: DSGVO / WhatsApp-Risiko
|
||||||
|
|
||||||
|
**Betreff:** WhatsApp und Excel sind kein System fuer einen Verband
|
||||||
|
**Betreff:** DSGVO-sichere Kommunikation fuer Ihre Innungen
|
||||||
|
|
||||||
|
Hallo Herr/Frau [Nachname],
|
||||||
|
|
||||||
|
bei vielen Kreishandwerksverbaenden laeuft die Kommunikation mit angeschlossenen Innungen noch ueber Rundmails, Excel und teils WhatsApp-Strukturen.
|
||||||
|
|
||||||
|
Fuer einzelne Faelle funktioniert das irgendwie. Auf Verbandsebene ist es meist:
|
||||||
|
- schwer steuerbar
|
||||||
|
- nicht einheitlich
|
||||||
|
- kaum auswertbar
|
||||||
|
- DSGVO-seitig unnoetig riskant
|
||||||
|
|
||||||
|
`InnungsApp` hilft Kreishandwerksverbaenden, genau das zentraler und professioneller aufzusetzen, ohne jede Innung einzeln mit Inselloesungen arbeiten zu lassen.
|
||||||
|
|
||||||
|
Unser Modell:
|
||||||
|
- Setup auf Verbandsebene
|
||||||
|
- Einfuehrung mit 3 Innungen
|
||||||
|
- danach Rollout im Verband
|
||||||
|
|
||||||
|
Wenn das grundsaetzlich relevant klingt, zeige ich Ihnen das gern in 20 Minuten.
|
||||||
|
|
||||||
|
Beste Gruesse
|
||||||
|
[Name]
|
||||||
|
|
||||||
|
### Variante 3: Geschaeftsfuehrer-Hook / Fuehrungsaufgabe
|
||||||
|
|
||||||
|
**Betreff:** Wie steuern Sie heute die Digitalisierung Ihrer Innungen?
|
||||||
|
**Betreff:** Ein Standard statt 20 Einzelloesungen
|
||||||
|
|
||||||
|
Hallo Herr/Frau [Nachname],
|
||||||
|
|
||||||
|
eine Frage aus echtem Interesse:
|
||||||
|
|
||||||
|
Wie stellen Sie heute sicher, dass Ihre angeschlossenen Innungen bei Kommunikation, Terminen und Mitgliederorganisation nicht alle unterschiedlich arbeiten?
|
||||||
|
|
||||||
|
Genau dort sehen wir bei vielen Kreishandwerksverbaenden einen Engpass:
|
||||||
|
kein gemeinsamer Standard, hoher Koordinationsaufwand und wenig Transparenz.
|
||||||
|
|
||||||
|
`InnungsApp` ist dafuer als Verbandsloesung gedacht:
|
||||||
|
- zentral aufgesetzt
|
||||||
|
- fuer erste 3 Innungen eingefuehrt
|
||||||
|
- dann auf weitere Innungen ausrollbar
|
||||||
|
|
||||||
|
Wenn das Thema bei Ihnen aktuell oder perspektivisch relevant ist, schicke ich gern eine kurze Uebersicht oder zeige es in einer 20-Minuten-Demo.
|
||||||
|
|
||||||
|
Viele Gruesse
|
||||||
|
[Name]
|
||||||
|
|
||||||
|
### Variante 4: Rollout mit wenig Risiko
|
||||||
|
|
||||||
|
**Betreff:** Verbandsweite Digitalisierung ohne Big-Bang-Einfuehrung
|
||||||
|
**Betreff:** Erst 3 Innungen, dann Verbands-Rollout
|
||||||
|
|
||||||
|
Hallo Herr/Frau [Nachname],
|
||||||
|
|
||||||
|
oft ist nicht die Idee das Problem, sondern das Einfuehrungsrisiko:
|
||||||
|
"Nutzen die Innungen das wirklich?"
|
||||||
|
"Muss das erst durch Vorstand und Gremien?"
|
||||||
|
"Wie startet man so etwas praktisch?"
|
||||||
|
|
||||||
|
Deshalb haben wir den Einstieg fuer Kreishandwerksverbaende bewusst schlank gedacht:
|
||||||
|
- Verband-Setup
|
||||||
|
- Start mit 3 Innungen
|
||||||
|
- klarer Rollout-Plan fuer weitere Innungen
|
||||||
|
|
||||||
|
`InnungsApp` buendelt Kommunikation, Termine und Mitgliederinfos in einer gemeinsamen Struktur statt in vielen Einzelprozessen.
|
||||||
|
|
||||||
|
Waere ein kurzer Termin sinnvoll, damit ich Ihnen den Ablauf einmal kompakt zeige?
|
||||||
|
|
||||||
|
Beste Gruesse
|
||||||
|
[Name]
|
||||||
|
|
||||||
|
### Variante 5: Outcome / Entlastung
|
||||||
|
|
||||||
|
**Betreff:** Weniger Koordinationsaufwand fuer Ihre Innungen
|
||||||
|
**Betreff:** Kommunikation und Termine nicht mehr ueber Excel + Rundmail
|
||||||
|
|
||||||
|
Hallo Herr/Frau [Nachname],
|
||||||
|
|
||||||
|
wir sprechen gerade mit Kreishandwerksverbaenden, die ihre angeschlossenen Innungen organisatorisch entlasten wollen.
|
||||||
|
|
||||||
|
Das Muster ist oft gleich:
|
||||||
|
- Mitgliederinfos liegen verteilt
|
||||||
|
- Rundschreiben werden verschickt, aber nicht sauber nachverfolgt
|
||||||
|
- Termine und Rueckmeldungen laufen uneinheitlich
|
||||||
|
|
||||||
|
Mit `InnungsApp` koennen Verbaende dafuer einen gemeinsamen digitalen Standard schaffen, statt jede Innung einzeln improvisieren zu lassen.
|
||||||
|
|
||||||
|
Der Einstieg erfolgt nicht als harter Komplett-Rollout, sondern strukturiert:
|
||||||
|
- Setup auf Verbandsebene
|
||||||
|
- Einfuehrung in 3 Innungen
|
||||||
|
- anschliessende Ausweitung
|
||||||
|
|
||||||
|
Falls das bei Ihnen in den naechsten Monaten ein Thema ist, koennen wir gern 20 Minuten sprechen.
|
||||||
|
|
||||||
|
Viele Gruesse
|
||||||
|
[Name]
|
||||||
|
|
||||||
|
### Variante 6: Sehr kurz / direkt
|
||||||
|
|
||||||
|
**Betreff:** Loesung fuer Kreishandwerksverbaende
|
||||||
|
**Betreff:** 20 Minuten zu einem Verbands-Rollout?
|
||||||
|
|
||||||
|
Hallo Herr/Frau [Nachname],
|
||||||
|
|
||||||
|
wir bauen `InnungsApp` fuer Kreishandwerksverbaende, die Kommunikation und Organisation ueber mehrere Innungen hinweg einheitlicher aufsetzen wollen.
|
||||||
|
|
||||||
|
Statt Excel, Rundmail und Inselloesungen:
|
||||||
|
- Verband-Setup
|
||||||
|
- Start mit 3 Innungen
|
||||||
|
- danach Rollout
|
||||||
|
|
||||||
|
Ist das ein Thema, das bei Ihnen aktuell relevant ist?
|
||||||
|
|
||||||
|
Viele Gruesse
|
||||||
|
[Name]
|
||||||
|
|
||||||
|
## HGF / Geschaeftsfuehrer-Versionen
|
||||||
|
|
||||||
|
### HGF Version 1: Haerter / direkter
|
||||||
|
|
||||||
|
**Betreff:** Viele Verbaende arbeiten noch ohne gemeinsamen digitalen Standard
|
||||||
|
**Betreff:** Excel, Rundmail, WhatsApp: kein belastbares System fuer einen Verband
|
||||||
|
|
||||||
|
Hallo Herr/Frau [Nachname],
|
||||||
|
|
||||||
|
viele Kreishandwerksverbaende steuern ihre angeschlossenen Innungen noch ohne einheitliches digitales System.
|
||||||
|
|
||||||
|
Das fuehrt fast immer zu denselben Problemen:
|
||||||
|
- jede Innung arbeitet anders
|
||||||
|
- Kommunikation laeuft ueber Rundmails statt ueber einen steuerbaren Kanal
|
||||||
|
- Informationen sind verteilt statt zentral
|
||||||
|
- der Verband hat wenig Transparenz und wenig Standardisierung
|
||||||
|
|
||||||
|
Genau dafuer haben wir `InnungsApp` entwickelt.
|
||||||
|
|
||||||
|
Nicht als Einzelloesung fuer eine Innung, sondern als Struktur auf Verbandsebene:
|
||||||
|
- ein gemeinsamer Rahmen fuer Kommunikation, Termine und Mitgliederinformationen
|
||||||
|
- Start mit 3 Innungen
|
||||||
|
- danach geordneter Rollout auf weitere Innungen
|
||||||
|
|
||||||
|
Wenn das Thema bei Ihnen relevant ist, lohnt sich ein kurzer Austausch.
|
||||||
|
|
||||||
|
Haetten Sie naechste oder uebernaechste Woche 20 Minuten?
|
||||||
|
|
||||||
|
Viele Gruesse
|
||||||
|
[Name]
|
||||||
|
|
||||||
|
### HGF Version 2: Waermer / eleganter
|
||||||
|
|
||||||
|
**Betreff:** Digitale Struktur fuer Ihre angeschlossenen Innungen
|
||||||
|
**Betreff:** Ein einheitlicher Rahmen fuer Kommunikation und Organisation im Verband
|
||||||
|
|
||||||
|
Hallo Herr/Frau [Nachname],
|
||||||
|
|
||||||
|
ich beschaeftige mich aktuell intensiv mit der Frage, wie Kreishandwerksverbaende ihre angeschlossenen Innungen digital besser unterstuetzen und gleichzeitig organisatorisch entlasten koennen.
|
||||||
|
|
||||||
|
In vielen Gespraechen zeigt sich ein aehnliches Bild:
|
||||||
|
- Kommunikation laeuft ueber verschiedene Kanaele nebeneinander
|
||||||
|
- Ablaeufe unterscheiden sich stark zwischen den Innungen
|
||||||
|
- es fehlt ein gemeinsamer, professioneller Standard auf Verbandsebene
|
||||||
|
|
||||||
|
Mit `InnungsApp` haben wir eine Loesung entwickelt, die genau an diesem Punkt ansetzt:
|
||||||
|
- Kommunikation, Termine und Mitgliederinformationen in einer gemeinsamen Struktur
|
||||||
|
- Einfuehrung nicht als grosser Komplettwechsel, sondern kontrolliert
|
||||||
|
- Start mit 3 Innungen, danach schrittweise Ausweitung
|
||||||
|
|
||||||
|
Fuer Geschaeftsfuehrer ist vor allem interessant, dass dadurch nicht nur Prozesse digitaler werden, sondern auch Steuerbarkeit und Aussenwirkung des Verbands verbessert werden.
|
||||||
|
|
||||||
|
Wenn Sie moechten, zeige ich Ihnen das gern in einem kompakten Termin.
|
||||||
|
|
||||||
|
Viele Gruesse
|
||||||
|
[Name]
|
||||||
|
|
||||||
|
### HGF Version 3: Sehr kurz unter 120 Woertern
|
||||||
|
|
||||||
|
**Betreff:** Digitaler Standard fuer Ihre Innungen
|
||||||
|
**Betreff:** 20 Minuten zu einem Verbands-Rollout?
|
||||||
|
|
||||||
|
Hallo Herr/Frau [Nachname],
|
||||||
|
|
||||||
|
viele Kreishandwerksverbaende arbeiten bei Kommunikation und Organisation ihrer Innungen noch mit einem Mix aus Rundmail, Excel und Einzelloesungen.
|
||||||
|
|
||||||
|
`InnungsApp` ist dafuer als Verbandsloesung gedacht:
|
||||||
|
- gemeinsamer Standard fuer Kommunikation, Termine und Mitgliederinfos
|
||||||
|
- Start mit 3 Innungen
|
||||||
|
- danach Rollout auf weitere angeschlossene Innungen
|
||||||
|
|
||||||
|
Der Nutzen fuer den Verband:
|
||||||
|
- mehr Standardisierung
|
||||||
|
- mehr Steuerbarkeit
|
||||||
|
- weniger Inselloesungen
|
||||||
|
|
||||||
|
Falls das grundsaetzlich relevant ist, zeige ich Ihnen das gern in 20 Minuten.
|
||||||
|
|
||||||
|
Viele Gruesse
|
||||||
|
[Name]
|
||||||
|
|
||||||
|
## Einsatzempfehlung
|
||||||
|
|
||||||
|
- Erstkontakt: `Variante 6` oder `HGF Version 3`
|
||||||
|
- Etwas haerterer Erstkontakt: `HGF Version 1`
|
||||||
|
- Konservativer oder waermerer Ton: `HGF Version 2`
|
||||||
|
- Wenn DSGVO im Fokus steht: `Variante 2`
|
||||||
|
- Wenn Einfuehrungsangst dominiert: `Variante 4`
|
||||||
@@ -76,6 +76,9 @@ COPY --from=builder /app/apps/admin/.next/standalone ./
|
|||||||
COPY --from=builder /app/apps/admin/.next/static ./apps/admin/.next/static
|
COPY --from=builder /app/apps/admin/.next/static ./apps/admin/.next/static
|
||||||
COPY --from=builder /app/apps/admin/public ./apps/admin/public
|
COPY --from=builder /app/apps/admin/public ./apps/admin/public
|
||||||
|
|
||||||
|
# Fix permissions so nextjs user can write to .next/cache at runtime
|
||||||
|
RUN chown -R nextjs:nodejs /app/apps/admin/.next
|
||||||
|
|
||||||
# Copy Prisma schema + migrations for runtime migrations
|
# Copy Prisma schema + migrations for runtime migrations
|
||||||
COPY --from=builder /app/packages/shared/prisma ./packages/shared/prisma
|
COPY --from=builder /app/packages/shared/prisma ./packages/shared/prisma
|
||||||
|
|
||||||
|
|||||||
16
innungsapp/apps/admin/docker-entrypoint.sh
Normal file → Executable file
16
innungsapp/apps/admin/docker-entrypoint.sh
Normal file → Executable file
@@ -43,14 +43,14 @@ run_with_retries() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Prefer migration-based deploys. Fall back to db push when no migrations exist yet.
|
# Prefer migration-based deploys. Fall back to db push when no migrations exist yet.
|
||||||
set -- "$MIGRATIONS_DIR"/*/migration.sql
|
# set -- "$MIGRATIONS_DIR"/*/migration.sql
|
||||||
if [ -f "$1" ]; then
|
# if [ -f "$1" ]; then
|
||||||
echo "Applying Prisma migrations..."
|
# echo "Applying Prisma migrations..."
|
||||||
run_with_retries npx prisma migrate deploy --schema=./packages/shared/prisma/schema.prisma
|
# run_with_retries npx prisma migrate deploy --schema=./packages/shared/prisma/schema.prisma
|
||||||
else
|
# else
|
||||||
echo "No Prisma migrations found. Syncing schema with db push..."
|
# echo "No Prisma migrations found. Syncing schema with db push..."
|
||||||
run_with_retries npx prisma db push --skip-generate --schema=./packages/shared/prisma/schema.prisma
|
# run_with_retries npx prisma db push --skip-generate --schema=./packages/shared/prisma/schema.prisma
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
echo "Starting Next.js server..."
|
echo "Starting Next.js server..."
|
||||||
exec node apps/admin/server.js
|
exec node apps/admin/server.js
|
||||||
|
|||||||
@@ -97,7 +97,8 @@ export function middleware(request: NextRequest) {
|
|||||||
// We don't want to redirect /login, /api, etc.
|
// We don't want to redirect /login, /api, etc.
|
||||||
const SHARED_PATHS = ['login', 'api', 'superadmin', 'dashboard', 'registrierung', 'impressum', 'datenschutz', '_next', 'uploads', 'favicon.ico', 'passwort-aendern']
|
const SHARED_PATHS = ['login', 'api', 'superadmin', 'dashboard', 'registrierung', 'impressum', 'datenschutz', '_next', 'uploads', 'favicon.ico', 'passwort-aendern']
|
||||||
const isStaticAsset = /\.(png|jpg|jpeg|gif|svg|webp|ico|txt|xml)$/i.test(potentialSlug)
|
const isStaticAsset = /\.(png|jpg|jpeg|gif|svg|webp|ico|txt|xml)$/i.test(potentialSlug)
|
||||||
if (potentialSlug && !SHARED_PATHS.includes(potentialSlug) && !isStaticAsset) {
|
const isValidSlug = /^[a-z0-9][a-z0-9-]*$/.test(potentialSlug)
|
||||||
|
if (potentialSlug && !SHARED_PATHS.includes(potentialSlug) && !isStaticAsset && isValidSlug) {
|
||||||
// This looks like a tenant path being accessed from the root domain.
|
// This looks like a tenant path being accessed from the root domain.
|
||||||
// Redirect to subdomain.
|
// Redirect to subdomain.
|
||||||
const baseHost = hostname.split('.').slice(-2).join('.') // Simplistic, assumes domain.tld or localhost
|
const baseHost = hostname.split('.').slice(-2).join('.') // Simplistic, assumes domain.tld or localhost
|
||||||
|
|||||||
@@ -7,10 +7,10 @@ services:
|
|||||||
POSTGRES_DB: "${POSTGRES_DB:-innungsapp}"
|
POSTGRES_DB: "${POSTGRES_DB:-innungsapp}"
|
||||||
POSTGRES_USER: "${POSTGRES_USER:-innungsapp}"
|
POSTGRES_USER: "${POSTGRES_USER:-innungsapp}"
|
||||||
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:-innungsapp}"
|
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:-innungsapp}"
|
||||||
ports:
|
|
||||||
- "5432:5432"
|
|
||||||
volumes:
|
volumes:
|
||||||
- pg_data:/var/lib/postgresql/data
|
- pg_data:/var/lib/postgresql/data
|
||||||
|
networks:
|
||||||
|
- bizmatch # <-- NEU
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-innungsapp} -d ${POSTGRES_DB:-innungsapp}"]
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-innungsapp} -d ${POSTGRES_DB:-innungsapp}"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
@@ -32,8 +32,6 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
postgres:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
ports:
|
|
||||||
- "3010:3000"
|
|
||||||
environment:
|
environment:
|
||||||
# Database — PostgreSQL
|
# Database — PostgreSQL
|
||||||
DATABASE_URL: "${DATABASE_URL:-postgresql://innungsapp:innungsapp@postgres:5432/innungsapp?schema=public}"
|
DATABASE_URL: "${DATABASE_URL:-postgresql://innungsapp:innungsapp@postgres:5432/innungsapp?schema=public}"
|
||||||
@@ -71,7 +69,9 @@ services:
|
|||||||
nproc: 65535
|
nproc: 65535
|
||||||
volumes:
|
volumes:
|
||||||
# Uploaded files — persists across restarts
|
# Uploaded files — persists across restarts
|
||||||
- uploads_data:/app/uploads
|
- ./uploads:/app/uploads
|
||||||
|
networks:
|
||||||
|
- bizmatch # <-- NEU
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "wget -qO- http://localhost:3000/api/health | grep -q '\"status\":\"ok\"'"]
|
test: ["CMD-SHELL", "wget -qO- http://localhost:3000/api/health | grep -q '\"status\":\"ok\"'"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
@@ -81,4 +81,7 @@ services:
|
|||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
pg_data:
|
pg_data:
|
||||||
uploads_data:
|
|
||||||
|
networks:
|
||||||
|
bizmatch:
|
||||||
|
external: true
|
||||||
Binary file not shown.
Reference in New Issue
Block a user