Setup Local Development
This guide will walk you through setting up a local development environment for the Ascendia Cabinet HIMARPL website.
Prerequisites
Before installing the application, ensure you have:
- Node.js and npm installed
- Git installed
- Access to the following services:
- CockroachDB account
- PostHog account (optional)
Environment Setup Details
The project requires several environment variables to be set up in a .env
file for proper functionality.
CockroachDB Setup
Follow the CockroachDB Quickstart Guide to get your DATABASE_URL
.
Setup Steps
-
Fork and clone the repository:
-
Navigate to project directory:
-
Create environment variables file: Create a
.env
file in the root directory with the following variables: -
Set up remote upstream:
-
Install dependencies and start development server:
The application should now be running at
http://localhost:3000
. -
Create a new branch for your changes:
-
After you are satisfied with your changes, add and commit them to your branch, then push your branch to your fork.
-
Create Pull Request.
Available Scripts
npm run dev
- Starts development server with hot reloadnpm run build
- Creates production buildnpm run start
- Starts production servernpm run db:push
- Pushes database schema to CockroachDBnpm run db:studio
- Opens Prisma Studio for database managementnpm run lint
- Runs linting checks