Affiliscale Admin
Multi-tenant admin dashboard built in a monorepo with an AI-assisted development workflow and shared UI packages.
- Role
- Solo developer
- Year
- 2025
- Monorepo
- Next.js
- Multi-tenant
- TypeScript
Problem
Affiliscale operates across multiple tenants, each needing an isolated view of their own data behind one admin surface. As a solo developer I needed a codebase that let me ship features across shared and tenant-specific packages without duplicating UI or leaking one tenant's data into another's view.
- Strict data isolation between tenants on a shared admin surface
- UI and logic reused across packages without copy-paste drift
- One developer maintaining breadth across the whole system
Approach
I structured the project as a monorepo: a shared design-system package, shared data-access utilities, and thin app layers per surface. Tenant scoping lives in the data layer so every query is constrained by tenant at the source, not patched per screen.
To hold quality while working solo, I leaned on an AI-assisted workflow — using it to scaffold repetitive CRUD screens and review diffs — while keeping architecture, data-isolation logic, and final judgement firmly hand-owned.
- Monorepo with shared design-system and data-access packages
- Tenant scoping enforced in the data layer, not per screen
- AI-assisted scaffolding with human-owned architecture and review
Tradeoffs
A monorepo adds tooling overhead — shared build config, versioning discipline, and careful boundaries between packages — that only pays off once enough is genuinely shared. For a multi-tenant admin it paid off quickly; for a smaller app it would have been overkill.
AI-assisted scaffolding accelerates the boilerplate but makes disciplined review non-negotiable: generated code is a starting point, never the final word, especially anywhere near tenant isolation.
Outcome
The shared packages kept UI and data access consistent across tenants while the data-layer scoping made isolation the default rather than a per-screen concern. The AI-assisted workflow let a single developer sustain a surface that would normally need a small team.
- Tenant isolation enforced by default at the data layer
- Consistent UI across surfaces from shared packages
- Solo-maintainable breadth via an AI-assisted workflow