mirror of
https://github.com/srbhr/Resume-Matcher.git
synced 2026-01-14 11:44:14 +00:00
- Introduced JD Match feature documentation detailing how tailored resumes match job descriptions. - Added Resume Template Settings documentation outlining template types and formatting controls. - Created LLM Integration Guide for multi-provider AI support, JSON handling, and prompt guidelines. - Compiled Agent Documentation Index for modular documentation on AI agents working with Resume Matcher. - Developed Maintainer Guide for the resume editor, covering architecture, types, and PDF handling. - Established a Code Review & Technical Debt TODO document to track critical issues and improvements.
2.0 KiB
2.0 KiB
Coding Standards
Frontend and backend coding conventions.
Frontend (TypeScript/React)
Design System
All UI changes MUST follow the Swiss International Style in style-guide.md:
- Use
font-seriffor headers,font-monofor metadata,font-sansfor body text - Color palette:
#F0F0E8(Canvas),#000000(Ink),#1D4ED8(Hyper Blue),#15803D(Signal Green),#F97316(Alert Orange),#DC2626(Alert Red),#4B5563(Steel Grey) - Components:
rounded-nonewith 1px black borders and hard shadows
Naming Conventions
- Use PascalCase for components
- Use camelCase for helpers
- Tailwind utility classes for styling
Textarea Enter Key Fix
All textareas in forms should include onKeyDown with e.stopPropagation() for Enter key to ensure newlines work correctly:
const handleKeyDown = (e: React.KeyboardEvent<HTMLTextAreaElement>) => {
if (e.key === 'Enter') e.stopPropagation();
};
Before Committing
- Run Prettier:
npm run format - Run linter:
npm run lint
Backend (Python/FastAPI)
General Rules
- Python 3.11+
- 4-space indents
- Type hints on ALL functions
- Async functions for I/O operations (database, LLM calls)
- Pydantic models for all request/response schemas
- Prompts go in
app/prompts/templates.py
Error Handling
Log detailed errors server-side, return generic messages to clients:
except Exception as e:
logger.error(f"Operation failed: {e}")
raise HTTPException(status_code=500, detail="Operation failed. Please try again.")
Race Conditions
Use asyncio.Lock() for shared resource initialization (see app/pdf.py for example).
Mutable Defaults
Always use copy.deepcopy() when assigning mutable default values to avoid shared state bugs:
# Correct
import copy
data = copy.deepcopy(DEFAULT_DATA)
# Incorrect - shared state bug
data = DEFAULT_DATA
New Service Pattern
Mirror patterns in app/services/improver.py for new services.