Nicholai b1f6780166
fix(auth): delete demo cookie in middleware (#93)
The demo cookie deletion in getCurrentUser() was a no-op from
Server Component context (cookies().delete() only works in
Server Actions and Route Handlers). The cookie persisted for
its full 24h lifetime, causing middleware to short-circuit auth
checks even when a real WorkOS session existed.

- Middleware: real session now takes priority over demo cookie,
  stale cookie actively deleted via Set-Cookie on response
- auth.ts: remove early demo-first check and dead deletion code,
  WorkOS session checked before demo fallback
- /demo route: clear compass-active-org so demo doesn't inherit
  a real user's workspace selection

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-15 22:45:34 -07:00

Compass

An AI-native workspace platform that handles auth, deployment, and real-time collaboration -- so you can focus on building what actually matters.

Build With Direction

  • AI agent built in -- every workspace ships with an intelligent assistant that understands your domain and takes action through tools you define
  • Modular by design -- scheduling, financials, file management, messaging. drop in what you need, leave out what you don't
  • Deploy anywhere -- self-host, ship to desktop and mobile, or deploy to the edge with Cloudflare
  • Enterprise auth -- SSO, directory sync, and role-based access control out of the box

Quick Start

git clone https://github.com/High-Performance-Structures/compass.git
cd compass
bun install
cp .env.example .env.local   # add your keys
bun run db:generate
bun run db:migrate:local
bun dev

See docs/ for detailed setup, environment variables, and deployment options.

Tech Stack

Layer Technology
Framework Next.js 15 (App Router), React 19
Language TypeScript 5.x (strict)
UI shadcn/ui, Tailwind CSS v4
Database Cloudflare D1 (SQLite) via Drizzle ORM
Auth WorkOS (SSO, directory sync)
AI AI SDK v6 + OpenRouter
Mobile Capacitor (iOS + Android)
Desktop Tauri 2.0
Deployment Cloudflare Workers via OpenNext

License

AGPL-3.0

Description
Compass - AI-native workspace platform (mock/demo mode, no auth required)
Readme 2.2 MiB
Languages
TypeScript 98.4%
CSS 0.7%
Rust 0.5%
Swift 0.2%
Shell 0.1%