- Overview
- Tech Stack
- Features
- Getting Started
- Postman Documentation
- Table Structure
- Related Projects
- Contributors
- License
- Report
Jokopi REST API is a backend server implementation designed for a coffee shop using the Express framework. It provides a robust and scalable solution for managing various aspects of a coffee shop's operations, such as menu items, orders, customer information, and more.
The REST API follows the principles of Representational State Transfer (REST), which enables easy integration with various clients, including web and mobile applications. It utilizes the HTTP protocol for communication, allowing clients to perform operations such as retrieving, creating, updating, and deleting resources.
- Authorization & Authentication
- Upload Images
- CRUD (Products, User, Transactions, Promo)
- Whitelisting JWT
- Remote Notification to Android & iOS App
- Error Handling & Validation
- Node.js
- Express.js
- PostgreSQL (for storing data)
- MongoDB (for storing token whitelist)
- Cloudinary (for storing images)
- JSON Web Token (authorization)
- Vercel (for deploying)
- Nodemailer (email sender)
- Firebase Admin (for sending remote notification)
- and other packages (you can see in package.json)
-
Clone this repository to your local
git clone https://github.com/nyannss/jokopi.git
-
Install dependencies
cd jokopi && npm install
-
Setup environments (you can see in
.env.example
)-
Database server using postgreSQL
DB_HOST = (put your db host) DB_PORT = (put your port of db host) DB_USER = (put your db username) DB_PASS = (put your db password) DB_NAME = (put your db name)
-
JSON Web Token Secret Key (prefer using random string) [see more information]
JWT_SECRET_KEY = (put your secret key)
-
Database server using MongoDB [you can create account in here]
MONGODB_HOST = (put your mongodb host) MONGODB_USER = (put your mongodb user) MONGODB_PASS = (put your mongodb password) MONGODB_NAME = (put your mongodb database name)
-
Image server using Cloudinary [you can create account in here]
CLOUDINARY_NAME = (put your cloudinary name) CLOUDINARY_KEY = (put your cloudinary key) CLOUDINARY_SECRET = (put your cloudinary secret)
-
SMTP Authentication for sending email (use gmail for free) [more info]
SMTP_HOST = (put your smtp host) SMTP_EMAIL = (put your smtp email/username) SMTP_PASS = (put your smtp password)
-
Firebase Admin (generate service-account json and encode base64) [see more]
GOOGLE_APPLICATION_CREDENTIALS = (your encoded service-account.json content)
-
-
Last, run the app
npm run app
You can see the documentation from Postman or import it with json file.
If you using json file, just open your postman and click import.
For PostgreSQL, You can download table structure (ddl) from this link.
For MongoDB, You just setup and define it to env the database, it will be automatically created by mongoose.
- jokopi-react - React App
- jokopi-react-native - Android & iOS Application
This project using ISC License
Any error report you can pull request or contact: nyannss@proton.me