dianetc / kleesia

https://kleesia.com
0 stars 0 forks source link

Tech Stack

Features

Get Started

Prerequisites

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/kleesia.git
    cd kleesia
  2. Install dependencies:

    bun install
  3. Set up environment variables: Create a .env file in the root of the project and add your Postgres SQL connection string and other necessary environment variables:

    DATABASE_URL="postgresql://[HOST]:[PASSWORD]@[HOST]:[PORT]/[DATABASE]?schema=public"

    Note: You will need to generate a private key (PRIVATE_KEY) to add to your .env file.

  4. Setup Prisma Client:

    bun prisma generate
  5. Sync Database Migrations:

    bun prisma migrate dev
  6. Start the Development Server:

    bun dev

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

  7. Access the Data Management Platform offered by Prisma:

    bun prisma studio

    The plaform will be available on http://localhost:5555

Tips and Tricks

  1. Use a browser you dont normally use: At a certain point you may have to clear your cache. It'll be better not to have to do this using your day-to-day browser because then you'll be logged out of everything.

  2. To reset the database:

    bun prisma migrate reset
  3. To add a dependency:

    bun add <library>
  4. To check the status of your migration

    bun prisma migrate status

    Note: On occasion if things are becoming messy, you may have to rm -rf src/prisma/migrations/ then run a reset.

Documentations

Best Practices

  1. NEVER run bun prisma migrate dev in this branch. ONLY bun prisma migrate deploy