- A Postgres database (on Mac, you can use Postgres.app)
- Pnpm (install with
npm install -g pnpm) (this is optional, you can use npm or yarn if you prefer, but my preference is pnpm) - Dbeaver (this is optional, but it's a good GUI for managing databases but you can use whatever you want to view the database data)
Two options for setting up environment variables:
-
You can simply pull the
.envfile from the dotenv.org configuartion. Simply run the following command in the root of the project:pnpm run env:pull
And follow the on-screen instructions. _
-
If you don't have access to the dotenv.org configuration (likely because you forked the repo), you can create your own
.envfile. There is a.env.examplefile in the root of the project. You should copy this file to.envand fill in the values.
First, you need to create a database. You can just run this command in the terminal:
createdb -h localhost -p 5432 -U postgres healinghandwhile will create a local Postgres database called healinghand.
Then, you need to push the Prisma schema to the database:
pnpm run db:pushThis will create the tables in the database.
If you ever change the Prisma schema, you will need to run the following command to update the database and store the changes in the migrations folder:
pnpm run db:migrateThen, you need to run the migrations:
## Running the Development Server
First, you need to install the dependencies:
```bash
pnpm installThen, you can run the development server:
pnpm run devyou can attempt to run with Turbopack (faster hot reloading), but it may break at any time:
pnpm run dev --turboOpen http://localhost:3000 with your browser to see the result.
Automatically handled through Vercel, just push to the main branch.
Again, if you forked this repository, you will need to set up your own Vercel account and link it to your repository, or setup your own deployment pipeline.