Skip to main content

Local Installation

Follow these steps to run ERD Builder Pro on your local machine.

1. Clone Repository​

git clone https://github.com/hadziqmtqn/erd-builder-pro.git
cd erd-builder-pro

2. Install Dependencies​

You need to install dependencies for both frontend and backend.

npm install

3. Configure Environment​

Copy the .env.example file to .env and fill it with your credentials.

cp .env.example .env

For details on filling environment variables, see Environment Variables.

[!TIP] By default, the backend server runs on port 3000. If you need to use a different port (especially in production), you can set it via the PORT variable in the .env file.

3a. Database Setup​

Set up the database according to your chosen mode. ERD Builder Pro supports three database modes — see Database Setup for a full comparison.

Option A: Supabase PostgreSQL​

  1. Open Supabase dashboard → SQL Editor.
  2. Run the contents of supabase_schema.sql from the project root.
  3. Configure DATABASE_URL, SUPABASE_URL, and SUPABASE_SERVICE_ROLE_KEY in .env.

Option B: Local PostgreSQL​

# Create database
createdb erd_builder_pro

# Generate the Local PostgreSQL client, push schema & seed non-auth data
npm run db:generate:pg:local
npm run db:push:pg:local
npm run db:seed:pg:local

Also set ERD_ENCRYPTION_KEY in .env to a random value of at least 32 characters. Local PostgreSQL seeding does not create default credentials; create the first super admin through the Create administrator account page when the application starts.

4. Run the Application​

Run the following command to start the development server — choose according to your database mode:

Supabase:

npm run dev

Local PostgreSQL:

npm run dev:pg:local

The application will be available at http://localhost:3000.