Installation
Clone the repository
The CodebaseUp Free is publicly accessible on GitHub.
git clone https://github.com/jhavej/codebaseup-core YOUR-PROJECT-NAME
Create your own repository
Create your own repository (e.g. on GitHub) and link it with the cloned one:
cd YOUR-PROJECT-NAME
git remote set-url origin git@github.com:YOUR-USERNAME/YOUR-REPOSITORY.git
Install dependencies
The codebase uses pnpm v8.8.0 and Node.js v18.17.0
Install pnpm
:
curl -fsSL https://get.pnpm.io/install.sh | sh -
For Node.js installation, I recommend using nvm as it allows you to use and switch between multiple versions seamlessly. Follow the installation steps in the nvm official documentation.
# install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
# verify installation
command -v nvm
# install the desired Node.js version
nvm install 18.17.0
# activate Node.js version from the root of your codebase
nvm use
Then install codebase project dependencies:
pnpm install
Add local environment variables
Create a .env.local
file based on the provided .env.local.example
- this
enables respective modules, e.g. Google OAuth, a connection to a PostgreSQL
database, Sendgrid emailing, AWS S3 file uploads, etc. -- the modules start
working out of the box once connected via the environment variables. Head over
to module documentation for further details.
The only required environment variable is NEXTAUTH_SECRET and you can generate one at https://generate-secret.vercel.app
Spin up the development server:
You can launch the whole monorepo (all apps
and packages
) by running
pnpm run dev
Or you can run only a specific app or package (e.g. to save some computer resources):
pnpm run dev --filter=web
Access the app
Go to http://localhost:3000 to see the app up and running.