Thank you for your interest in contributing to the Hacktoberfest Projects Finder! We welcome contributions from everyone. This document will guide you through the process of setting up the project locally and creating a GitHub OAuth application.
- Fork the repository on GitHub.
- Clone your forked repository:
git clone https://github.com/your-username/hacktoberfest-projects.git
- Navigate to the project directory:
cd hacktoberfest-projects
- Install dependencies (we recommend using
pnpm
):
pnpm install
- Copy the
.env.example
file to.env.local
and fill in the required environment variables.
To use GitHub authentication in the project, you need to create a GitHub OAuth application. Follow these steps:
- Go to your GitHub account settings.
- Navigate to "Developer settings" > "OAuth Apps".
- Click on "New OAuth App".
- Fill in the application details:
- Application name: "Hacktoberfest Projects Finder" (or your preferred name)
- Homepage URL:
http://localhost:3000
(for local development) - Authorization callback URL:
http://localhost:3000/api/auth/callback/github
- Click "Register application".
- On the next page, you'll see your Client ID. Click "Generate a new client secret" to create your Client Secret.
- Copy the Client ID and Client Secret to your
.env.local
file.
Xata is used as the database for this project. Follow these steps to set it up:
- Sign up for a Xata account at https://xata.io/
- Install the Xata CLI globally:
npm install -g "@xata.io/cli@latest"
- Authenticate with Xata:
xata auth login
- Run the migration:
xata push main
Create a .env.local
file in the root of the project and add the following variables:
AUTH_SECRET="" # A random string
AUTH_URL="" # Should be http://localhost:3000 for local development
AUTH_GITHUB_ID=""
AUTH_GITHUB_SECRET=""
XATA_API_KEY=""
XATA_BRANCH="" # Default should be "main"
NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME="" # Optional
NEXT_PUBLIC_ANALYTICS_WEBSITE_ID="" # Optional
Make sure to fill in the required values for each variable. The AUTH_SECRET
should be a random string, and AUTH_URL
should be set to http://localhost:3000
for local development. The XATA_BRANCH
should typically be set to "main" unless you're using a different branch.
Remember to remove env variables that are optional and you are empty, they will cause validation errors
After setting up the environment variables, you can start the development server:
pnpm dev
The application should now be running at http://localhost:3000
.
- Create a new branch for your feature or bug fix:
git checkout -b feature/your-feature-name
- Make your changes and commit them with a descriptive commit message.
- Push your changes to your fork:
git push origin feature/your-feature-name
- Create a pull request from your fork to the main repository.
Please ensure your code follows the project's coding standards and includes appropriate tests if applicable.
If you have any questions or run into issues, please open an issue in the GitHub repository. We're here to help!
Thank you for contributing to the Hacktoberfest Projects Finder!