A full-stack Todo application built with React Router v7, Express, and SQLite, ready for deployment on Cloudflare Pages and Workers.
- ✅ User authentication (JWT)
- ✅ Create, read, update, delete todos
- ✅ Responsive UI with Tailwind CSS
- ✅ TypeScript throughout
- ✅ Cloudflare Workers for API
- ✅ Cloudflare Pages for frontend
- ✅ D1 Database for data persistence
- User Registration/Login - Create account and authenticate
- Todo Creation - Add new tasks to your list
- Todo List Display - View all your todos
- Todo Completion - Mark tasks as done
- Todo Deletion - Remove unwanted tasks
- Frontend: React Router v7, TypeScript, Tailwind CSS
- Backend: Hono (Workers), JWT authentication
- Database: Cloudflare D1 (SQLite)
- Deployment: Cloudflare Pages & Workers
npm install
npm install -g wrangler
wrangler loginwrangler d1 create todo-app-db
# Copy the database_id and update wrangler.tomlwrangler d1 execute todo-app-db --file=./schema.sql# Deploy API to Workers
wrangler deploy
# Build and deploy frontend
npm run build
wrangler pages deploy build/client --project-name todo-appJWT_SECRET: Your secure secret key
VITE_API_URL: Your Workers API URL
├── app/ # React Router frontend
│ ├── components/ # React components
│ ├── routes/ # Page routes
│ └── lib/ # Utilities
├── workers/ # Cloudflare Workers API
│ └── index.ts # API endpoints
├── functions/ # Local development API
├── scripts/ # Deployment scripts
└── schema.sql # Database schema
# Terminal 1: API server
npm run server
# Terminal 2: Frontend
npm run devPush to main branch triggers deployment.
./scripts/deploy.shCreate .env file:
PORT=3001
NODE_ENV=development
JWT_SECRET- Set in Workers dashboardVITE_API_URL- Set in.env.production
npm test- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
MIT