|
1 | | -# Contributing |
| 1 | +# Contributing to Askbase |
2 | 2 |
|
3 | | -Thanks for contributing. |
| 3 | +Thanks for considering a contribution. Here's how to get started. |
4 | 4 |
|
5 | | -1. Fork and create a branch |
6 | | -2. Run tests and lint |
7 | | -3. Open a PR with Problem, Root cause, Fix, Testing |
| 5 | +## Getting Started |
| 6 | + |
| 7 | +1. Fork the repo and clone your fork |
| 8 | +2. Create a branch from `main` (`git checkout -b fix/your-change`) |
| 9 | +3. Install dependencies: `pip install -r requirements.txt` for the API, `npm install` in `frontend/` |
| 10 | +4. Run locally with `docker compose up --build -d` |
| 11 | + |
| 12 | +## Making Changes |
| 13 | + |
| 14 | +- Keep PRs focused on a single concern |
| 15 | +- Follow existing code style (black + ruff for Python, prettier for TypeScript) |
| 16 | +- Add or update tests for behavioral changes |
| 17 | +- Run the test suite before opening a PR |
| 18 | + |
| 19 | +## PR Format |
| 20 | + |
| 21 | +Structure your PR description: |
| 22 | + |
| 23 | +``` |
| 24 | +**Problem:** What was broken or missing |
| 25 | +**Root cause:** Why it was happening |
| 26 | +**Fix:** What you changed |
| 27 | +**Testing:** How you verified it works |
| 28 | +``` |
| 29 | + |
| 30 | +## Development Setup |
| 31 | + |
| 32 | +```bash |
| 33 | +# Backend |
| 34 | +cd api |
| 35 | +python -m venv .venv && source .venv/bin/activate |
| 36 | +pip install -r requirements.txt |
| 37 | +pytest |
| 38 | + |
| 39 | +# Frontend |
| 40 | +cd frontend |
| 41 | +npm install |
| 42 | +npm run dev |
| 43 | + |
| 44 | +# Full stack |
| 45 | +docker compose up --build -d |
| 46 | +``` |
| 47 | + |
| 48 | +## Reporting Bugs |
| 49 | + |
| 50 | +Open an issue with: |
| 51 | +- Steps to reproduce |
| 52 | +- Expected vs actual behavior |
| 53 | +- Environment details (OS, Python version, browser) |
| 54 | + |
| 55 | +## Code Review |
| 56 | + |
| 57 | +All submissions go through review. We look for correctness, test coverage, clean code, and no unnecessary complexity. |
| 58 | + |
| 59 | +## License |
| 60 | + |
| 61 | +By contributing, you agree that your contributions will be licensed under the MIT License. |
0 commit comments