Skip to content

Luca-Panza/projeto_booksman

Repository files navigation

Books Man

📋 Description

This project is a back-end book management API built using the Express framework in Node.js, with TypeScript, and Prisma for database operations. The API enables users to track the books they've read and, upon completing a book, allows them to provide ratings and reviews. In the context of this project, the application is intended for use by a single user, providing them with the means to organize their readings and document their opinions on the books they've read.


💻 Technologies and Concepts

  • REST APIs
  • JavaScript
  • Node.js
  • Express.js
  • Prisma
  • Typescript
  • Postgres SQL

🚀 Endpoints

POST /books
    - Endpoint to create a book
    - headers: {}
    - body:{
      "title": "Lorem ipsum",
      "author": "Lorem ipsum",
      "publisher": "Lorem ipsum",
      "purchaseDate": "DD-MM-YYYY"
    }
POST /books/reviews
    - Endpoint for submitting a book review
    - headers: {}
    - body: {
      "bookId": number,
      "grade": number,
      "review": "Lorem Ipsum is simply dummy text of the printing and typesetting industry."
    }
GET /books 
    - Endpoint to list all the books
    - headers: {}
GET /books/:id 
    - Endpoint to get a by id
    - params: {
      "id": number
      }
    - headers: {}
    - body: {}

🏁 Running the application

Make sure you have the latest stable version of Node.js, npm and postgresql running locally.

First, clone this repository on your machine:


git clone https://github.com/Luca-Panza/projeto_booksman

Then, navigate to the project folder and install the dependencies with the following command:


npm install

In the terminal, run the Prisma commands to create the PostgreSQL database on your machine.


npx prisma generate && npx prisma migrate dev

Once the process is finished, just start the server.


npm start

Or to test on a production server.


npm run dev

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published