Welcome to Zooly docs
Zooly docs is a documentation platform for Zooly.
Zooly is a monorepo project that is organized into the apps and packages. It is meant to be a multi-tenant, multi-app, multi-domain, multi-pkg, multi-db, microservice-based platform.
Some pkg are shared between apps, some are unique for a specific app.
The packages folder organize the shared packages under the packages folder
and the apps are organized under the per apps folder.
and the apps themeselves are organized under the per app folder.
zooly2/
├── apps/
│ ├── auth/ # self contained app
│ ├── app/ # main app and backend for other apps
│ ├── docs/ # docs app
├── packages/
│ ├── app/ # packages for the main app
│ ├── app/client/ # client packages for the main app
│ ├── app/srv/ # server packages for the main app
│ ├── app/db/ # db packages for the main app
│ ├── types/ # shared types packages for the main app
│ ├── util/ # shared util packages for the main app
The auth app is a self-contained application responsible for authentication and authorization across the platform. It serves as an identity provider for other apps, handling all user authentication.
The main app database does not store user data—it only stores Accounts, which represent the tenants of the platform. An Account is owned by a User but can be shared with multiple Users.
By default, when a user logs in, they are automatically assigned to an Account based on their login ID. While users will be able to create multiple accounts in the future, this feature is currently hidden.
See Auth Overview for more details.
The platform implements multi-tenancy by automatically filtering all database queries by Account ID. To enforce this pattern, database access is exclusively handled through the db package access functions—the database object itself is never exported directly.
Here's how we enforce this pattern:
The access functions automatically apply tenant filtering when needed. They require an accountId parameter, and the build will fail if this parameter is not provided.