Skip to content

feat(frontend): frontend workspace is a single component - bootstrap a real application shell #665

Description

@phertyameen

Summary

The entire frontend/ workspace currently consists of one component: frontend/src/components/analytics/OnboardingFunnelChart.tsx. There are no pages/routes, no API client, and no auth flow - yet CI builds and type-checks it, and the README describes a player-facing product (IQ survey onboarding, adaptive puzzles, leaderboards). The backend exposes the needed surface via its Swagger-documented REST API, so the gap is purely frontend scaffolding.

Proposal (phased)

Phase 1 - shell:

  1. Confirm the stack implied by root dependencies (@tanstack/react-query, framer-motion) - i.e. a React/Vite app - and scaffold routing + layout.
  2. Typed API client generated from the Swagger document (/api-json) or a hand-rolled fetch wrapper with error normalization.
  3. Auth screens against the existing auth endpoints (Google OAuth server-side support exists via passport-google-oauth20; guest sessions via guest-session.provider.ts).

Phase 2 - core loops:
4. Puzzle browsing/solving view wired to puzzles + progress endpoints.
5. Streak & XP surfaces fed by streak/users endpoints.
6. Integrate the existing OnboardingFunnelChart into a dashboard route rather than leaving it orphaned.

Acceptance criteria

  • npm --workspace frontend run dev serves a navigable app.
  • Login (Google + guest) reaches the backend and stores tokens securely.
  • One vertical slice (browse puzzle -> submit answer -> see XP/streak update) works end-to-end locally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions