This is a public/networked todo application built with Nuxt 4, featuring SQLite database, Drizzle ORM, and unstorage caching. Perfect for interview coding challenges!
- Install dependencies:
npm install- Initialize database and start development server:
npm run init- Test the API endpoint:
curl http://localhost:3000/api/ping- Nuxt 4 - Frontend framework
- Nitro - Backend server
- SQLite - Database (app.db)
- Drizzle ORM - Database ORM
- unstorage - Caching layer
├── lib/
│ ├── db/
│ │ ├── index.ts # Database connection
│ │ ├── schema.ts # Database schema
│ │ ├── migrate.ts # Migration runner
│ │ └── migrations/ # Generated migrations
│ └── cache.ts # Caching utilities
├── server/
│ └── api/
│ └── ping.get.ts # Test API endpoint
└── app.db # SQLite database file
Generate new migration after schema changes:
npm run db:generateApply migrations:
npm run db:push🎯 Complete Todo System
- Users can create, view, and manage todos
- Priority levels (high, medium, low)
- Due dates with overdue detection
- User assignment and role management
🔗 Public API
- REST endpoints for todos and users
- Caching layer with TTL
- Error handling and validation
🎨 Modern UI
- Responsive design with Tailwind CSS
- Loading states and error boundaries
- SEO-friendly pages
Health check endpoint with database and cache testing
Fetch a specific todo with user information
Fetch user profile information
After running npm run init, try these URLs:
http://localhost:3000- Homepage with links to sample datahttp://localhost:3000/todos/1- View todo #1http://localhost:3000/users/1- View user profile #1http://localhost:3000/api/ping- Test API health
Start the development server on http://localhost:3000:
npm run devBuild the application for production:
# npm
npm run build
# pnpm
pnpm build
# yarn
yarn build
# bun
bun run buildLocally preview production build:
# npm
npm run preview
# pnpm
pnpm preview
# yarn
yarn preview
# bun
bun run previewCheck out the deployment documentation for more information.