Skip to content
GitHub

An admin foundation that locks together like joinery.

An open-source admin foundation on FastAPI and React 19. Web, desktop and mobile in one repo — row-level permissions, approvals and an AI assistant, the parts every system needs, are already done.

  • FastAPI
  • React 19
  • TypeScript
  • PostgreSQL · SQL Server · MySQL
Roles: menu and button permission matrix

Menu and button permissions are ticked in one matrix and apply immediately.

One rewrite, distilled into a base you can start building on

AI keeps adding systems worth building, yet every new one starts by redoing login, permissions and approvals. This project started as a rewrite of a few small Java + Vue 2 systems on FastAPI + React 19, keeping everything that gets rebuilt every time — so the next system starts with business logic.

Why we built it
One foundation. Three experiences.

Web, desktop and mobile in one repo

A workspace and persistent tabs on web. Printing and hardware on desktop. Native approvals and notifications on mobile. Shared foundations, interfaces built for each client.

Backend, clients and docs in one pnpm + turbo monorepo. Dependencies flow one way, enforced by architecture checks in CI.

Explore the structure
Actual admin workspace: pending tasks, initiated approvals, shortcuts and messages (Chinese UI)
Web workspace · actual repository screenshot, Chinese UI
apps/web

Start with what needs your attention

Tasks, approval progress, shortcuts and messages in a personal workspace. Card layouts are saved per user.

  • Tasks and approval progress
  • Tabs that preserve page state
  • Permission-aware navigation
Direct shared dependencies
uiComponents
platformPlatform
i18nTranslations
apiAPI contract

Web is the complete admin console; desktop and mobile start from client templates.

One table. Different perspectives.

Permissions down to the row

Menus and buttons decide what you can do. Data scopes decide what you can see. Switch roles and watch the table change.

Rules live on model columns. The UI warns you when a rule is misconfigured.

Explore data permissions
Userssys_user
NameDepartmentVisibility
LinShanghaiVisible
ChenHangzhouVisible
ZhouShenzhenVisible
XuGuangzhouVisible
Own department and below · 2 East rows visible

Illustration · out-of-scope rows are excluded by the APIWHERE dept_id IN (…)

Give every change a foundation.

Built for working with AI

Give AI the context. Keep verification in the workflow. Directory rules, real tests and API contracts support fast iteration.

1,600+ tests against real dependencies. OpenAPI types are in use on mobile; the web client is still migrating.

Explore the workflow
schema.d.ts+2 −1
A type changeOpenAPI → TypeScript
  export interface User {
−   id: number
+   id: string
+   dept_id: string | null
  }
CLAUDE.mdContext for each directory
1,600+ tests against real dependencies

Backend tests use real databases. Frontend tests run real browsers. Verify behavior by running the code.

pnpm --filter web e2e

Workflow illustration · not a live CI result

Running locally in five commands

MIT licensed — take it and change anything. Step-by-step setup is in the quick start. The backend was originally forked from fastapi-best-architecture (FBA); the three-layer structure, plugin system and RBAC model come from its design.

# PostgreSQL + Redis
$ docker compose -f docker-compose.dev.yml up -d
$ pnpm install:all
$ cp apps/api/backend/.env.example apps/api/backend/.env
$ pnpm db:init
$ pnpm dev