Skip to content

Latest commit

 

History

History
89 lines (60 loc) · 2.28 KB

File metadata and controls

89 lines (60 loc) · 2.28 KB

Best Practices

Code Quality

  • Write clean code - Follow the project's style guides
  • Keep it simple - Avoid over-engineering
  • DRY principle - Don't repeat yourself
  • Single responsibility - Functions/components should do one thing well
  • Meaningful names - Use descriptive variable and function names

Performance

  • Avoid N+1 queries - Use select_related() and prefetch_related()
  • Optimize database queries - Add indexes where needed
  • Lazy loading - Load data when needed
  • Caching - Cache expensive operations when appropriate

Security

  • Never commit secrets - No API keys, passwords, or tokens
  • Validate input - Always validate and sanitize user input
  • Use parameterized queries - Prevent SQL injection
  • Follow Django/FastAPI security best practices

Accessibility

  • Semantic HTML - Use appropriate HTML elements
  • ARIA labels - Add labels for screen readers
  • Keyboard navigation - Ensure all features work with keyboard
  • Color contrast - Maintain sufficient contrast ratios

Version Control

Commit Guidelines

  • Make small, focused commits
  • Write meaningful commit messages
  • Commit working code
  • Don't commit commented-out code
  • Don't commit debugging statements

Branch Management

  • Keep branches short-lived
  • Merge or close stale branches
  • Rebase on main frequently
  • Delete merged branches

Project Structure Guidelines

Backend

  • Place models in models.py
  • Place API endpoints in router.py
  • Place Pydantic schemas in schemas.py
  • Follow existing app structure

Frontend

  • Components in app/components/
  • Pages in app/pages/ (file-based routing)
  • Composables in app/composables/
  • Utils in app/utils/

Release Process

(This section will be updated as the release process is formalized)

Semantic Versioning

We follow Semantic Versioning:

  • MAJOR version for incompatible API changes
  • MINOR version for backwards-compatible functionality
  • PATCH version for backwards-compatible bug fixes

Recognition

Contributors will be recognized in:

  • Git commit history
  • Release notes
  • Project contributors page (when available)

Thank you for contributing to MakerDB!


Questions? Feel free to ask in issues or pull request comments.