Update readme's, branches and actions
Build and Push Docker Images / detect-changes (push) Successful in 10s
Build and Push Docker Images / build-auth-api (push) Successful in 58s
Build and Push Docker Images / build-employee-api (push) Successful in 58s
Build and Push Docker Images / build-transit-api (push) Successful in 59s
Build and Push Docker Images / build-error-log-api (push) Successful in 1m8s
Build and Push Docker Images / build-admin-ui (push) Successful in 1m14s
Build and Push Docker Images / deploy-test-node (push) Successful in 5s
Build and Push Docker Images / detect-changes (push) Successful in 10s
Build and Push Docker Images / build-auth-api (push) Successful in 58s
Build and Push Docker Images / build-employee-api (push) Successful in 58s
Build and Push Docker Images / build-transit-api (push) Successful in 59s
Build and Push Docker Images / build-error-log-api (push) Successful in 1m8s
Build and Push Docker Images / build-admin-ui (push) Successful in 1m14s
Build and Push Docker Images / deploy-test-node (push) Successful in 5s
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
# Transit Project
|
||||
|
||||
Dit repository bevat een suite van drie Node.js microservices (APIs) en bijbehorende tooling:
|
||||
Dit repository bevat een suite van Node.js microservices, een admin webapp en een legacy desktop client die momenteel als deprecated wordt bewaard.
|
||||
|
||||
- `auth_api` — Authenticatie en token-uitgifte (standaard port 5000)
|
||||
- `employee_api` — Employee onboarding / management (standaard port 4000)
|
||||
- `transit_api` — Transit/schedule endpoints (standaard port 5001)
|
||||
- `error_log_api` — Centrale foutlogging en viewer (standaard port 5003)
|
||||
- `admin_ui` — React + Vite beheerinterface
|
||||
- `deprecated/` — legacy Flutter bus terminal, retained for reference while moving the client to a Windows XP-era build path
|
||||
|
||||
Er is ook een GitHub Actions workflow aanwezig die Docker images bouwt en pusht naar GitHub Container Registry (GHCR).
|
||||
|
||||
@@ -23,6 +25,7 @@ Belangrijk: deze README bevat geen wachtwoorden of andere gevoelige gegevens. Sl
|
||||
- Guidelines for adding new private files
|
||||
|
||||
**Private files are excluded** (not in git/docker):
|
||||
|
||||
- `GETTING_STARTED.md` - Internal setup guide
|
||||
- `ADMIN_DEPLOYMENT_SUMMARY.md` - Deployment status
|
||||
- `CI_CD_PORTAINER_GUIDE.md` - Infrastructure docs
|
||||
@@ -125,6 +128,7 @@ Tip: tijdens development kun je één Postgres instance gebruiken en schema/roll
|
||||
Deze repository bevat `docker-compose.yml` die images vanuit GHCR trekt. De compose is aangepast om een externe Postgres te gebruiken.
|
||||
|
||||
Voordat je start:
|
||||
|
||||
- Zorg dat je `.env` met database credentials en `JWT_SECRET` klaar staat op de server.
|
||||
- Zorg dat de host waar je compose draait netwerk-connectiviteit heeft naar de Postgres host.
|
||||
|
||||
@@ -162,10 +166,12 @@ Het project bevat een workflow in `.github/workflows/docker-build.yml` die bij p
|
||||
- Genereert tags (`latest`, branch/sha, semver als aanwezig)
|
||||
|
||||
Om GHCR te gebruiken op je server:
|
||||
|
||||
1. Maak een Personal Access Token (PAT) met `read:packages` (en `write:packages` indien je zelf ook wilt pushen).
|
||||
2. Login op de server: `docker login ghcr.io` (gebruik PAT als wachtwoord).
|
||||
|
||||
Image naam voorbeeld:
|
||||
|
||||
```
|
||||
ghcr.io/<github-username>/<repo>/auth_api:latest
|
||||
```
|
||||
@@ -191,6 +197,7 @@ docker logs -f auth_api
|
||||
```
|
||||
|
||||
Problemen met DB-verbinding:
|
||||
|
||||
- Controleer netwerkconnectiviteit naar `POSTGRES_HOST`
|
||||
- Controleer users/permissions in Postgres
|
||||
- Controleer dat de juiste schema (zoals `workers`) bestaat als de queries die verwachten
|
||||
@@ -221,6 +228,7 @@ docker login ghcr.io
|
||||
## Migraties & Database schema
|
||||
|
||||
Database schema en migraties zitten niet in deze repository. Zorg dat je:
|
||||
|
||||
- de juiste schema's (`workers`, `routes`, etc.) aanmaakt
|
||||
- gebruikers en rechten configureert voor de verschillende services
|
||||
|
||||
@@ -340,20 +348,23 @@ docker-compose up admin_ui
|
||||
The Transit API exposes public (unauthenticated) schedule endpoints:
|
||||
|
||||
**Endpoints:**
|
||||
|
||||
- `GET /schedules?date=YYYY-MM-DD&lineId=ID` — Get schedules for a date/line
|
||||
- `GET /schedules/:scheduleId` — Get schedule details
|
||||
- `GET /schedules/:scheduleId/stops` — Get stops on a schedule's line
|
||||
|
||||
**Example:**
|
||||
|
||||
```bash
|
||||
curl http://localhost:5001/schedules?date=2026-05-06
|
||||
```
|
||||
|
||||
**TimetableViewer Component:**
|
||||
```jsx
|
||||
import TimetableViewer from './components/TimetableViewer'
|
||||
|
||||
<TimetableViewer apiBaseUrl="http://api.transit.local:5001" />
|
||||
```jsx
|
||||
import TimetableViewer from "./components/TimetableViewer";
|
||||
|
||||
<TimetableViewer apiBaseUrl="http://api.transit.local:5001" />;
|
||||
```
|
||||
|
||||
### Schedule Maker Documentation
|
||||
@@ -396,4 +407,4 @@ Set up real PostgreSQL database and provide credentials via environment variable
|
||||
|
||||
---
|
||||
|
||||
Als je wilt, kan ik deze README nog aanpassen met specifieke voorbeelden van database schema's of exacte environment-variabele namen voor lokaal draaien. Zeg welke details je wil toevoegen (bijv. example SQL voor `workers` schema).
|
||||
Als je wilt, kan ik deze README nog aanpassen met specifieke voorbeelden van database schema's of exacte environment-variabele namen voor lokaal draaien. Zeg welke details je wil toevoegen (bijv. example SQL voor `workers` schema).
|
||||
|
||||
Reference in New Issue
Block a user