Development Scripts
Command-line scripts to help with development, database management, and code quality.
Available Scripts
Development
Scripts for development, building, and running the application
Database Management
Scripts for database migrations, seeding, and management
Code Quality
Tools for maintaining code quality and formatting
Development Scripts
Development Server
Starts the development server using Turbopack for fast refresh and hot module replacement.
Production Build
Creates a production-ready build of the application.
Production Server
Launches the application in production mode.
Linting
Runs ESLint to check for code quality issues.
Database Management
Database scripts help manage the application's data layer through Drizzle ORM.
Generate Migrations
Generates new database migration files based on schema changes.
Run Migrations
Executes pending database migrations.
Push Schema Changes
Pushes schema changes directly to the database.
Seed Database
Populates the database with initial data (specifically user roles).
Setup Database
Convenience script that runs migrations and seeds the database.
Database Studio
Opens Drizzle Studio for visual database management.
Drop Database Tables
Caution
Drops all tables from the database. Use with extreme caution!
Code Quality Tools
Maintain code quality with these utilities to ensure consistent formatting and clean code.
Check Formatting
Checks if code follows the project's formatting rules.
Fix Formatting
Automatically fixes code formatting issues.
Detect Unused Dependencies
Identifies unused dependencies in package.json.
Check Unused Exports
Detects unused exports across the codebase.
Usage Examples
Run any script using Bun:
Common Examples
Start Development Server
bash bun dev
Run Database Migrations
bash bun db:migrate
Fix Code Formatting
bash bun format:fix
Script Reference Table
Category | Script | Description |
---|---|---|
Development | bun dev | Start development server |
bun build | Create production build | |
bun start | Start production server | |
bun lint | Check code quality | |
Database | bun db:generate | Generate migrations |
bun db:migrate | Run migrations | |
bun db:push | Push schema changes | |
bun db:seed | Seed database | |
bun db:setup | Setup database | |
bun db:studio | Open database UI | |
bun db:drop | Drop all tables | |
Code Quality | bun format | Check formatting |
bun format:fix | Fix formatting | |
bun check:unused | Check unused dependencies | |
bun check:files | Check unused exports |