Installation
System Requirements
Section titled “System Requirements”| Dependency | Version | Check command |
|---|---|---|
| Node.js | ≥ 22.12.0 | node -v |
| Package manager | pnpm >= 10 recommended; npm or yarn also work | pnpm -v, npm -v, or yarn -v |
| PostgreSQL | 14+ | psql --version |
If you want to use pnpm and do not have it installed:
npm install -g pnpm@latestClone the Repository
Section titled “Clone the Repository”After purchase, you’ll receive a GitHub invite to the private repository. Accept the invite, then clone:
git clone git@github.com:nuxtbase-hq/core-b2b.git my-saascd my-saasInstall Dependencies
Section titled “Install Dependencies”pnpm installnpm installyarn installThis installs all dependencies and runs nuxt prepare automatically via the postinstall script.
Create the Database
Section titled “Create the Database”NuxtBase needs one PostgreSQL database before you can run migrations.
The example DATABASE_URL in the template .env.example uses the starter’s
default naming. In your real project, replace that with your own database name.
postgresql://postgres:postgres@localhost:5432/my_saasThat URL means:
- username:
postgres - password:
postgres - host:
localhost - port:
5432 - database name:
my_saas
Option 1: Create It With createdb
Section titled “Option 1: Create It With createdb”If PostgreSQL is installed locally, you usually get command-line tools such as
psql and createdb with it.
This command:
createdb my_saascreates a database named my_saas on your local PostgreSQL server.
If your local PostgreSQL user is not your current shell user, specify it explicitly:
createdb -U postgres -h localhost my_saasOption 2: Create It With psql
Section titled “Option 2: Create It With psql”psql is the PostgreSQL interactive shell.
Connect first:
psql -U postgres -h localhost -p 5432Then run:
CREATE DATABASE "my_saas";Useful psql commands:
\l -- list databases\q -- quitOption 3: Start PostgreSQL With Docker
Section titled “Option 3: Start PostgreSQL With Docker”If you do not want to install PostgreSQL directly on your machine, you can run it in Docker:
docker run --name my-saas-postgres \ -e POSTGRES_USER=postgres \ -e POSTGRES_PASSWORD=postgres \ -e POSTGRES_DB=my_saas \ -p 5432:5432 \ -d postgres:16With that container, this DATABASE_URL works as-is:
postgresql://postgres:postgres@localhost:5432/my_saasCheck That It Works
Section titled “Check That It Works”After creating the database, you can test the connection with:
psql postgresql://postgres:postgres@localhost:5432/my_saasIf that opens psql without an error, the database is ready.
Next Step
Section titled “Next Step”Your code is installed and your database is ready. Continue to Quick Start to configure environment variables and run the app for the first time.