2026-05-20 10:22:58 -05:00
..
2026-05-20 10:22:58 -05:00
2026-05-20 10:22:58 -05:00
2026-05-20 10:22:58 -05:00
2026-05-20 10:22:58 -05:00
2026-05-20 10:22:58 -05:00
2026-05-20 10:22:58 -05:00

Cyber Hybrid Hub API

Postgres-backed profile API for the Flutter app.

Setup

  1. Create the database (once):

    createdb cyberhybridhub
    
  2. Copy and edit environment variables:

    cp .env.example .env
    
  3. Install dependencies and run (from this server/ directory):

    dart pub get
    dart run bin/server.dart
    

The API listens on http://localhost:3000 by default (PORT in .env).

Endpoints

Method Path Auth
GET /v1/me/profile Authorization: Bearer <Firebase ID token>
PUT /v1/me/profile same

Flutter client

Run the app with the API URL (defaults to http://localhost:3000):

flutter run --dart-define=API_BASE_URL=http://localhost:3000