This repository has no description
1# Development Guide for Takes
2
3## Commands
4- `bun run dev` - Start development server with watch mode
5- `bun run db:generate` - Generate database migrations with Drizzle
6- `bun run db:migrate` - Apply database migrations
7- `bun run db:studio` - Start Drizzle Studio on port 3001
8- `npx biome lint .` - Lint codebase
9- `npx biome format . --write` - Format codebase
10
11## Code Style
12- **Formatting**: Use tabs for indentation, double quotes for strings (enforced by Biome)
13- **Imports**: Organize imports automatically with Biome
14- **Types**: Use TypeScript with strict mode enabled; prefer explicit return types
15- **Error Handling**: Use try/catch blocks with specific error types when possible
16- **Naming**:
17 - camelCase for variables and functions
18 - PascalCase for classes and types
19 - ALL_CAPS for constants
20- **Database**: Use Drizzle ORM with SQLite
21- **API**: Use Slack Edge API for bot interactions
22- Always do await context.respond and then return rather than returning the function
23- Always use Bun APIs when available as they're faster (e.g. `bun.randomUUID7()` instead of `crypto.uuid`)
24
25## Architecture
26Slackbot that uses a SQLite database through Drizzle ORM to manage "takes" sessions.
27Keep feature implementations in the `src/features` directory and common utilities in `src/libs`.