What I Do Today
Mobile-friendly web app to track leadership activities, planned vs actual focus, and team execution trends.
Documentation
- Docs Index
- PRD
- Architecture
- Data Model
- API Reference
- Deployment (Hostinger VPS)
- Operations Runbook
- Test Plan
Features
- Auth and security:
- one-time setup + login/logout
- CSRF origin checks on mutating actions
- in-memory rate limiting for auth/actions/export routes
- audit log for critical actions
- Multi-user team support:
- team membership with RBAC (
OWNER,ADMIN,MEMBER) - team settings for member create/role update/remove
- team dashboard with member-level breakdown
- team membership with RBAC (
- Daily execution workflow:
- daily activity logs by category/project/energy
- daily summary cards + top focus areas
- category/project management
- planning allocations (
CATEGORY/PROJECT) + focus drift detection - AI narrative summary per day (OpenAI-backed with local fallback)
- Analytics:
- range analytics with date filters
- weekly summary page
- monthly trends page
- energy trend chart
- category/project drill-down by date
- Exports and automation:
- CSV/PDF export (daily or range)
- personal/team scope export
- scheduled exports (
DAILY/WEEKLY/MONTHLY) - on-demand scheduled export runner (
npm run cron:exports)
- Automated tests:
- vitest unit tests for time, summary, analytics, drift, and rate limit modules
Tech Stack
- Next.js (App Router)
- PostgreSQL
- Prisma ORM
- Vitest
Local Setup
- Install dependencies
npm install
- Configure environment in
.env
DATABASE_URL="postgresql://user:password@localhost:5432/what_i_do_today?schema=public"
AUTH_SECRET="replace-with-a-long-random-secret"
APP_TIME_ZONE="Asia/Kuala_Lumpur"
OPENAI_API_KEY=""
OPENAI_MODEL="gpt-4.1-mini"
- Generate Prisma client
npm run prisma:generate
- Run migrations
npm run prisma:migrate
- Start app
npm run dev
Open http://localhost:3000, then create your one-time admin account at /setup.
Production (Hostinger VPS)
- Set production environment variables.
- Run migrations on production DB.
- Build and start:
npm run build
npm run start
Use a process manager (pm2 or systemd) and reverse proxy (nginx) with HTTPS.
Scheduled Export Runner
Run due schedules manually (useful for cron jobs):
npm run cron:exports
Tests
npm test