Skip to content

Commit b51c54d

Browse files
authored
chore: add .env.example and update README with env setup instructions (#116)
1 parent acc6726 commit b51c54d

File tree

3 files changed

+33
-35
lines changed

3 files changed

+33
-35
lines changed

.env.example

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Base URL for local development
2+
BASE_URL="http://localhost:3000"
3+
4+
###### DATABASE ######
5+
# Set up a free PostgreSQL database on Neon: https://console.neon.tech/
6+
# The project uses the Neon serverless driver adapter.
7+
# Copy your connection string here.
8+
DATABASE_URL="postgresql://neondb_owner:[YOUR_NEON_PASSWORD]@[YOUR_NEON_HOST]/neondb?sslmode=require"
9+
10+
###### AUTH ######
11+
# Generate your own Secret Key for encryption. If ommited, the default will be used:
12+
# https://www.better-auth.com/docs/installation#set-environment-variables
13+
BETTER_AUTH_SECRET="YOUR_BETTER_AUTH_SECRET"
14+
15+
# Create GitHub OAuth App: https://www.better-auth.com/docs/authentication/github
16+
GITHUB_CLIENT_ID="YOUR_GITHUB_CLIENT_ID"
17+
GITHUB_CLIENT_SECRET="YOUR_GITHUB_CLIENT_SECRET"
18+
19+
# Create Google OAuth Credentials: https://www.better-auth.com/docs/authentication/google
20+
GOOGLE_CLIENT_ID="YOUR_GOOGLE_CLIENT_ID"
21+
GOOGLE_CLIENT_SECRET="YOUR_GOOGLE_CLIENT_SECRET"
22+
23+
###### AI ######
24+
# Get a Google API Key: https://aistudio.google.com/apikey
25+
GOOGLE_API_KEY="YOUR_GOOGLE_API_KEY"
26+
# Get a Groq API Key: https://console.groq.com/keys
27+
GROQ_API_KEY="YOUR_GROQ_API_KEY"

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ yarn-error.log*
3535
.pnpm-debug.log*
3636

3737
# env files (can opt-in for committing if needed)
38-
.env*
38+
.env
39+
.env*.local
3940

4041
# vercel
4142
.vercel

CONTRIBUTING.md

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -76,42 +76,12 @@ Even if you don't plan to write code, there are many ways to contribute:
7676

7777
### Set up the development environment (follow closely)
7878

79-
1. **Configure Environment Variables:**
80-
81-
- Create a new file named `.env.local` in the root of the project directory.
82-
- Copy the following content into `.env.local` and fill in your credentials.
79+
1. **Configure Environment Variables:**
8380

8481
```bash
85-
# Base URL for local development
86-
BASE_URL="http://localhost:3000"
87-
88-
###### DATABASE ######
89-
# Set up a free PostgreSQL database on Neon: https://console.neon.tech/
90-
# The project uses the Neon serverless driver adapter.
91-
# Copy your connection string here.
92-
DATABASE_URL="postgresql://neondb_owner:[YOUR_NEON_PASSWORD]@[YOUR_NEON_HOST]/neondb?sslmode=require"
93-
94-
###### AUTH ######
95-
# Generate your own Secret Key for encryption. If ommited, the default will be used:
96-
# https://www.better-auth.com/docs/installation#set-environment-variables
97-
BETTER_AUTH_SECRET="YOUR_BETTER_AUTH_SECRET"
98-
99-
# Create GitHub OAuth App: https://www.better-auth.com/docs/authentication/github
100-
GITHUB_CLIENT_ID="YOUR_GITHUB_CLIENT_ID"
101-
GITHUB_CLIENT_SECRET="YOUR_GITHUB_CLIENT_SECRET"
102-
103-
# Create Google OAuth Credentials: https://www.better-auth.com/docs/authentication/google
104-
GOOGLE_CLIENT_ID="YOUR_GOOGLE_CLIENT_ID"
105-
GOOGLE_CLIENT_SECRET="YOUR_GOOGLE_CLIENT_SECRET"
106-
107-
###### AI ######
108-
# Get a Google API Key: https://aistudio.google.com/apikey
109-
GOOGLE_API_KEY="YOUR_GOOGLE_API_KEY"
110-
# Get a Groq API Key: https://console.groq.com/keys
111-
GROQ_API_KEY="YOUR_GROQ_API_KEY"
82+
cp .env.example .env.local # Copy the example environment file
11283
```
113-
114-
- Make sure to replace the placeholder values with your actual credentials obtained from the services
84+
- Open the `.env.local` file and replace the placeholder values with your actual credentials obtained from the services.
11585

11686
2. **Apply Database Schema:** Push the database schema defined in `db/schema.ts` to your Neon database using Drizzle Kit:
11787

@@ -215,4 +185,4 @@ Once you've made your changes and tested them locally, follow these steps to sub
215185
- Maintainers may provide feedback or request changes directly on the pull request. Please address these comments by pushing further commits to your branch.
216186
- Once approved, a maintainer will merge your changes into the main project.
217187

218-
Thank you for contributing!
188+
Thank you for contributing!

0 commit comments

Comments
 (0)