|
| 1 | +# Contributing to Qibla |
| 2 | + |
| 3 | +Thanks for your interest in Qibla. Contributions, bug reports, and feature ideas are all welcome. |
| 4 | + |
| 5 | +## Before you start |
| 6 | + |
| 7 | +For anything non-trivial, **please open an issue first** so we can align on scope and direction before you spend time writing code. Small fixes (typos, obvious bugs, docs improvements) can go straight to a PR. |
| 8 | + |
| 9 | +## Development setup |
| 10 | + |
| 11 | +The full getting-started guide lives in the [README](./README.md#getting-started). Quick version: |
| 12 | + |
| 13 | +```bash |
| 14 | +git clone https://github.com/Aqib-Rime/qibla.git |
| 15 | +cd qibla |
| 16 | +bun install |
| 17 | +cp .env.example .env.local # fill in Neon URL + auth secret |
| 18 | +bun db:push |
| 19 | +bun db:seed |
| 20 | +bun run dev:admin # terminal 1 |
| 21 | +cd apps/mobile && bun start # terminal 2 |
| 22 | +``` |
| 23 | + |
| 24 | +## Workflow |
| 25 | + |
| 26 | +1. Fork the repo and create a topic branch from `main` — prefer a short, descriptive name: `feat/events-admin`, `fix/qibla-heading-drift`, `docs/env-vars` |
| 27 | +2. Make your change |
| 28 | +3. Keep these commands green before opening the PR: |
| 29 | + ```bash |
| 30 | + bun run typecheck |
| 31 | + bun run lint |
| 32 | + ``` |
| 33 | +4. Open a PR against `main` |
| 34 | + |
| 35 | +## Commit messages |
| 36 | + |
| 37 | +Follow the existing convention — [Conventional Commits](https://www.conventionalcommits.org/) with a feature scope: |
| 38 | + |
| 39 | +``` |
| 40 | +feat(mobile/qibla): add calibration overlay |
| 41 | +fix(admin/reviews): recompute rating on status change |
| 42 | +docs: add EAS build notes |
| 43 | +chore: bump expo to 54.0.34 |
| 44 | +``` |
| 45 | + |
| 46 | +Do **not** amend, squash, or rewrite commits already pushed to `main`. |
| 47 | + |
| 48 | +## PR checklist |
| 49 | + |
| 50 | +- [ ] The PR title follows the Conventional Commits format |
| 51 | +- [ ] `bun run typecheck` passes |
| 52 | +- [ ] `bun run lint` passes |
| 53 | +- [ ] The change is covered by the existing README / docs (or docs updated) |
| 54 | +- [ ] For mobile UI changes: tested in a dev build on a real device (not just Expo Go) |
| 55 | +- [ ] For admin changes: tested against a real Neon database, not a mocked one |
| 56 | +- [ ] No secrets committed (check `.env.local`, `.dev.vars`) |
| 57 | + |
| 58 | +## Coding guidelines |
| 59 | + |
| 60 | +- **TypeScript everywhere** — no `any` unless there's a comment explaining why |
| 61 | +- **Feature-module architecture** — new mobile features live in `apps/mobile/features/<name>/` with `components/`, `hooks/`, `lib/`, and a barrel `index.ts`. See existing features for the pattern |
| 62 | +- **Route files are thin** — they should re-export from a feature module, not contain logic |
| 63 | +- **Styling** — NativeWind on mobile, Tailwind v4 + shadcn primitives on admin. No ad-hoc StyleSheet or CSS-in-JS |
| 64 | +- **API** — add new endpoints to `packages/api`. Use `publicProcedure` / `authedProcedure` / `adminProcedure` depending on access level |
| 65 | +- **DB** — all schema changes go through Drizzle. Run `bun db:generate` to create a migration, commit the generated SQL |
| 66 | + |
| 67 | +## Reporting bugs |
| 68 | + |
| 69 | +Open a [bug report](https://github.com/Aqib-Rime/qibla/issues/new/choose) with: |
| 70 | + |
| 71 | +- Platform + OS version (iOS 18 on iPhone 15, Android 14 on Pixel 8, etc.) |
| 72 | +- Steps to reproduce |
| 73 | +- Expected vs actual behavior |
| 74 | +- Logs / screenshots if you have them |
| 75 | + |
| 76 | +## Security issues |
| 77 | + |
| 78 | +Please do **not** open a public issue for security vulnerabilities. See [SECURITY.md](./SECURITY.md) for responsible disclosure. |
| 79 | + |
| 80 | +## License |
| 81 | + |
| 82 | +By contributing, you agree that your contributions will be licensed under the [MIT License](./LICENSE). |
0 commit comments