Skip to content

Latest commit

 

History

History
114 lines (76 loc) · 4.16 KB

README.example.md

File metadata and controls

114 lines (76 loc) · 4.16 KB

logo

Photo Enhancement API

Photo Enhancement API is a project manages photo and replace a new photo background.

Image will come from client (HomeNet & Dealer Solution):

Manager divided photos to supervisors then supervisors divided to Photo Editor to edit those images. Then, Supervisor will check every enhanced images. The edited images will go to Client QA Website for double check if edited image passes quality check by client QA; otherwise, the edited images will go back to photo editor. If images does not pass quality check by client QA, images will be back to supervisor. If pass, image will be sent to client.

Developing

Prerequisites

  • Node a JavaScript runtime built on Chrome's V8 JavaScript engine.
  • Yarn fast, reliable, and secure dependency management.
  • Visual Studio Code a code editor redefined and optimized for building and debugging modern web and cloud applications
  • Postman the only complete API development environment, for API developers
  • Robo 3T a shell-centric cross-platform MongoDB management tool
  • FileZilla the free FTP solution for both client and server
  • CloudBerry Explorer for Amazon S3 provides a user interface to Amazon S3 accounts

Setting up Dev

Clone the project and install application dependencies.

git clone https://github.com/your/your-project.git
cd your-project/
yarn

Building

Run application in development mode.

# Nodemon
yarn dev
# Hot Reload Module
yarn webpack      # 1st terminal
yarn webpack:node # 2nd terminal

Deploying / Publishing

Running application on production mode divided into local server and cloud server. For any env variables changes, check process.json and process-prod.json.

  • Cloud server used for client to check and rejected any photos that enhanced incorrectly.
  • Local server primarily used for the internal process of enhancing photos. Most of the cron jobs will be in Local server.
yarn start        # Local Server
yarn start:prod   # Cloud Server

Versioning

Not available yet.

Configuration

To set your application environment variables create a .env file. There is an .env.example file to follow.

# Application (development, production)
NODE_ENV=
PORT=
JWT_SECRET=

# Mongo Database Credential
MONGO_URI=

# FTP
FTP_HOST=""
FTP_USER=""
FTP_PASSWORD=""
FTP_DESTINATION=""
FTP_URL=""

Tests

Not available yet.

Style Guide

Our coding style and format are based on 3 components:

Important: When you save your file you MUST organize and format your code.

API Reference

We are using built in NestJS Swagger. The API Documents will be at http://localhost:3000/docs when you start your server. The API Documents is not available when the application is lived.

Database

Using MongoDB 3.6. Instruction on installing is here. To see database schema, please check the Diagram point below.

Diagrams

To see sytem database schema or any diagram, please use PlantUML. If you are using VSCode, please install the extension PlantUML