Skip to content

Latest commit

 

History

History
76 lines (63 loc) · 3.41 KB

File metadata and controls

76 lines (63 loc) · 3.41 KB

Gemini Context & Instructions for Resume Matcher

This file provides specific context and operational instructions for Gemini agents working on the Resume Matcher project.

1. Project Overview

Resume Matcher is a local-first, AI-powered application for tailoring resumes to job descriptions.

  • Frontend: Next.js 15 (React 19), Tailwind CSS, Lucide Icons.
  • Backend: FastAPI (Python 3.11+), TinyDB, LiteLLM.
  • Core Philosophy: Privacy-first (local DB), user-controlled AI, "Swiss International Style" design.

2. Critical Mandates (Non-Negotiable)

  1. Linting is Law: Always run npm run lint (frontend) or relevant Python checks before considering a task done.
  2. Swiss Style: All UI changes MUST adhere to the Swiss International Style. Clean, grid-based, highly legible.
  3. Type Safety:
    • Frontend: Strict TypeScript.
    • Backend: Python type hints are mandatory.
  4. Error Handling: Log full errors server-side; return safe, generic messages to the client.

3. Architecture & Patterns

Frontend (apps/frontend/)

  • State Management: React Context for global state (Language, Resume Data).
  • Styling:
    • App UI: Tailwind CSS.
    • Resume Templates: CSS Modules (Isolated).
      • Tokens: components/resume/styles/_tokens.css
      • Base: components/resume/styles/_base.module.css
      • Templates: components/resume/styles/[template-id].module.css
  • Components: PascalCase. Prefer functional components with hooks.
  • API: centralized in lib/api/. Use fetch wrappers.

Backend (apps/backend/)

  • LLM: Uses LiteLLM for multi-provider support.
    • Keys: Pass API keys explicitly to functions (avoid os.environ race conditions).
    • JSON: Use complete_json() wrapper for structured outputs.
  • Database: TinyDB (JSON-based). simple, file-system based.
  • Services: Business logic resides in app/services/.

4. Common Workflows

A. Modifying Resume Templates

architecture: CSS Modules + Tokens (New System).

  1. Do NOT use global Tailwind classes for resume internals (except layout wrappers).
  2. Edit Tokens: components/resume/styles/_tokens.css for global color/font changes.
  3. New Template:
    • Create components/resume/styles/[name].module.css.
    • Import _base.module.css.
    • Create component in components/resume/.
    • Register in components/resume/index.ts and dashboard/resume-component.tsx.

B. Adding a Custom Section Type

  1. Update schema in apps/backend/app/schemas/models.py.
  2. Update frontend types in apps/frontend/lib/types/resume.ts.
  3. Add rendering logic to DynamicResumeSection.
  4. Update ResumeForm to handle input.

C. Internationalization (i18n)

  1. UI: Add keys to apps/frontend/messages/{lang}.json.
  2. Content: Ensure backend prompts use {output_language} variable.

5. Useful Commands

# Frontend
npm run dev:frontend    # Start Next.js :3000
npm run lint           # Check code quality (Run often!)

# Backend
npm run dev:backend     # Start FastAPI :8000
# (Python tests pending setup)

6. Documentation Reference

  • Entry Point: AGENTS.md
  • Frontend Arch: docs/agent/30-architecture/frontend-workflow.md
  • Backend Arch: docs/agent/30-architecture/backend-guide.md
  • Template System: docs/agent/50-design-and-templates/template-system.md