We're excited that you're interested in contributing to ContribHub! This document will guide you through the process of setting up the project locally and making contributions.
- Prerequisites
- Setting Up the Development Environment
- Configuring Supabase
- Running the Project
- Making Changes
- Submitting a Pull Request
- Code Style Guidelines
- Community Guidelines
Before you begin, ensure you have the following installed:
- Node.js (v14 or later)
- pnpm (v7 or later)
- Git
- Docker (for local Supabase setup)
-
Fork the ContribHub repository on GitHub.
-
Clone your forked repository locally:
git clone https://github.com/your-username/contribhub.git cd contribhub
-
Install project dependencies:
pnpm install
-
Set up Supabase locally:
- Install Supabase CLI (Guides)
- Start Supabase:
supabase start
- This will spin up a local Supabase instance using Docker.
- Keep this terminal window running, as you will need the
anon
andservice_role
keys in later steps.
-
Copy the
.env.example
file to.env.local
:cp .env.example .env.local
-
Update
.env.local
with your own values:GITHUB_APP_TOKEN
: Your GitHub personal access token (GitHub Guide)NEXT_PUBLIC_SUPABASE_ANON_KEY
: Theanon
key from the Supabase local dev setupSUPABASE_SERVICE_KEY
: Theservice_role
key from the Supabase local dev setupNEXT_PUBLIC_SUPABASE_URL
: The API URL from the Supabase local dev setupNEXT_PUBLIC_CONTRIBHUB_ORIGIN_DOMAIN
: The domain where your ContribHub instance is running (e.g.,http://localhost:3000
for local development)NODE_ENV
: Set todevelopment
orproduction
depending on your environment
Note: Keep your
.env.local
file secure and never commit it to version control.
-
Register an OAuth application on GitHub (Supabase GitHub Login Guide)
-
Modify the
config.yaml
in the Supabase folder:[auth.external.github] enabled = true client_id = "env(GITHUB_CLIENT_ID)" secret = "env(GITHUB_SECRET)"
-
Add the following to
.env.local
inside the Supabase folder:GITHUB_CLIENT_ID=<your-client-id> GITHUB_SECRET=<your-client-secret>
-
Start the development server:
pnpm run dev
-
Open your browser and navigate to
http://localhost:3000
to see the application running.
-
Create a new branch for your feature or bug fix:
git checkout -b feature/your-feature-name
-
Make your changes in the relevant files.
-
Test your changes thoroughly.
-
Commit your changes with a descriptive commit message:
git commit -m "Add feature: your feature description"
-
Push your changes to your forked repository:
git push origin feature/your-feature-name
-
Create a pull request in the original ContribHub repository on GitHub.
-
Provide a clear title and description for your pull request, explaining the changes you've made.
-
Wait for the maintainers to review your pull request. They may ask for changes or clarifications.
- Follow the existing code style in the project.
- Use TypeScript for all new files.
- Use meaningful variable and function names.
- Write clear comments for complex logic.
- Ensure your code is properly formatted (use
npm run lint
to check for linting issues).
- Be respectful and inclusive in all interactions.
- If you find a bug or have a feature request, please open an issue before starting work on it.
- For major changes, open an issue first to discuss your proposal with the maintainers.
Thank you for contributing to ContribHub! Your efforts help make open-source contribution more accessible to everyone.