A full-stack task and project management app built with Next.js 16, featuring epics, projects, categories, comments, and drag-and-drop reordering.
- Next.js 16 (App Router)
- NextAuth v5 (Credentials provider)
- Tailwind CSS v4 (CSS-first config)
- Neon Postgres (optional -- runs in-memory by default)
- TypeScript 5
git clone <repo-url>
cd todo
npm install
npm run devOpen http://localhost:3000. The app runs with an in-memory stub database by default -- no external services needed. Data resets on restart.
- Email:
nick@example.com - Password:
password
To persist data with Postgres (Neon or any Postgres provider):
- Copy
.env.exampleto.envand fill inDATABASE_URLandAUTH_SECRET. - Run
schema.sqlagainst your database to create tables. - Seed users:
npm run seed:users(editscripts/seed-users.tsfirst).
The app auto-detects: if DATABASE_URL is set, it uses Postgres; otherwise it falls back to the in-memory stub.
All API routes require authentication. You can call APIs with either your normal app session cookie or a bearer token.
Create/revoke tokens in Settings -> API Tokens (/settings). New tokens are shown only once.
AUTH_SECRETis used to sign/verify API JWTs.API_TOKEN_EXPIRY_DAYScontrols default token expiry (default:90).
curl -H "Authorization: Bearer <your-token>" \
http://localhost:3000/api/tasksCreate token via API:
curl -X POST http://localhost:3000/api/users/me/tokens \
-H "Authorization: Bearer <your-token>" \
-H "Content-Type: application/json" \
-d '{"label":"CLI token","expiry_days":90}'src/
app/
api/ # REST API routes (auth, categories, epics, projects, tasks, users)
api-docs/ # Swagger UI (visit /api-docs)
components/ # React components
login/ # Auth page
auth.ts # NextAuth v5 config
middleware.ts # Route protection
lib/
db/
adapter.ts # DbAdapter interface
index.ts # Active adapter (swap implementations here)
stub.ts # In-memory stub (default)
task-types.ts # Shared TypeScript types
task-utils.ts # Utility functions
hooks/ # Custom React hooks
| Command | Description |
|---|---|
npm run dev |
Start dev server on port 3000 |
npm run build |
Production build |
npm run lint |
ESLint (flat config) |
npm run format |
Prettier |
npm run seed:users |
Seed users into Postgres |