Monorepo Structure
Relevant source files
The following files were used as context for generating this wiki page:
The Tuturuuu monorepo is an integrated ecosystem managed via Turborepo and the Bun package manager. It is designed to house a variety of applications and shared services that form an intelligent operating system for modern work and life. The architecture prioritizes code reuse through shared packages and a unified development workflow.
The project utilizes a apps/ and packages/ directory structure to separate end-user applications from reusable internal libraries. This setup ensures that core logic, such as database clients and UI components, remains consistent across different platforms including web, mobile, and secondary services.
Sources: README.md:1-20, GEMINI.md:5-15, conductor/tech-stack.md:3-7
Core Infrastructure
The monorepo relies on a specific set of tools for orchestration and package management. Turborepo manages the build pipeline and task execution, while Bun handles dependency resolution and script execution.
The diagram above shows the high-level organization of the repository root and its primary configuration files.
Sources: GEMINI.md:8-12, conductor/tech-stack.md:3-7
Applications (apps/)
Applications are functional end-products within the ecosystem. While most are built using Next.js, the repository supports multi-runtime environments including Python and Rust.
Core Platform Applications
| App | Runtime/Framework | Description |
|---|---|---|
| web | Next.js 15+ | Main platform featuring workspace management, finance, and task management. |
| calendar | Next.js | Smart calendar with AI-powered scheduling and Google sync. |
| finance | Next.js | Wallet tracking, budgeting, and financial management. |
| tasks | Next.js | Hierarchical task management system. |
Specialized Services
| App | Runtime/Framework | Description |
|---|---|---|
| nova | Next.js | AI prompt engineering and competition platform. |
| rewise | Next.js | AI-powered chatbot with multi-model integration. |
| discord | Python/Modal | Bot for API info, reports, and URL shortening. |
| backend | Rust/Axum | Educational REST API and WebSocket backend. |
Sources: README.md:31-75, GEMINI.md:12-18, conductor/tech-stack.md:9-15
Shared Packages (packages/)
Packages are internal libraries consumed by the applications. They are designed to be built once and shared across the monorepo to maintain a single source of truth for types, components, and API logic.
Core Packages
- @tuturuuu/ui: Shared UI design system based on shadcn-ui and Radix UI.
- @tuturuuu/types: Centralized TypeScript types and generated Supabase schema types.
- @tuturuuu/utils: Shared utility functions for dates, colors, and permissions.
Data & AI Packages
- @tuturuuu/supabase: Custom Supabase client with SSR support for Next.js.
- @tuturuuu/ai: Multi-provider AI integration supporting OpenAI, Anthropic, and Google.
- @tuturuuu/auth: Authentication utilities with multi-session support.
Sources: README.md:77-120, GEMINI.md:18-20, conductor/tech-stack.md:20-25
Package Dependency and Build Flow
Within the monorepo, packages often depend on one another. For instance, most applications and packages depend on @tuturuuu/types. Turborepo ensures that dependencies are built in the correct order.
The diagram illustrates the dependency chain where applications rely on internal packages, which in turn rely on core type definitions.
Sources: packages/supabase/QUICKSTART.md:55-65, packages/supabase/PUBLISHING.md:110-115
Build & Compilation Requirements
Internal packages like @tuturuuu/supabase require a build step to generate dist/ files before they can be used by applications. This is handled via the bun run build command, which utilizes the TypeScript compiler (tsc --build) to output ES modules.
Sources: packages/supabase/QUICKSTART.md:5-20, packages/supabase/CHANGELOG.md:15-25
Database & Backend Integration
The backend infrastructure is unified through Supabase. The db application within the monorepo manages migrations and type generation.
- Migrations: Local development uses Docker to run a Supabase instance, with migrations applied via
bun sb:up. - Type Generation: TypeScript types are generated directly from the database schema into the
packages/typespackage. - RLS Policies: Row Level Security (RLS) is used to enforce data isolation at the database level.
Sources: README.md:135-155, GEMINI.md:38-42, conductor/tech-stack.md:27-32
Development Workflows
The monorepo structure supports standardized commands across all projects:
| Command | Scope | Description |
|---|---|---|
bun dev | Global | Starts all applications in development mode. |
bun build | Global | Builds all packages and applications in dependency order. |
bun check | Global | Runs formatting, tests, type-checking, and i18n checks. |
bun sb:start | Infrastructure | Launches local Supabase environment via Docker. |
bun type-check | Global | Performs type checking across the entire monorepo. |
Sources: README.md:160-185, GEMINI.md:50-65
Conclusion
The Tuturuuu monorepo structure provides a scalable foundation for a multi-app ecosystem. By leveraging Turborepo for orchestration, Bun for performance, and a strict separation between applications and shared packages, the architecture ensures that complex features like AI integration and workspace management remain maintainable and consistent across different runtime environments.