Skip to content

Latest commit

Β 

History

History
181 lines (130 loc) Β· 3.47 KB

File metadata and controls

181 lines (130 loc) Β· 3.47 KB

Contributing to Backendify

Thank you for your interest in contributing to Backendify! This document provides guidelines and instructions for contributing.


Code of Conduct

Please be respectful and constructive in all interactions. We're building something together!


How to Contribute

Reporting Bugs

  1. Check if the bug has already been reported in Issues
  2. If not, create a new issue with:
    • Clear title and description
    • Steps to reproduce
    • Expected vs actual behavior
    • Environment details (OS, Docker version, etc.)

Suggesting Features

  1. Check existing issues and discussions
  2. Create a new issue with the enhancement label
  3. Describe the feature and its use case

Submitting Code

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Make your changes
  4. Write/update tests
  5. Ensure all tests pass
  6. Commit with clear messages
  7. Push and create a Pull Request

Development Setup

Prerequisites

  • Docker & Docker Compose
  • Python 3.11+
  • Node.js 18+

Backend Development

cd backend
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
pip install -r requirements-dev.txt  # Dev dependencies

# Run tests
pytest

# Run with auto-reload
uvicorn app.main:app --reload

Frontend Development

cd frontend
npm install
npm run dev

# Type checking
npm run typecheck

# Linting
npm run lint

Code Style

Python (Backend)

  • Follow PEP 8
  • Use type hints
  • Format with black
  • Sort imports with isort
  • Lint with ruff

TypeScript (Frontend)

  • Use TypeScript strict mode
  • Follow ESLint configuration
  • Use Prettier for formatting

Commit Messages

Use clear, descriptive commit messages:

feat: add advanced filtering to data API
fix: resolve token refresh race condition
docs: update authentication guide
refactor: simplify policy evaluation logic
test: add tests for webhook delivery

Prefixes:

  • feat: - New feature
  • fix: - Bug fix
  • docs: - Documentation
  • refactor: - Code refactoring
  • test: - Tests
  • chore: - Maintenance

Pull Request Guidelines

  1. One feature per PR - Keep PRs focused
  2. Update tests - Add/update tests for your changes
  3. Update docs - Document new features or API changes
  4. Pass CI - Ensure all checks pass
  5. Respond to feedback - Address review comments promptly

Project Structure

backendify/
β”œβ”€β”€ backend/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ api/routes/    # API endpoints
β”‚   β”‚   β”œβ”€β”€ models/        # SQLAlchemy models
β”‚   β”‚   β”œβ”€β”€ schemas/       # Pydantic schemas
β”‚   β”‚   β”œβ”€β”€ services/      # Business logic
β”‚   β”‚   └── core/          # Config, security
β”‚   └── tests/
β”œβ”€β”€ frontend/
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ routes/        # Page components
β”‚   β”‚   β”œβ”€β”€ components/    # Reusable components
β”‚   β”‚   └── lib/           # Utilities
β”‚   └── tests/
└── docs/

Testing

Backend Tests

cd backend
pytest                      # Run all tests
pytest -v                   # Verbose output
pytest tests/test_auth.py   # Run specific file
pytest -k "test_login"      # Run tests matching pattern

Frontend Tests

cd frontend
npm run test

Questions?

  • Open a GitHub Discussion
  • Check existing issues and docs

Thank you for contributing! πŸŽ‰