this repo has no description
at react-mobile 58 lines 4.3 kB view raw view rendered
1# Values Exercise PWA Migration - Development Guide (Adapted for Gemini) 2 3## Project Overview 4 5Migrate the existing Vanilla JS/TS Values Exercise application into a modern, responsive React-based Progressive Web App (PWA). Key technologies include React, TypeScript, Vite, Bun, Tailwind CSS, **Zustand for state management**, and `localStorage` for persistence. The app will feature a multi-column drag-and-drop interface for desktop and a touch-friendly "flashcard" interface for mobile. **Testing will be performed using Vitest with the jsdom environment.** 6 7This guide outlines the process and conventions Gemini will follow during this migration. 8 9## Context & Memory Management 10 11Since Gemini doesn't have persistent memory files like `memory.md` or a `/compact` command, context will be maintained by: 12 131. **Reviewing `PLAN.md`:** Refer back to `PLAN.md` at the start of new interactions or when resuming work to understand the overall strategy and current phase. 142. **Reviewing Conversation History:** Utilize the recent conversation history to recall specific decisions, code changes, and the immediate next steps discussed. 153. **Summarizing Progress:** In messages, especially after completing steps or phases, summarize the work accomplished, mention files modified (based on tool usage), confirm the current status according to `PLAN.md`, and state the next planned steps. 164. **Highlighting Key Decisions:** Explicitly mention key technical or architectural decisions made during the conversation for future reference. 17 18## Task Planning and Execution (Based on `PLAN.md`) 19 20Our primary planning document is `PLAN.md`. When tackling steps or phases outlined there: 21 221. **Reference `PLAN.md`:** State which phase and step(s) from `PLAN.md` are currently being worked on. 232. **Pre-computation/Pre-analysis (Implicit Workplan):** Before executing a step (especially coding steps), internally (or explicitly state if complex): 24 - **Goal:** Define what the specific step aims to achieve. 25 - **Files/Components Involved:** Identify the primary files or conceptual components expected to be modified or created. 26 - **Approach/Checklist:** Outline the sub-tasks required for the step. 27 - **Verification:** Mention how the step's success can be confirmed (e.g., "We can test this by running the dev server...", "We can verify this by running `bun test`..."). 28 - **Questions/Assumptions:** If ambiguity is encountered or an assumption must be made (especially for non-blocking issues), state the assumption and proceed, flagging it for potential review. Blocking issues will be raised directly. 293. **Execution:** Use the available tools (reading files, editing files, running commands) to perform the implementation tasks. 304. **Status Updates:** Confirm completion of steps/phases from `PLAN.md`. 31 32## Build/Test/Lint Commands (for `values-react-app` directory) 33 34- **Start Dev Server:** `bun run dev` 35- **Run Tests:** `bun run test` (or `bunx vitest`) 36- **Build for Production:** `bun run build` 37- _(Lint commands depend on specific ESLint setup, typically `bun run lint` if configured in `package.json`)_ 38 39## Testing Approach 40 41- **Runner:** Use **Vitest** (via `bun run test` or `bunx vitest`). 42- **Framework:** Utilize React Testing Library (`@testing-library/react`, `@testing-library/user-event`). Use Vitest's Jest-compatible APIs (`describe`, `it`, `expect`, etc.). 43- **Environment:** Configured **jsdom** environment via Vitest config. 44- **Focus:** Test component behavior, rendering based on state/props, user interactions. Unit test complex logic (**Zustand store actions**) thoroughly. Use testing utilities/mocks for store interaction in component tests. 45- **Structure:** Colocated tests (`ComponentName.test.tsx`). Use `describe` blocks for logical grouping. 46 47## Code Style Guidelines (Summary) 48 49- **Naming:** `camelCase` for variables/functions, `PascalCase` for components/types. 50- **Imports:** Standard grouping (React, libraries, project files). 51- **Components:** Functional components with hooks. 52- **State Management:** Use **Zustand** (per `PLAN.md`). 53- **Styling:** Tailwind CSS utility-first approach. 54- **Testing:** Follow React Testing Library best practices. Use `data-testid` where appropriate. 55 56## Current Development Focus 57 58Refer to the latest conversation summary or `PLAN.md` status check.