Documentation
Self-development/Setup

Setup

Learn how to setup your shipstore application

Setup

This guide will walk you through setting up shipstore. We'll cover cloning the project, installing dependencies, configuring your database, and running the local development server.

Prerequisites

Before you begin, ensure you have the following installed on your machine:

Database Setup

Create a New Database

Shipstore uses Prisma as an ORM, supporting any Prisma-compatible database including PostgreSQL, MySQL, and MongoDB. View all supported databases.

Before creating your shipstore project, create a new database and prepare the connection string. For PostgreSQL, it follows this format:

DATABASE_URL="postgresql://username:password@host:port/database_name"

Configure the Database

Create a .env file in the root directory of your project and add the following:

DATABASE_URL="postgresql://username:password@host:port/database_name"

Configure the database Prisma You can skip this step if you are using PostgreSQL.

If you are using a different database than PostgreSQL, you will need to configure the database provider in the /packages/database/prisma/schema.prisma file.

packages/database/prisma/schema.prisma

datasource db {
  provider = "mysql" // or "mongodb"
}
You will also need to change the database provider in the /packages/auth/auth.ts file:
packages/auth/auth.ts

export const auth = betterAuth({
	database: prismaAdapter(db, {
		provider: "mysql", // or "mongodb"
	}),
});

In case you are using MySQL, you will also need to remove all occurrences of mode: "insensitive" from the project. This is a feature that Prisma does not support for MySQL, so it will cause errors on build. Simply search in the project for mode: "insensitive" and remove it.

On this page