Audience: Developers and AI agents working on ChronoStep For setup instructions: See SETUP.md For general overview: See README.md
This document provides detailed technical information about ChronoStep's architecture, implementation decisions, and known issues. Keep information concise and actionable.
- Next.js: 16.1.6
- React: 18.2.0
- React DOM: 18.2.0
- TypeScript: 5.3.3
- Tailwind CSS: 3.4.1
- Firebase client SDK: 11.0.1
- Firebase Admin SDK: 13.6.1
- PostCSS: 8.4.33
- Autoprefixer: 10.4.16
- Node.js: not pinned in repo (check local runtime)
- npm overrides: fast-xml-parser@5.3.4 (security fix for firebase-admin dependency)
- Next.js App Router renders client-side pages for all routes.
- Firebase Auth gates the UI;
AuthGatewraps every page. - Firestore stores tasks, steps, and work logs under a userId.
useTaskStoreis the single data access layer (client only).- Tailwind CSS styles every view; minimal global CSS.
- Auth: email/password sign-in and sign-up (
src/hooks/useAuth.tsx). - Auth: optional sign-up lockout with a whitelist for new registrations.
- Tasks list: search by title/description/tags, filter by status, and sort by priority (
src/app/tasks/page.tsx). - Tasks list: default view excludes
donetasks via the "Active" filter (src/app/tasks/page.tsx). - Task detail: edit task, steps, and work logs in modals with Esc warnings on unsaved text (
src/app/tasks/[id]/page.tsx). - Steps: status filters that show only matching steps/substeps and readable status badges.
- Steps: nested steps with ordering, status updates, parent reassignment, and auto-complete when all children are done.
- Today view: highlights tasks and steps due today (
src/app/today/page.tsx). - Work logs: start/stop/note entries per task or step with tags, prefilled from task tags.
- Timer: global Start/Stop timer persisted in localStorage with live elapsed display and WorkLog creation on stop.
- Timeline: chronological work log view with month/year + tag filters (
src/app/timeline/page.tsx). - Report: monthly summary by task with totals, note highlights, and tag rollups (
src/app/report/page.tsx). - Insights: upcoming due dates, recent activity, priority/tag summaries, and calendar heatmap (
src/app/insights/page.tsx). - Shared UI: top navigation and auth gate (
src/components). - Shared UI: demo account credentials are displayed on the login screen for trials.
- Insights: calendar heatmap showing daily work log minutes for the selected month.
- Insights: monthly trends snapshot with totals, top task, and top tag for the last 6 months.
- Task: status, priority, tags, dueDate, timestamps, userId.
- Step: order, optional parentStepId, status, dueDate, userId.
- WorkLog: type, message, timestamp, tags, optional stepId, userId.
- All timestamps are ISO strings; UI converts them for display.
- Core UI flows are implemented and wired to Firestore.
- All pages are client components; no server actions or API routes.
- Data is fetched on demand; no real-time subscriptions.
- Firestore rules enforce per-user ownership by userId.
- No automated tests or CI config in repo.
src/lib/mockData.tsexists but is not referenced..envcontains Firebase credentials (treat as sensitive).
- Required env vars for client:
NEXT_PUBLIC_FIREBASE_API_KEYNEXT_PUBLIC_FIREBASE_AUTH_DOMAINNEXT_PUBLIC_FIREBASE_PROJECT_IDNEXT_PUBLIC_FIREBASE_APP_ID
- Optional:
NEXT_PUBLIC_DISABLE_SIGNUPSandNEXT_PUBLIC_SIGNUP_WHITELISTcontrol new registrations. - Optional:
FIREBASE_SERVICE_ACCOUNTJSON string is present in.env. - Firebase Auth (email/password) must be enabled.
- Firestore rules should be deployed from
firestore.rules.
- Uses Tailwind utility classes and white card layouts.
- Status and priority colors are encoded via class maps in pages.
- Copy is mixed Italian/English; keep tone consistent when editing.
- Dates are displayed with
toLocaleDateString/toLocaleString.
- Start dev server:
npm run dev. - Production build:
npm run build. - Lint:
npm run lint.
- Due date handling uses UTC midnight; local timezone display may shift day.
useTaskStoreloads all docs per user; scale may become slow.- Delete operations recurse through steps and work logs client-side.
- Lack of tests increases regression risk for refactors.
- Preset work logs / quick log actions.