Tech Stack & Dependencies
Relevant source files
The following files were used as context for generating this wiki page:
Subito is built as a modern TypeScript monorepo utilizing a high-performance, type-safe stack. The architecture leverages a shared internal package system for UI, database schemas, and utilities, ensuring consistency across the API and dashboard applications.
The project is managed using pnpm workspaces and Turborepo for efficient build orchestration. It focuses on performance and developer experience by using modern frameworks like Hono for the API and Next.js for the dashboard, backed by a PostgreSQL database managed via Drizzle ORM.
Sources: package.json:28, turbo.json, apps/api/package.json, apps/dashboard/package.json
Core Infrastructure & Orchestration
The project uses a monorepo structure where core logic and UI components are abstracted into internal packages. Turborepo manages the task pipeline, including builds, linting, and database migrations.
Monorepo Structure
The following diagram illustrates the relationship between the main applications and shared internal packages.
The diagram shows how the API and Dashboard consume internal workspace packages.
Sources: apps/api/package.json:21-22, apps/dashboard/package.json:16, packages/ui/package.json:20, packages/db/package.json:30
Build & Environment Management
| Tool | Usage | File Reference |
|---|---|---|
| pnpm | Package manager for workspace orchestration | package.json:28 |
| Turbo | Build system and task runner | package.json:24, turbo.json |
| TypeScript | Primary language across all packages (v5.9.3 - v6.0.3) | package.json:25, apps/api/package.json:39 |
| Dotenv | Environment variable management | apps/api/package.json:24, packages/db/package.json:30 |
Backend API Layer (@subito/api)
The API is built using Hono, a small, fast, and type-safe web framework. It runs on a Node.js server and uses Zod for robust input validation.
API Framework & Middleware
The API utilizes Hono middleware for security and observability, including CORS, secure headers, and request tracing.
The sequence demonstrates the flow of a request through the Hono application stack.
Sources: apps/api/src/app.ts:39-65, apps/api/package.json:23, 27
Key API Dependencies
- Hono: Core web framework (v4.12.22).
- Zod: Schema validation for API requests and responses.
- Firebase Admin: Integrated for authentication and user management (v13.10.0).
- BullMQ & IORedis: Used for background job processing and queue management.
- Pino: High-performance logging.
Sources: apps/api/package.json:21-34, apps/api/src/app.ts:11
Database & Data Modeling (@subito/db)
The database layer uses PostgreSQL with Drizzle ORM for type-safe schema management and migrations.
Data Schema Overview
The system manages complex relationships between Users, Hubs (geographical regions), and Bookings.
This diagram represents the core entity relationships defined in the SQL schema.
Sources: packages/db/drizzle/0000_normal_the_order.sql:58-632
Database Tools
| Dependency | Description |
|---|---|
| Drizzle ORM | Type-safe ORM for interacting with PostgreSQL |
| pg (node-postgres) | PostgreSQL client for Node.js |
| Drizzle Kit | CLI for generating and running migrations |
| tsx | Used to execute seeding scripts |
Sources: packages/db/package.json:11-35
Frontend & UI System (@subito/ui, @subito/dashboard)
The frontend stack is built on Next.js and React 19, utilizing a shared UI library based on Tailwind CSS and shadcn/ui.
Shared UI Components
The @subito/ui package exports reusable components to be consumed by applications.
- Framework: React 19 / Next.js 16.1.6.
- Styling: Tailwind CSS v4.
- Component Library: shadcn/ui (using Radix-based Base UI).
- Icons: Lucide React.
Sources: packages/ui/package.json:13-24, apps/dashboard/package.json:17-21
Dashboard Configuration
The dashboard application leverages the shared UI and global styles.
{
"tailwind": {
"css": "../../packages/ui/src/styles/globals.css",
"baseColor": "neutral"
},
"aliases": {
"utils": "@subito/ui/lib/utils",
"ui": "@subito/ui/components"
}
}
Sources: apps/dashboard/components.json:6-16
Conclusion
The Subito project employs a highly modular tech stack centered around TypeScript. By isolating the database logic into @subito/db and UI components into @subito/ui, the architecture ensures that both the Hono-based API and the Next.js dashboard remain thin, maintainable, and strictly typed. Background processing via BullMQ and a robust relational schema in PostgreSQL support the complex booking and partnership workflows inherent in the application.