Skip to content

Oucru-Innovations/DOCR-Handwriting-Backend

 
 

Repository files navigation

DOCR-Handwriting-Backend

API Services Layer for Annotation Application for HANDWRITING RECOGNITION APPLICATION FOR TETANUS TREATMENT

Acknowledgements

This project module has been developed and belongs to:

Authors

Built With

This project has been built with:

Node JS

JavaScript

GitHub

Amazon

PostgreSQL

Prerequisites

To run this app you need basic setups:

  • GitHub Repository
  • Amazon RDS (Amazon Relational Database Services)
  • Amazon CodePipeline
  • Amazon EBS (Amazon Elastic Beanstalk)
  • Amazon S3 (Amazon Simple Storage Service)

Environment Variables

To run this project, you will need to add the following environment variables to your ./config/config.json file:

username: postgres

password: [PASSWORD]

database: postgres

host: [AMAZON RDS ENDPOINT]

port: 5432

dialect: postgres

Maybe need to change some constant variables in ./routes/api/ files

const S3_BUCKET = [S3 BUCKET NAME];

Localhost

To run this project as localhost, set up environment variables and AWS Credentials Key (if needed):

  npm start

Access the following endpoint to use the API:

  localhost:8080

API Reference

Get all uploads

  GET /api/uploads
Parameter Type Description
page string Page number for Pagination
size string Page size for Pagination
title string Page title
limit string Pagination limit
offset string Pagination offset

Get all unannotated uploads

  GET /api/uploads/unannotated
Parameter Type Description
page string Page number for Pagination
size string Page size for Pagination
title string Page title
limit string Pagination limit
offset string Pagination offset

Get image upload

  GET /api/uploads/${id}
Parameter Type Description
id string Required. Id of image to fetch

Get all image upload by original image id

  GET /api/uploads/originals/${id}
Parameter Type Description
id string Required. Id of original image to fetch

Post uploads

  POST /api/uploads
Parameter Type Description
image image Required. Image to upload to S3 bucket

Get all coordinates

  GET /api/coordinate

Get coordinates by image id

  GET /api/coordinate/${id}
Parameter Type Description
id string Required. Id of image to fetch

Post coordinates data

  POST /api/coordinate/
Parameter Type Description
json file json Required. json file contains:
image_name, original_image_name, max_x, max_y, min_x, min_y

Post uploads

  POST /api/uploads
Parameter Type Description
image image Required. Image to upload to S3 bucket

Get all originals

  GET /api/originals

Get originals by image id

  GET /api/originals/${id}
Parameter Type Description
id string Required. Id of image to fetch

Post originals image

  POST /api/originals/
Parameter Type Description
image image Required. Image to upload to S3 bucket

About

Upload Annotation API for OUCRU Annotation App

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.4%
  • Shell 0.6%