React | NextJs | Semantic UI | NodeJs | Prisma | Docker | PostgreSQL
First, clone this repository and install all dependencies:
$ git clone https://github.com/RafaelMariscal/Prisma_and_PostgreSQL_Model
$ cd Prisma_and_PostgreSQL_Model
$ yarn
A .env
file needs to be updated with the following environment variables schema:
DATABASE_URL="postgresql://USER:PASSWORD@HOST:PORT/DATABASE"
Like you can see, the DATABASE_URL needs to be filled with user, password, host uri, port and database name. A .env model is setted into this project, if you want to run this project just like it is, run the following terminal commands:
$ docker compose up -d
$ npx prisma generate
$ npx prisma migrate dev --preview-feature
After all set, run the development server:
$ npm run dev
# or
$ yarn dev
Open http://localhost:3000 with your browser to see main page.
Use the inputs to create a register to the table. To delete data, use the delete button.
The main reason for this project is to initiate the studies with Prisma, Docker and PostgreSQL. So this is a model for a simple "CRUD" using this tecs. The Frontend was built using Semantic UI React only for productivity matter.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Prisma Documentation - learn about Prima + Next.js framework.
- Docker Documentation - learn about Docker compose projects.
- Prisma + PostgreSQL - learn about Prima + PostgreSQL projects.
- PostgreSQL Documentation - learn about PostgreSQL.
- Semantic UI Documentation - learn about Semantic UI.