Skip to content
Olle Marmenlind

ADWAIS

A multi-organization platform for e-commerce analytics, endpoint monitoring, and team communication.

Live interactive demo

Architecture

A monorepo managed with pnpm workspaces.

graph TD
    Client[Web Browser] -->|HTTP / JSON| Web[React Frontend]
    Web -->|API Requests| API[ASP.NET Core Web API]
    API -->|EF Core / SQL| DB[(PostgreSQL Database)]
    Hangfire[Hangfire Background Service] -->|Queue Jobs| DB
    API -.->|Enqueue Jobs| Hangfire
    API -.->|Optional OTLP| Telemetry[Aspire Dashboard or OTLP receiver]

Directory structure

Other root files: pnpm-workspace.yaml, .env.example.

Docs: authentication, multi-organization model, observability, Shopify order source.

Prerequisites

Quickstart

  1. Install dependencies:
corepack enable
pnpm install
  1. Configure the environment.

The frontend reads apps/web/.env.local. The API reads ASP.NET configuration at runtime.

FileRequiredContains
apps/web/.env.localYesOIDC settings, SSO branding, demo mode flag
apps/server/ADWAIS/src/Api/appsettings.Development.jsonTrackedLocal database, auth, feature defaults
apps/server/ADWAIS/src/.envNoLocal overrides

Copy apps/web/.env-example to apps/web/.env.local and edit it. Do not put VITE_* values in a root .env.local. The Vite project is scoped to apps/web. Vite fails early when an env file has a UTF-8 BOM.

Demo mode:

# apps/web/.env.local
VITE_DEMO_MODE=true
// apps/server/ADWAIS/src/Api/appsettings.Development.json
"EnableDemoAccess": true

Demo mode adds a login option that requests a Viewer token from /api/demo/token. OIDC settings are not needed in demo mode.

Outside demo mode, set VITE_OIDC_AUTHORITY and VITE_OIDC_CLIENT_ID in the frontend. Set Authentication:OidcAuthority and Authentication:OidcAudience in the API.

The API exports live traces, metrics, and structured logs through OTLP only when an endpoint is configured. Set either OpenTelemetry__OtlpEndpoint (the preferred .NET configuration key) or OTEL_EXPORTER_OTLP_ENDPOINT in the API environment, for example:

# apps/server/ADWAIS/src/.env
OpenTelemetry__OtlpEndpoint=http://localhost:18889

This is suitable for an Aspire Dashboard or another OTLP receiver. Leave the setting unset when no telemetry backend is running; the ADWAIS diagnostics pages and API continue to work from the application database.

  1. Start the database:
pnpm db:up
  1. Apply migrations:
pnpm migration:update
  1. Start the frontend:
pnpm dev:web
  1. Start the backend:
pnpm dev:api

EnableRuntimeDataSeeding: true is already set in appsettings.Development.json. Demo monitors use negative local IDs and are never sent to UptimeRobot.

pnpm scripts

ScriptWhat it does
pnpm dev:webStart the frontend dev server
pnpm dev:apiStart the backend API
pnpm dev:api:watchStart the backend API with hot reload
pnpm codegenRegenerate the OpenAPI spec and TypeScript types
pnpm db:upStart the local PostgreSQL container
pnpm db:downStop the local PostgreSQL container
pnpm migration:add <Name>Create an EF Core migration (stop dev:api first)
pnpm migration:updateApply pending migrations
pnpm migration:removeRemove the last unapplied migration
pnpm migration:listList migrations and their status
pnpm dev:web:buildBuild the frontend for production
pnpm dev:web:previewPreview the frontend build

Code generation

The API project writes docs/openapi/v1.json on build. orval reads it and generates TypeScript types (packages/types/generated) and API hooks (apps/web/src/api/generated/endpoints.ts).

Run after API changes:

pnpm codegen

License

This repository is licensed under the MIT License. See LICENSE for the full terms.

The MIT copyright and permission notices must remain in source distributions and substantial portions of the software.

Contributing

By contributing, you agree to the terms in CONTRIBUTING.md.

Acknowledgements

Started as a university project. Contributions from David Vilselius, Francisco Vigo Flores, Erik Falk, and Christoffer Bohm.