
This project is a sample todo application to try these stack:
- Web application framework
- Database
- Validation
- Test
- CSS
- Tailwind CSS v4
- Runtime
- Bun v1.2
- Development tool
- Vite
- Biome
- code formatter, linter
- pre-commit
- pre-commit manager to run biome
- misc
- neverthrow
- Result type for TypeScript / To Handle expected errors
- neverthrow
First, clone this repository.
git clone https://github.com/kfly8/sample-todoapp-honox-zod-drizzle.git
cd sample-todoapp-honox-zod-drizzle
Next, manually install or using docker.
Case: Manually install
Bun version 1.2 or higher is required.
# Install dependencies
bun install
# Database setup for development
bunx --bun drizzle-kit migrate
# Database setup for test
env NODE_ENV=test bunx --bun drizzle-kit migrate
# Start the development server
bun run dev
Case: Using Docker
docker build --pull -t sample-todoapp .
docker run -d -p 3000:3000 sample-todoapp
- Update schema
edit app/infra/db/schema.ts
- Create a new migration
bunx drizzle-kit generate
- Apply the migration
bunx drizzle-kit migrate
These processes is option 3 in the following document: https://orm.drizzle.team/docs/migrations