CircleIn — Community Operations
A multi-tenant community-operations SaaS — booking, QR access, maintenance, analytics, and an AI assistant.
Impact
Multi-tenant
Per-community data isolation
90+ routes
Resident + admin API workflows
PWA
Installable, offline-capable
Technology
Key decisions
- 01
Multi-tenant with role-aware routing
A proxy layer derives the user's role and community from the session and gates every route, so isolation doesn't depend on each query remembering to filter by community.
- 02
Route handlers over a separate backend
Keeping the API as Next.js route handlers next to the app meant one deploy and one type system, with cron endpoints protected by a shared-secret check.
- 03
An AI assistant with guardrails
The Gemini chatbot validates payloads, derives the user's role from the session rather than the client, and falls back deterministically on timeout, so it can't be tricked into acting above the user's permissions.
- 04
Installable PWA with offline support
Serwist builds a service worker so residents can open the app and still see a usable offline page when connectivity drops.
Architecture
- 01
Auth
NextAuth sessions over Firebase-backed data
- NextAuth
- Firebase
- 02
Role-aware proxy
Derives role + community from the session, gates every route
- 03
Resident app
Booking, QR access, maintenance, notifications
- Recurring
- Waitlist
- QR
- 04
Admin tooling
Dashboards, ticket desk, analytics, operations
- Recharts
- SLA watch
- 05
AI assistant
Gemini chatbot with session-derived permissions
- Gemini
- 06
PWA shell
Serwist service worker, offline support, on Vercel
Scroll the diagram horizontally to explore →
The problem
Residential communities run on spreadsheets and WhatsApp: bookings clash, access codes get shared insecurely, maintenance requests get lost, and admins have no real view of operations. Doing it as one multi-tenant app means data must never cross between communities.
How it works
CircleIn is a Next.js 16 App Router app with route handlers for the backend. NextAuth handles sessions over Firebase-backed data, and a proxy layer enforces role-aware route protection so residents and admins only see what they should, per community. Residents book amenities (with cancel, reschedule, recurring, and waitlist flows), enter via QR access codes, and file maintenance; admins get dashboards, a support-ticket desk, analytics, and operations tooling. A Gemini-powered assistant answers resident questions, and the app ships as an installable PWA with offline support.