Skip to content

Commit 7f253dc

Browse files
add xata ts file in gitignore and update contributing guide
1 parent e41f40a commit 7f253dc

File tree

2 files changed

+31
-2
lines changed

2 files changed

+31
-2
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,5 @@ yarn-error.log*
3838

3939
.xata
4040
.xatarc
41+
42+
src/xata.ts

CONTRIBUTING.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,23 @@ Thank you for your interest in contributing to the Hacktoberfest Projects Finder
66

77
1. Fork the repository on GitHub.
88
2. Clone your forked repository:
9+
910
```sh
1011
git clone https://github.com/your-username/hacktoberfest-projects.git
1112
```
13+
1214
3. Navigate to the project directory:
15+
1316
```sh
1417
cd hacktoberfest-projects
1518
```
19+
1620
4. Install dependencies (we recommend using `pnpm`):
21+
1722
```sh
1823
pnpm install
1924
```
25+
2026
5. Copy the `.env.example` file to `.env.local` and fill in the required environment variables.
2127

2228
## Creating a GitHub OAuth Application
@@ -27,9 +33,11 @@ To use GitHub authentication in the project, you need to create a GitHub OAuth a
2733
2. Navigate to "Developer settings" > "OAuth Apps".
2834
3. Click on "New OAuth App".
2935
4. Fill in the application details:
36+
3037
- Application name: "Hacktoberfest Projects Finder" (or your preferred name)
3138
- Homepage URL: `http://localhost:3000` (for local development)
3239
- Authorization callback URL: `http://localhost:3000/api/auth/callback/github`
40+
3341
5. Click "Register application".
3442
6. On the next page, you'll see your Client ID. Click "Generate a new client secret" to create your Client Secret.
3543
7. Copy the Client ID and Client Secret to your `.env.local` file.
@@ -41,25 +49,39 @@ Xata is used as the database for this project. Follow these steps to set it up:
4149
1. Sign up for a Xata account at https://lite.xata.io/
4250
2. Create a new workspace and database from Xata dashboard
4351
3. Install the Xata CLI globally:
52+
4453
```sh
4554
npm install -g "@xata.io/cli@latest"
4655
```
56+
4757
4. Authenticate with Xata:
58+
4859
```sh
4960
xata auth login
5061
```
62+
5163
5. Initialize the database:
64+
5265
```sh
5366
xata init
5467
```
68+
5569
5. Upload the database schema:
70+
5671
```sh
5772
xata schema upload db-schema.json
5873
```
5974

75+
6. Generate the Xata client:
76+
77+
```sh
78+
xata codegen
79+
```
80+
6081
## Environment Variables
6182

6283
Create a `.env.local` file in the root of the project and add the following variables:
84+
6385
```sh
6486
AUTH_SECRET="" # A random string
6587
AUTH_URL="" # Should be http://localhost:3000 for local development
@@ -72,13 +94,14 @@ NEXT_PUBLIC_CLOUDINARY_CLOUD_NAME="" # Optional
7294
NEXT_PUBLIC_ANALYTICS_WEBSITE_ID="" # Optional
7395
```
7496

75-
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.
97+
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.
7698

77-
Remember to remove env variables that are optional and you are empty, they will cause validation errors
99+
Remember to remove env variables that are optional and you are empty, they will cause validation errors
78100

79101
## Running the Project
80102

81103
After setting up the environment variables, you can start the development server:
104+
82105
```sh
83106
pnpm dev
84107
```
@@ -88,14 +111,18 @@ The application should now be running at `http://localhost:3000`.
88111
## Making Contributions
89112

90113
1. Create a new branch for your feature or bug fix:
114+
91115
```sh
92116
git checkout -b feature/your-feature-name
93117
```
118+
94119
2. Make your changes and commit them with a descriptive commit message.
95120
3. Push your changes to your fork:
121+
96122
```sh
97123
git push origin feature/your-feature-name
98124
```
125+
99126
4. Create a pull request from your fork to the main repository.
100127

101128
Please ensure your code follows the project's coding standards and includes appropriate tests if applicable.

0 commit comments

Comments
 (0)