You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Linting and formatting
bun lint # Check code with Biome
bun lint:fix # Auto-fix issues# Type checking
bun check-types # Type check all packages# Testing
bun test# Run all tests with Bun Test
bun test:watch # Run tests in watch mode
turbo test# Run tests via Turborepo# Building
bun build # Build all packages
bun build:packages # Build only packages (not apps)# Development
bun dev # Start all packages in dev mode
bun dev:web # Start web app on port 3000
bun dev:server # Start server on port 3001# Database operations
bun db:push # Push schema changes to DB
bun db:migrate # Apply migrations
bun db:generate # Generate migration files
bun db:studio # Open Drizzle Studio
bun db:reset # Reset database and seed
bun db:seed # Seed database# Run specific package command
turbo -F @habitutor/db <command>
Code Style Guidelines
Formatting
Indentation: Tabs (configured in biome.json)
Line width: 120 characters
Quotes: Double quotes for JavaScript/TypeScript
Formatting tool: Biome (run bun lint:fix before committing)
TypeScript
Strict mode: Always enabled, use @typescript/native-preview for type checking
Type inference: No explicit types when inferrable (enforced by biome)
As const: Use as const assertions for literal types where needed
Imports: Use type keyword for type-only imports when beneficial
Import Organization
Workspace packages: @habitutor/package-name
Catalog dependencies: Use "catalog:" in package.json
Relative imports: Use @/ alias for app internal paths
Organize: External → Workspace → Relative
React Components
Functional components only, no class components
TypeScript props interfaces, destructure props
Use Radix UI primitives as base for UI components
Styling: Tailwind CSS with cn() utility (clsx + tailwind-merge)
Variants: Use class-variance-authority (cva) for component variants
Patterns: Separate component and container logic when complex