Handover workspace

ERS, Todo, OfferReview, and Docu in one view

Imported from live server docs, code structure, and deployment notes.

Apr 3, 2026, 12:38 PM

Todo

What I Do Today

Mobile-friendly web app to track leadership activities, planned vs actual focus, and team execution trends.

README.md

Updated Mar 4, 2026, 3:14 AM

What I Do Today

Mobile-friendly web app to track leadership activities, planned vs actual focus, and team execution trends.

Documentation

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
  • 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

  1. Install dependencies
npm install
  1. 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"
  1. Generate Prisma client
npm run prisma:generate
  1. Run migrations
npm run prisma:migrate
  1. Start app
npm run dev

Open http://localhost:3000, then create your one-time admin account at /setup.

Production (Hostinger VPS)

  1. Set production environment variables.
  2. Run migrations on production DB.
  3. 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