ADWAIS
A multi-organization platform for e-commerce analytics, endpoint monitoring, and team communication.
GitHub repository (opens in new tab)
Swagger API (opens in new tab)
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
/apps/apps/web- React 19, TypeScript, Vite, Tailwind CSS v3 frontend./apps/server- .NET solution and local PostgreSQL Compose file./apps/server/ADWAIS- ASP.NET Core solution (src/Api,src/Application,src/Domain,src/Infrastructure,tests).
/packages/packages/types- TypeScript types generated from the OpenAPI spec.
/docs- Documentation and the generated OpenAPI spec./infrastructure- nginx config baked into the frontend image./scripts- Helper scripts.
Other root files: pnpm-workspace.yaml, .env.example.
Docs: authentication, multi-organization model, observability, Shopify order source.
Prerequisites
- Node.js >= 24.15.0
- pnpm >= 11.5.0
- Corepack enabled
- .NET SDK 10.0
- PostgreSQL or Docker
Quickstart
- Install dependencies:
corepack enable
pnpm install
- Configure the environment.
The frontend reads apps/web/.env.local. The API reads ASP.NET configuration at runtime.
| File | Required | Contains |
|---|---|---|
apps/web/.env.local | Yes | OIDC settings, SSO branding, demo mode flag |
apps/server/ADWAIS/src/Api/appsettings.Development.json | Tracked | Local database, auth, feature defaults |
apps/server/ADWAIS/src/.env | No | Local 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.
- Start the database:
pnpm db:up
- Apply migrations:
pnpm migration:update
- Start the frontend:
pnpm dev:web
- 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
| Script | What it does |
|---|---|
pnpm dev:web | Start the frontend dev server |
pnpm dev:api | Start the backend API |
pnpm dev:api:watch | Start the backend API with hot reload |
pnpm codegen | Regenerate the OpenAPI spec and TypeScript types |
pnpm db:up | Start the local PostgreSQL container |
pnpm db:down | Stop the local PostgreSQL container |
pnpm migration:add <Name> | Create an EF Core migration (stop dev:api first) |
pnpm migration:update | Apply pending migrations |
pnpm migration:remove | Remove the last unapplied migration |
pnpm migration:list | List migrations and their status |
pnpm dev:web:build | Build the frontend for production |
pnpm dev:web:preview | Preview 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.