How ravvnen/dtaas works
Project type and purpose
• The repo contains:
• A React/TypeScript web client (client/)
• A set of Node/Nest-based microservices (servers/), in particular the “library” service (servers/lib/) and an authentication service stub (servers/auth/)
• Infrastructure definitions (Traefik gateway, Vagrant for VM orchestration, Jupyter/Grafana/InfluxDB scripts)
File structure
• Top-level: client/, servers/, deploy/, docs/, script/, ssl/
• client/: React app using Redux (slices under store/), React Router under route/, static assets under public/, E2E/unit tests.
• servers/:
• servers/auth/: an auth microservice (Express/Nest), handles sign-in, user account.
• servers/lib/: core “library” microservice exposing GraphQL endpoints, file-service resolver, backed by local filesystem (files/ module).
• servers/config/: Traefik gateway configurations, reverse proxy routes to services.
• Deployment: Vagrant scripts for single- and multi-machine setups. Infrastructure helpers for Jupyter, Grafana, Influx.
README for additional insights
• The DTaaS platform sits behind a Traefik API gateway.
• It integrates optional components: JupyterLab via ML Workspace, Grafana, InfluxDB.
• For local development: everything runs inside a Vagrant VM.
Main components & their interactions
a. User’s Web Browser (React SPA)
– Requests served by client server or static host
– Interacts with API layer for authentication and data
b. API Gateway (Traefik)
– Routes requests to auth and lib microservices
– Provides SSL termination (using ssl/ssl.conf)
c. Authentication Service (servers/auth)
– Sign-in, JWT issuance, user account management
– Talks to no external DB in current version (in-memory or file stub)
d. Library Microservice (servers/lib)
– GraphQL server (exposes schema.gql, resolvers in files module)
– Stores digital-twin assets on disk (files/ folder)
e. Optional Infrastructure Services
– JupyterLab (ML Workspace container)
– Grafana + InfluxDB for metrics
f. Vagrant VM(s)
– Host the gateway and all containers/microservices
– Optionally multi-node cluster for scale
Architectural patterns & design principles
• Microservices behind an API gateway (Traefik)
• React SPA as a consumer of REST/GraphQL APIs
• GraphQL pattern for data access in the library service
• Separation of concerns: UI, auth, business logic, storage
• Infrastructure as code: Vagrant + shell scripts