Budgetron uses a feature-based architecture that organizes code by business domain rather than technical layers. This approach keeps related code together and makes the codebase easier to navigate as it grows.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/budgetron-org/budgetron/llms.txt
Use this file to discover all available pages before exploring further.
Directory Overview
Feature-Based Architecture
Thesrc/features/ directory contains self-contained modules for each business domain:
Available Features
- ai/ - AI-powered transaction categorization
- analytics/ - Reporting and data visualization
- auth/ - Authentication flows and components
- bank-accounts/ - Bank account management
- budgets/ - Budget creation and tracking
- categories/ - Transaction category management
- transactions/ - Transaction CRUD and import/export
- user/ - User profile and settings
Feature Module Structure
Each feature typically contains:App Router Structure
Thesrc/app/ directory follows Next.js App Router conventions:
Server Layer
Thesrc/server/ directory contains server-side infrastructure:
Database (server/db/)
- schema.ts - Central export of all database schemas
- schemas/ - Individual table definitions using Drizzle ORM
user.ts,session.ts,account.ts- Auth tablesbank-account.ts- Bank accountstransaction.ts- Financial transactionscategory.ts- Transaction categoriesbudget.ts- Budget definitionscurrency-rate.ts- Exchange ratesgroup.ts,group-user.ts- Multi-user groupsuser-settings.ts- User preferencesfeature-flags.ts- Feature togglesenums.ts- Shared enum types
AI Service (server/ai/)
- model.ts - LLM client configuration (OpenAI-compatible)
- service/ - AI-powered features
categorize-transactions/- Auto-categorization logichealth/- AI provider health checks
Authentication (server/auth/)
- config.ts - BetterAuth configuration
- policies.ts - Authorization rules
- index.ts - Auth utilities and exports
Other Server Modules
- api/ - oRPC server configuration and routing
- blob/ - File upload service (Vercel Blob)
- email/ - Email service (Resend)
- flags/ - Feature flag management
- jobs/ - Background jobs (currency sync, etc.)
Shared Components
Thesrc/components/ directory contains reusable UI components:
- form/ - Form components and inputs
- icons/ - Icon components
- layout/ - Layout components (header, sidebar, etc.)
- pickers/ - Specialized pickers (date, category, etc.)
- table/ - Data table components
- ui/ - shadcn/ui components
- widgets/ - Dashboard widgets and cards
Configuration Files
Key configuration files in the project root:- drizzle.config.ts - Database ORM configuration
- next.config.ts - Next.js configuration
- tsconfig.json - TypeScript compiler options
- eslint.config.js - Linting rules with boundaries plugin
- tailwind.config.ts - Tailwind CSS configuration
- components.json - shadcn/ui component configuration
Database Migrations
Migrations are stored indrizzle/migrations/ with:
- [number]_[description].sql - Migration SQL files
- meta/ - Drizzle Kit metadata and snapshots
- migrate/ - Standalone migration runner for Docker