Technical Documentation
Technical information for developers working on the Z8 project
Technical documentation for developers working on Z8, a Turborepo monorepo with product, docs, marketing, extension, mobile, and desktop applications.
Getting Started
Prerequisites, development workflow, and code quality standards
Database Schema
Core tables, canonical time records, and Drizzle ORM
Authentication
Better Auth, secure sessions, invitations, and app access control
Services & Infrastructure
Notifications, storage, background jobs, queues, and export orchestration
Features & Compliance
Canonical time, approvals, work policies, and payroll export architecture
Enterprise Features
API keys, webhooks, SCIM, social OAuth, and app access control
Testing & Deployment
Unit tests, E2E testing, and deployment configuration
Architecture
Z8 is built as a Turborepo monorepo, managing shared logic and multiple application targets.
| App | Path | Description |
|---|---|---|
| Web | apps/webapp | Next.js 16 application for the main product UI and HTTP APIs. |
| Marketing | apps/marketing | Next.js 16 marketing site for public-facing pages. |
| Mobile | apps/mobile | Expo mobile app for on-the-go time tracking and employee workflows. |
| Desktop | apps/desktop | Tauri desktop app for lightweight workstation workflows. |
| Extension | apps/extension | Vite-based browser extension workspace. |
| Docs | apps/docs | Next.js 16 + Fumadocs site for technical and product documentation. |
Monorepo Structure
The tree below is a simplified view of the current top-level app layout, not a full file listing:
Tech Stack
- Frameworks: Next.js 16 for web and docs, Expo for mobile, Tauri for desktop
- Language: TypeScript, plus Rust for Tauri internals
- Database: PostgreSQL with Drizzle ORM
- Auth: Better Auth with passkeys, 2FA, social OAuth, and organization-scoped auth extensions
- Styling: Tailwind CSS v4 and shadcn/ui
- State Management: Effect services for server-side orchestration
- Date/Time: Luxon
DateTime - Monorepo Tooling: Turborepo with pnpm workspaces
Service Architecture
The application uses Effect-driven services and focused domain modules for orchestration, authorization, notifications, and background work.
Key Libraries
| Library | Purpose |
|---|---|
| Effect | Type-safe service composition |
| Luxon | Timezone-aware date/time handling |
| TanStack Form | Form state management |
| BullMQ | Background job processing |
| Better Auth | Authentication, organizations, passkeys, and enterprise auth features |
| Fumadocs | Documentation rendering for the docs app |