Skip to content

v0.3.0 - Unified Gateway And Dockerized Entry Point

Choose a tag to compare

@alexomur alexomur released this 06 Dec 21:12
· 7 commits to master since this release

Tasker v0.3.0 introduces a unified HTTP entry point for the whole system and prepares the application for real deployment scenarios.

In previous versions (v0.1.0, v0.2.0) the technical building blocks of the system were mostly in place, but services were exposed directly via multiple ports and there was no single reverse proxy in front of the backend and frontend. This release adds an Nginx gateway and aligns the docker-compose and frontend configuration around it.

Highlights

  • Added Nginx as a dedicated gateway container.

    • Single public entry point on localhost:8080.

    • Proxies / to the React frontend (Vite dev server inside Docker).

    • Routes API calls to:

      • auth-api under /api/auth/...
      • boardread-api under /api/boardread/...
      • boardwrite-api under /api/boardwrite/...
  • Updated docker-compose topology:

    • All backend services remain on the internal appnet network.
    • Public traffic now flows only through the nginx container.
    • Auth, BoardRead, BoardWrite, and frontend containers are wired to Nginx instead of exposing their own ports.
  • Frontend is now gateway-aware:

    • Vite env variables (VITE_AUTH_API_BASE_URL, VITE_BOARDREAD_API_BASE_URL, VITE_BOARDWRITE_API_BASE_URL) are configured to talk to Nginx routes by default.
    • The app can still be started in a local dev mode without Nginx by overriding env variables to point directly to the service ports.
  • Improved consistency between dev and containerized setup:

    • Local development: frontend on localhost:5173 can talk either directly to APIs on localhost:5001/5002/5003, or via localhost:8080 if Nginx is running.
    • Dockerized workflow: everything runs behind Nginx with a single public port.
  • Updated documentation and configuration examples:

    • .env-example describes the environment variables required for docker-compose.
    • Frontend .env.development is aligned with the Nginx gateway URLs.

Containers Overview

This release keeps the full stack of 11 containers, now with Nginx as the primary gateway:

  1. mysql - MySQL 8.0 for Auth and BoardWrite transactional data.
  2. cassandra - Cassandra 4.1 for board read-model snapshots.
  3. redpanda - Kafka-compatible broker used for domain events and integration events.
  4. redis - In-memory store for auth sessions and access token validation.
  5. auth-api - Auth service (ASP.NET Core) that handles registration, login and session issuance.
  6. boardread-api - Read-side board service that returns board lists and board details.
  7. boardwrite-api - Write-side board service that manages boards, columns, cards, assignees and labels.
  8. prometheus - Metrics collection.
  9. grafana - Visualization dashboard for metrics.
  10. frontend - React + Vite SPA for interacting with Tasker boards.
  11. nginx - Reverse proxy and single HTTP entry point for both frontend and backend.

API Summary

The core HTTP API remains the same and is now reachable via Nginx:

  • Auth service (proxied under /api/auth):

    • POST /api/auth/register - Register a new user.
    • POST /api/auth/login - Login and obtain a user id and access token.
  • BoardRead service (proxied under /api/boardread):

    • GET /api/boardread/boards/my - Get boards for the current user.
    • GET /api/boardread/boards/{boardId} - Get detailed board view.
  • BoardWrite service (proxied under /api/boardwrite):

    • GET /api/boardwrite/boards/my - Get boards for the current user (temporary read endpoint).
    • GET /api/boardwrite/boards/{boardId} - Get board details (temporary read endpoint).
    • POST /api/boardwrite/boards - Create a new board.
    • GET /api/boardwrite/boards/templates - Get available board templates.
    • POST /api/boardwrite/boards/{boardId}/columns - Add a column.
    • POST /api/boardwrite/boards/{boardId}/members - Add a board member.
    • POST /api/boardwrite/boards/{boardId}/labels - Create a label.
    • POST /api/boardwrite/boards/{boardId}/cards - Create a card.
    • PUT /api/boardwrite/boards/{boardId}/cards/{cardId} - Update card title/description.
    • POST /api/boardwrite/boards/{boardId}/cards/{cardId}/move - Move card to another column.
    • POST /api/boardwrite/boards/{boardId}/cards/{cardId}/due-date - Set or clear card due date.
    • POST /api/boardwrite/boards/{boardId}/cards/{cardId}/assignees - Assign member to card.
    • POST /api/boardwrite/boards/{boardId}/cards/{cardId}/assignees/remove - Remove member from card.
    • POST /api/boardwrite/boards/{boardId}/cards/{cardId}/labels - Attach label to card.
    • POST /api/boardwrite/boards/{boardId}/cards/{cardId}/labels/remove - Detach label from card.

Deployment

  • Build and run the full stack:
docker compose -f deploy/compose/docker-compose.yml up --build -d
  • After startup:

    • Frontend is available at http://localhost:8080.
    • Prometheus is available at http://localhost:9090.
    • Grafana is available at http://localhost:3000.

Known Limitations and Bottlenecks

  • Each authenticated request still validates the access token against Redis-backed session data, which implies network hops and extra latency between the gateway, services and Redis.
  • BoardRead uses Cassandra snapshots with MySQL/Auth fallbacks, so read-your-write behavior is not strictly guaranteed in all scenarios.
  • Some HTTP endpoints are still duplicated between BoardWrite and BoardRead while the separation of responsibilities is being refined.
  • Direct service ports are no longer exposed; debugging individual APIs now typically goes through Nginx or requires temporary local overrides of the service configuration.