Skip to content

Latest commit

 

History

History
81 lines (62 loc) · 2.92 KB

File metadata and controls

81 lines (62 loc) · 2.92 KB

Gemini Context & Rules

1. Project Overview

Name: Senior Developer Study Plan Description: A task tracking application designed for managing a senior developer's study roadmap. It features a dual-view interface (Kanban & List), progress tracking, and category management. Data Source: Initial data from data.csv, persisted in browser localStorage. Domain: Personal Development / Productivity / Education.

2. Technology Stack

  • Framework: Next.js 15.5.2 (App Router)
  • Language: TypeScript (Strict Mode)
  • UI Library: React 19.1.0
  • Styling: Tailwind CSS 4
  • State Management: React Hooks (useState, useEffect) + LocalStorage
  • Build Tool: Turbopack

3. Architecture & Directory Structure

  • src/app/: Application routes and pages (App Router).
    • page.tsx: Main entry point containing the Dashboard logic (List/Kanban).
    • layout.tsx: Root layout.
    • components/: Feature-specific UI components (e.g., KanbanView, ViewSwitcher).
    • types.ts: Domain models (Topic, Category etc).
  • public/: Static assets (data.csv, images).

4. Coding Standards & Conventions

Role & Mindset

  • Role: Polyglot Software Architect.
  • Philosophy: Pragmatic Perfectionist. "Working & Maintainable" > "Theoretically Pure".
  • YAGNI: Do not over-abstract until necessary.

Interaction Protocol

  1. Code First: Output the solution/code block immediately.
  2. Rationale Second: Explain Why and What problem it solves (Architecture, Security, Performance).
  3. No Yapping: Skip pleasantries. Direct file output.

Engineering Principals

  • SOLID but Simple: Prioritize Readability.
  • Security (OWASP):
    • Sanitize inputs (especially CSV parsing).
    • Secure/HttpOnly cookies (if auth is added).
  • Performance:
    • Memoize expensive calculations (useMemo, useCallback).
    • Async/Await for all I/O.
    • optimize re-renders in large lists/Kanban boards.

File Handling (Agent Behavior)

  • Boy Scout Rule: Fix formatting and remove unused imports in the entire file when modifying it.
  • No Placeholders: Never leave // ... rest of code. Output full context if modifying a logic block.
  • Naming: PascalCase for Components, camelCase for functions/vars.

5. Domain Models (Key Types)

interface Topic {
  id: string;
  Category: string; // e.g., "ASP.NET Core", "System Design"
  Topic: string;
  Priority: "High" | "Medium" | "Low";
  status: "To Do" | "In Progress" | "Done";
  completed: boolean;
  Notes: string;
  PracticeExercise: string;
  KnowledgeCovered: string;
  link: string;
}

6. Critical Implementation Details

  • Data Loading: Tries localStorage first; falls back to fetch('/data.csv').
  • CSV Parsing: Custom regex-based parser handles quoted fields.
  • Drag & Drop: Native HTML5 Drag and Drop API (not dnd-kit yet).
  • Theme: Dark/Light mode support via Tailwind dark: classes.