How uncazzy/todoist-dashboard works
Main Components
A. Frontend Layer:
• React Components (organized by feature)
• Dashboard components
• Analytics visualizations
• Recurring tasks management
• Layout components
• State Management (via React hooks)
• Authentication UI
B. Next.js Application Layer:
• API Routes
• Authentication handling
• Page routing
• Server-side rendering
C. External Services:
• Todoist API
• OAuth Authentication
• NextAuth.js service
Key Architectural Elements
┌─ Client Layer ─────────────────────┐
• ┌─ Components ──────────────────┐ │
• Dashboard │ │
• Insights │ │
• RecurringTasks │ │
• Analytics Visualizations │ │
• ┘ │
• ┌─ Hooks & Utils ───────────────┐ │
• useDashboardData │ │
• Calculation Utils │ │
• Pattern Processing │ │
• ┘ │
• ┘
• ↕ (API Calls)
┌─ Next.js Server Layer ──────────────┐
• ┌─ API Routes ─────────────────┐ │
• /api/auth │ │
• /api/getStats │ │
• /api/getTasks │ │
• /api/getUser │ │
• ┘ │
• ┌─ Authentication ──────────────┐ │
• NextAuth.js Integration │ │
• ┘ │
• ┘
• ↕ (OAuth/API)
┌─ External Services ───────────────────┐
• ┌─ Todoist API ────────────────┐ │
• Task Management │ │
• Project Data │ │
• ┘ │
• ┘
Data Flow Indicators
• API request/response flows
• Authentication flows
• Data processing pipelines
• Component interactions
Important Notes
• Next.js-specific architecture (API routes, SSR capabilities)
• Separation between client and server components
• Where TypeScript types are shared
• Integration points with Todoist's API
• Authentication flow with NextAuth.js