Skip to content

Commit c313096

Browse files
mahid797Copilot
andauthored
docs(contributing): add public contribution guide based on repo review (#41)
* docs(contributing): add public contribution guide based on repo review * Update CONTRIBUTING.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update CONTRIBUTING.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 0f57152 commit c313096

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed

CONTRIBUTING.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Contributing to LangRoute
2+
3+
Thanks for your interest in improving LangRoute! We welcome bug fixes, documentation updates, new features, and thoughtful refactors. By participating, you agree to follow our [Code of Conduct](./CODE_OF_CONDUCT.md).
4+
5+
## Getting set up
6+
- Follow the [Getting Started guide](./docs/getting-started.md) to install dependencies, prepare environment files, and run the app locally.
7+
- Copy environment defaults from [env/.env.example](./env/.env.example) and regenerate the root `.env` with `npm run env`.
8+
- Common scripts:
9+
- `npm run dev` – start the development server.
10+
- `npm run db boot` – start the PostgreSQL container.
11+
- `npm run check` – type-check and lint the project.
12+
13+
## How to contribute
14+
### Report bugs
15+
Open an issue and include steps to reproduce, expected vs. actual behavior, and any relevant logs (omit secrets).
16+
17+
### Request features
18+
Create an issue that explains the problem, proposed solution, and any API or UX notes.
19+
20+
### Improve documentation
21+
Small fixes can go straight to a PR. For larger restructures, start with an issue to discuss scope.
22+
23+
## Picking up work
24+
- Review existing issues before starting. Labels such as `good first issue` or `help wanted` may indicate where to begin.
25+
- If no issue exists, open one to align on scope before investing significant effort.
26+
27+
## Branching and workflow
28+
- Fork the repository (or create a branch if you have write access) and base your work on the default branch (`master`).
29+
- Name branches with a prefix:
30+
- `feature/your-feature`
31+
- `fix/your-bug`
32+
- `refactor/your-change`
33+
- `chore/your-update`
34+
- Keep branches focused and rebase on the latest default branch before opening a PR.
35+
36+
## Commit messages
37+
Use [Conventional Commit](https://www.conventionalcommits.org/) style:
38+
```
39+
feat(auth): add OAuth provider
40+
fix(db): correct migration path
41+
docs(readme): clarify setup instructions
42+
```
43+
Write small, self-contained commits.
44+
45+
## Code style and standards
46+
- TypeScript uses strict mode; avoid `any` and non-null assertions unless absolutely necessary.
47+
- Validate all API inputs with [Zod](https://github.com/colinhacks/zod) and infer types with `z.infer`.
48+
- Keep API routes thin: parse input → call a service → return a response. Avoid direct Prisma access in route handlers.
49+
- Prefer Tailwind CSS for styling and compose classes with the `cn()` helper.
50+
- UI components and hooks belong under `src/app/(client)`. Server-side logic and side effects live in `src/app/(server)/services`.
51+
- Run `npm run check` before committing; ESLint and Prettier are enforced via pre-commit hooks.
52+
53+
## Testing and quality
54+
- `npm run check` performs type checking and linting; ensure it passes before pushing.
55+
- The automated test suite is not yet available. You are not required to add or update tests at this time. If you have suggestions for testing approaches, please discuss them in your issue or pull request.
56+
- Husky runs lint-staged on commit to format staged files automatically.
57+
58+
## Pull requests
59+
- Open a PR once a coherent slice of work is ready.
60+
- Link related issues using `Closes #123` in the description.
61+
- Include screenshots for UI changes and call out any breaking changes or migration steps.
62+
- Keep PRs focused; avoid unrelated refactors.
63+
64+
## Review process
65+
- Automated checks will be required before review once CI is configured. *(TODO: document CI checks once configured.)*
66+
- Address reviewer feedback with follow-up commits and resolve open discussions.
67+
68+
## Security disclosures
69+
Do **not** file public issues for security vulnerabilities. Follow our [security policy](./SECURITY.md) instead.
70+
71+
## License
72+
*(TODO: add license information once a LICENSE file is available.)*
73+
74+
## Code of Conduct
75+
Participation in this project implies acceptance of the [Code of Conduct](./CODE_OF_CONDUCT.md).
76+
77+
For project overview and architecture details, see the [README](./README.md) and [Architecture guide](./docs/architecture.md).

0 commit comments

Comments
 (0)