587d17c39cffd6e39cb1d8cbe1f32d35f089a180
- Add tech stack overview (frontend, backend, shared packages) - Document project structure with directory tree - Expand setup instructions with manual development option - Add scripts reference table - Document features (auth, organizations, dashboard) - Add frontend routes overview - Document API structure and namespaces Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Reviq Publisher Dashboard
A modern publisher dashboard for managing organizations, members, and sites. Built as a monorepo with SvelteKit frontend and oRPC API server.
Tech Stack
Frontend (apps/publisher-dashboard)
- SvelteKit with Svelte 5 (runes)
- Tailwind CSS v4 for styling
- TanStack Query for data fetching
- bits-ui for accessible UI primitives
- Lucide for icons
- WebAuthn/Passkeys for passwordless authentication
Backend (apps/api-server)
- Bun runtime
- oRPC for type-safe API (contract-first)
- Kysely for type-safe SQL queries
- PostgreSQL database
- Postmark for transactional emails
Shared Packages
@reviq/api-contract- Shared API contract (oRPC)@reviq/db- Database client and queries@reviq/db-schema- Database schema and codegen@reviq/utils- Shared utilities
Project Structure
publisher-dashboard/
├── apps/
│ ├── api-server/ # Backend API server
│ ├── cli/ # CLI tools
│ └── publisher-dashboard/ # SvelteKit frontend
├── packages/
│ ├── api-contract/ # Shared oRPC contract
│ ├── db/ # Database client
│ ├── db-schema/ # DB schema & codegen
│ ├── testing/ # Test utilities
│ └── utils/ # Shared utilities
└── db/ # Database migrations
Setup
Prerequisites
Environment Variables
Copy .env.dev to .env for local development:
cp .env.dev .env
| Variable | Description |
|---|---|
DATABASE_URL |
PostgreSQL connection string |
Development
Start the development environment:
devenv up
This starts:
- PostgreSQL database
- Publisher dashboard dev server (port 6827)
- API server
- Package build watcher
The database is automatically initialized with:
- Database:
reviq-dashboard - User:
reviq - Password:
reviq
Manual Development
If not using devenv, start services individually:
# Install dependencies
bun install
# Build packages first
bun run build:packages
# Start dev server
bun run dev
Scripts
| Script | Description |
|---|---|
bun run dev |
Start all dev servers |
bun run build |
Build all packages and apps |
bun run typecheck |
Run TypeScript type checking |
bun run lint |
Run Biome and ESLint |
bun run lint:fix |
Fix linting issues |
bun run test |
Run tests |
bun run db:codegen |
Generate database types |
Features
Authentication
- Passwordless login with passkeys (WebAuthn)
- Email verification
- Session management with device tracking
Organizations
- Create and manage organizations
- Member management with roles (owner, admin, member)
- Invite members via email
- Organization settings
Dashboard
- Organization switcher
- Performance metrics
- Reports (coming soon)
- Site management (coming soon)
Architecture
Frontend Routes
/ # Landing page
/login # Login page
/dashboard # Organization list
/dashboard/[slug] # Organization home
/dashboard/[slug]/performance # Performance metrics
/dashboard/[slug]/reports # Reports (placeholder)
/dashboard/[slug]/settings # Organization settings
├── /members # Member management
└── /sites # Sites (placeholder)
/account # User account settings
├── /security # Security settings
└── /sessions # Active sessions
/admin # Admin panel
API Structure
The API uses oRPC with a contract-first approach. Routes are defined in @reviq/api-contract and implemented in apps/api-server.
Key API namespaces:
auth- Authentication (passkeys, sessions)me- Current user profileorgs- Organization managementorgs.members- Member managementorgs.invites- Invitation management
Description
Languages
TypeScript
63.4%
Svelte
35.1%
CSS
0.7%
JavaScript
0.4%
Nix
0.3%