iconDirEasy
Installation

Development

Get started with the code and develop your app.

Create a new database

By default, DirEasy uses Neon as its database provider and Drizzle as its ORM.

Make sure to have created a new database and have the connection string ready. For example when using PostgreSQL, the connection string will look something like this:

postgresql://<username>:<password>@<host>:<port>/<database>

Set up the environment variables

Terminal
cp .env.example .env

Set or modify environment variables with your own values in .env file.

You can read more about environment variables here.

Configure the database

You will need to scaffold the database using the schema defined in /drizzle/db/schema.ts:

Terminal
pnpm db:generate
pnpm db:migrate
pnpm db:push

For more details on the default Drizzle configuration (using Neon), refer to the Database Configuration Guide.

Seed the categories

You will need to seed the database with the default categories which is suited for a tech directory website:

Terminal
bun scripts/categories.ts

If you want to add more or change the categories, you can do so by editing the categories.ts file.

Start your development server

Now your app should be ready to go. To start the local development server.

Terminal
pnpm install
pnpm dev

Open the localhost URLs below to see the app. 🎉

Signup a new account

Open your app and signup a new account (it will be your admin).

Set Admin account

Run the admin seed to give the first signup account the admin role to access the admin functions:

Terminal
bun scripts/admin.ts

On this page