Follow the steps below to set up and run the project in your local environment.
Ensure you have the following installed:
-
Fork and Clone the Repository
- Fork this repository to your GitHub account.
- Clone the forked repository to your local machine:
git clone https://github.com/<your-username>/ishelf.git
- Navigate into the project directory:
cd ishelf
-
Install Dependencies
- Install the required npm packages:
npm install
- Install the required npm packages:
-
Set Up the Environment Variables
- Copy the
.env.example
file to create a.env
file:cp .env.example .env
- Update the
.env
file if needed to configure the project settings, such asDATABASE_URL
.
- Copy the
-
Set Up the Database
- Run the following Docker command to set up the PostgreSQL database:
docker run -d --name ishelf-db -e POSTGRES_USER=myuser -e POSTGRES_PASSWORD=mypassword -e POSTGRES_DB=ishelf-db -p 5432:5432 postgres
- Run the following Docker command to set up the PostgreSQL database:
-
Migrate and Generate Prisma
- Run the migration commands to configure the database schema using Prisma:
npx prisma migrate dev
- Generate Prisma client:
npx prisma generate
- Run the migration commands to configure the database schema using Prisma:
-
Run the Development Server
- Start the project in development mode:
npm run dev
- Start the project in development mode:
src/
: Contains the source code.prisma/
: Contains the Prisma schema for database management.
Feel free to contribute to this project by submitting pull requests. Make sure to fork and create a feature branch for your changes.
Happy coding! 🎉