Quickstart
Get started using a GitHub fork.
Setting Up
Grab CareerChive Repository
Fork https://github.com/beck-chan/career-chive/ on GitHub, then clone your copy into your local environment:
git clone https://github.com/YOUR_USER/career-chive.git
cd career-chive
# Install dependencies
npm install
With the GitHub CLI installed and signed in (gh auth login):
# Fork to your account and clone in one step
gh repo fork beck-chan/career-chive --clone
cd career-chive
# Install dependencies
npm install
Set Up Environment Variables
-
Copy the
.env.examplefile to.env.local:cp .env.example .env.local
-
Fill in values from your Supabase project and Cloudflare R2 bucket:
# Supabase project URL NEXT_PUBLIC_SUPABASE_URL=https://<your-database-url>.supabase.co # Supabase publishable key (browser-safe, RLS still applies) NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=sb_publishable_<your-publishable-key> # Server Data API secret. (Never NEXT_PUBLIC_) SUPABASE_SECRET_KEY=sb_secret_<your-secret-key> # Cloudflare Account ID CLOUDFLARE_ACCOUNT_ID=<your-account-id> # Cloudflare R2 Bucket R2_BUCKET=<your-bucket-name> # Cloudflare R2 Access Key ID R2_ACCESS_KEY_ID=<your-access-key-id> # Cloudflare R2 Secret Access Key R2_SECRET_ACCESS_KEY=<your-secret-access-key> # Cloudflare R2 Endpoint R2_ENDPOINT=https://<CLOUDFLARE_ACCOUNT_ID>.r2.cloudflarestorage.com
Installing
1. Run Installation Schema
-
Copy the contents of
schema.sqlto your clipboard. -
Within Supabase, select SQL Editor from the left sidebar, then paste in the contents of
schema.sql. -
Click Run to execute the schema.
-
If you receive a Potential issue detected popup, click Run query to execute the schema.
2. Set Up Your Login
-
Generate a random 32-byte hex value and copy this generated value to your clipboard by calling the following command in your terminal:
openssl rand -hex 32 -
Enter these values into your
.env.localfile:FLAG_PRIVATE=true SESSION_SECRET=<your-generated-value> -
Generate your login credentials by running the following command in your terminal:
npx career-chive login -
Copy the contents of the generated
scripts/login.sqlfile to your clipboard. -
Within Supabase, select SQL Editor from the left sidebar, then paste in the contents of
login.sql. -
Click Run to execute the schema.
-
If you receive a Potential issue detected popup, click Run query to execute the schema.
To preview your application locally, run:
# Serves by default at `http://localhost:3000`
npm run dev
Serve Your CareerChive
To build the application locally for private use:
# Linter check for errors
npm run lint
# Compile
npm run build
# Serve build
npm run start
The easiest way to do this is just to connect your CareerChive GitHub repository to a Vercel project.
From your Vercel dashboard:
-
If you already have projects with Vercel, click Add New and select Project.
-
Click Import for your CareerChive repository, then set the Project Name.
Your project name will become the URL slug for your application if it's unique and available.
-
Click Environment Variables to enter the following variables:
# Supabase project URL NEXT_PUBLIC_SUPABASE_URL=https://<your-database-url>.supabase.co # Supabase publishable key (browser-safe, RLS still applies) NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=sb_publishable_<your-publishable-key> # Server Data API secret. (Never NEXT_PUBLIC_) SUPABASE_SECRET_KEY=sb_secret_<your-secret-key> # Gate CareerChive behind login FLAG_PRIVATE=true # Session secret for login authentication SESSION_SECRET=<your-generated-value> # Cloudflare Account ID CLOUDFLARE_ACCOUNT_ID=<your-account-id> # Cloudflare R2 Bucket R2_BUCKET=<your-bucket-name> # Cloudflare R2 Access Key ID R2_ACCESS_KEY_ID=<your-access-key-id> # Cloudflare R2 Secret Access Key R2_SECRET_ACCESS_KEY=<your-secret-access-key> # Cloudflare R2 Endpoint R2_ENDPOINT=https://<CLOUDFLARE_ACCOUNT_ID>.r2.cloudflarestorage.com
What's Next
Enable your ChiveBot and configure your settings and organizations: