waylog
Architecture

System Architecture

A high-level overview of the Waylog monorepo and its constituent applications.

Waylog is developed as a unified monorepo. This approach allows us to share TypeScript interfaces, database schemas, UI components, and API routers across the web frontend, desktop client, and API server seamlessly.

Monorepo Layout

We utilize Turborepo alongside pnpm workspaces to orchestrate our build pipelines and dependency management.

waylog/
├── apps/
│   ├── web/              # The public-facing web platform (TanStack Start)
│   ├── client/           # The Tauri v2 desktop application
│   │   └── src-tauri/    # Rust backend for game memory polling
│   ├── server/           # The Fastify API server
│   └── docs/             # This documentation site (Fumadocs)
├── packages/
│   ├── api/              # Shared tRPC routers & API definitions
│   ├── auth/             # Better Auth server configuration
│   ├── db/               # Drizzle ORM schema & queries
│   ├── env/              # Zod validation for environment variables
│   ├── permissions/      # Bitfield constants and RBAC/FGAC logic
│   ├── ui/               # Shared React components (shadcn/ui) & styles
│   └── config/           # Shared tsconfig and tooling rules

State of Development

Building a robust platform requires a phased approach. Here is where the architecture currently stands:

Fully Implemented ✅

  • Infrastructure: The Turborepo scaffolding is fully operational, with strict boundary enforcement and shared packages.
  • Formatting & Linting: Biome is configured to enforce uniform code styling across all TypeScript/JavaScript files.
  • Versioning: We utilize Changesets for independent versioning of our internal packages, ensuring safe release cycles.
  • Database Schema: The Drizzle ORM schemas (packages/db) are completely mapped out, representing our final data model for Auth, Profiles, VTCs, and Jobs.

In Progress 🚧

  • Server Restructuring: The server is transitioning from a monolithic index.ts prototype to a highly modular, plugin-based architecture using @fastify/autoload.
  • Desktop Polling: The Rust telemetry integration within the Tauri client is scaffolded but awaits the implementation of the core polling loop and state machine.

On this page