CodeBaseHub

Installation

Step-by-step guide to install and set up CodeBaseHub

Prerequisites


Installation Steps

1. Clone the Repository

Terminal
git clone https://github.com/CodeBaseHubTeam/codebasehub-starter-kit.git
cd codebasehub-starter-kit

2. Install Dependencies

Terminal
pnpm install

3. Set Up Environment Variables

Follow the Supabase setup guide to get your database credentials, then add them to apps/server/.env:

apps/server/.env
DATABASE_URL=
DIRECT_URL=

4. Set Up the Database

Run these commands in order:

First, push your database schema to Supabase:

Terminal
pnpm db:push

Then, generate TypeScript types from your database:

Terminal
pnpm db:generate

Configure GitHub Repository

Remove Previous Remote

Terminal
git remote remove origin

Add Your Repository

Terminal
git remote add origin https://github.com/yourrepo.git

Add Upstream Remote (for Updates)

Note: Only users with "all-in" package purchase can receive updates.

Terminal
git remote add upstream https://github.com/CodeBaseHubTeam/codebasehub-starter-kit.git

Verify Remotes

Terminal
git remote -v

Expected output:

origin    https://github.com/yourrepo.git (fetch)
origin    https://github.com/yourrepo.git (push)
upstream  https://github.com/CodeBaseHubTeam/codebasehub-starter-kit.git (fetch)
upstream  https://github.com/CodeBaseHubTeam/codebasehub-starter-kit.git (push)

Push to Your Repository

Terminal
git push -u origin main

Get Updates

Terminal
git pull upstream main --rebase

Run the Development Server

Terminal
pnpm dev

Open http://localhost:3001 in your browser.


Available Scripts

CommandDescription
pnpm devStart development server
pnpm buildBuild for production
pnpm startStart production server
pnpm lintRun linter
pnpm formatFormat code
pnpm type-checkCheck TypeScript types
pnpm db:pushPush schema to database
pnpm db:generateGenerate database types

Next Steps

Was this page helpful?
Installation | CodeBaseHub