A comprehensive collection of coding standards, best practices, and guidelines for the VerifyWise project. This documentation is designed to ensure consistency, maintainability, and quality across the entire codebase.
| Layer | Technologies |
|---|---|
| Frontend | React 19, TypeScript, Vite, Material-UI |
| Backend | Node.js, Express.js, TypeScript, Sequelize |
| Python Services | FastAPI, Python 3.12 |
| Database | PostgreSQL |
| Testing | Vitest (80% coverage target), Jest, DeepEval |
| Linting | ESLint with TypeScript strict mode |
- New to the project? Start with QUICK_START.md
- Writing a PR? Use PR Checklist
- Creating a component? See Component Checklist
Core programming principles that apply across all languages and frameworks.
- Clean Code Principles - Meaningful names, small functions, Boy Scout Rule
- SOLID Principles - OOP design principles with TypeScript examples
- Design Principles - DRY, KISS, YAGNI, Clean Architecture
TypeScript-specific guidelines aligned with our ESLint configuration.
- TypeScript Standards - Strict mode, avoiding
any, best practices - Naming Conventions - Consistent naming across the codebase
- Type Safety - Utility types, type guards, generics
Frontend development standards for React applications.
- React Patterns - Function components, custom hooks, compound components
- Component Guidelines - File structure, MUI theme usage, accessibility
- Hooks Guidelines - Custom hook patterns, React Query integration
- State Management - Redux Toolkit, React Query, local state
Node.js and Express.js development standards.
- Express Patterns - Route organization, middleware, security
- Controller Guidelines - Request handling, validation, responses
- Middleware Guidelines - Authentication, error handling
- Database Patterns - Sequelize models, migrations, transactions
Python and FastAPI development guidelines.
- Python Standards - PEP 8 compliance, code organization
- FastAPI Patterns - Routers, Pydantic, dependency injection
- Type Hints - Type annotations, mypy compatibility
Security best practices aligned with OWASP guidelines.
- Security Checklist - OWASP-aligned security checklist
- Authentication - JWT handling, password security
- Input Validation - Validation strategies, sanitization
- Error Handling - Secure error handling, no internal exposure
Testing strategies and implementation guidelines.
- Testing Strategy - Test pyramid, TDD, coverage targets
- Frontend Testing - Vitest, React Testing Library
- Backend Testing - Jest, mocking patterns
- Python Testing - pytest, DeepEval for AI testing
Development workflow and collaboration guidelines.
- Git Workflow - Branching strategy, commit messages
- Code Review - Review focus areas, feedback format
- PR Guidelines - Pull request best practices
- Documentation - JSDoc, docstrings, component docs
Visual design standards extracted from the VerifyWise StyleGuide.
- Colors - Full color palette with theme tokens
- Typography - Font sizes, weights, line heights
- Spacing - 2px base unit, layout mixins
- Icons - lucide-react library, standard sizes
- Shadows, Animations & Z-Index - Elevation, transitions, layering
- Breakpoints - Responsive design patterns
- Component Patterns - Buttons, forms, tables, modals
- Do's and Don'ts - Quick reference design rules
- Accessibility - WCAG AA compliance guidelines
- Common Patterns - Reusable code patterns
Quick reference checklists for common tasks.
- PR Checklist - Pre-submission checklist
- Component Checklist - React component checklist
- API Endpoint Checklist - Backend endpoint checklist
- Security Review Checklist - Security review checklist
Copy-paste templates for common patterns.
These guidelines are based on industry best practices from:
| Topic | Source |
|---|---|
| Clean Code | Robert C. Martin - "Clean Code" |
| DRY/KISS/YAGNI | Andy Hunt & Dave Thomas - "The Pragmatic Programmer" |
| SOLID Principles | Robert C. Martin |
| Security | OWASP Top 10 & Secure Coding Practices |
| TDD | Kent Beck - "Test-Driven Development" |
| TypeScript | Google TypeScript Style Guide |
| React | React 19 Documentation |
| Node.js | goldbergyoni/nodebestpractices |
| Python | PEP 8 Style Guide |
When updating these guidelines:
- Ensure changes align with existing ESLint configuration
- Provide concrete examples for each guideline
- Include both good and bad examples where applicable
- Update the relevant checklist if adding new requirements
- Keep guidelines actionable and specific to VerifyWise
These guidelines align with existing project standards:
- ESLint Configuration: See
Clients/eslint.config.jsfor enforced rules - Clean Architecture: See
Clients/clean-architecture.mdfor layer structure - PR Template: See
.github/pull_request_template.mdfor submission requirements