JajanJalan REST API

This is the back-end service for JajanJalan Application.

Short Explanation

This is the back-end service for JajanJalan. These services provide the functionality and logic required to support the front-end of the JajanJalan application. These back-end services are responsible for handling tasks such as data storage, processing, and retrieval, as well as providing APIs to interact with the front-end.

Tech Stack Used

  • ExpressJs: Framework ExpressJS
  • Prisma: Object Relational Mapping Prisma
  • MySQL: Relational Databases
  • Validation: Request data validation using Joi
  • Dotenv: Environment variables access dotenv
  • Jsonwebtoken: JSON Web Tokens jwt
  • CORS: Cross-Origin Resource-Sharing enabled using cors
  • Multer: File request handler multer
  • CI: Continuous Integration with Cloud Build
  • Docker: Containerization with Docker

CI/CD Environment

JajanJalan API CI/CD

For the CI/CD Environment, we use Cloud Build with push trigger. When a revision / update to the code is pushed, the diagram as shown above will run the process of revision. Below are the services we use from Google Cloud Platform to develop CI/CD pipeline :

  • Cloud Build : To create a trigger
  • Artifact Registry: For the docker images repository
  • Cloud Run: For the deployment of the docker images

API Endpoints

List of available routes:

Authentication routes:

POST /users/register - register
POST /users/login - login
POST /users/logout - logout
GET /users/:userId - detail user
PATCH /users/:userId - update user

Penjual routes:

POST /penjual/create - create penjual
GET /penjual - get all penjual
GET /penjual/penjualId - get by penjual id
PATCH /penjual/penjualId - update penjual
DELETE /penjual/penjualId - delete penjual

Menu routes:

POST /menu/create - create menu
GET /menu - get all menu
GET /menu/menuId - get by menu id
GET /menu/penjual/penjualId - get by penjual id
GET /menu/search?item=namaMakanan - search menu
PATCH /menu/menuId - update menu
DELETE /menu/menuId - delete menu

Review routes:

POST /review/create - create review
GET /review - get all review
GET /review/penjual/penjualId - get by penjual id
PATCH /review/:id - update review