Skip to content

Repository files navigation

Image of Postmastr logo


(No, Postmastr does not have a typo 😉)

The purpose of this application is to track the arrival of packages in the mail and hopes to help streamline the process using Optical Character Recognition technology via TesseractJS. The mobile application for this repository can be found here.

Overview

A staff member captures a shipping label; the backend uses OCR (Tesseract.js) to read the recipient and package details, records the package, and emails the recipient that it has arrived. This repository is the backend / API; the companion mobile app lives here.

Features

  • OCR label reading (Tesseract.js) with image pre-processing (sharp / imagemin)
  • Package intake, categorization, and lookup
  • Email notifications to recipients (nodemailer)
  • JWT + session authentication
  • REST API plus a Handlebars web interface
  • Dockerized deployment

Tech stack

Node.js · Express · MongoDB (Mongoose) · Handlebars · Tesseract.js · Nodemailer · Docker

Context

Built as a senior capstone project, split across backend, web, and mobile components.

Prepare the environment

  • Create a new gmail account (or use an existing one)

  • Copy the provided .sample.env file and insert the appropriate values in a new file called .env

How to configure the project using NodeJS

In your Terminal or Command Prompt, run the following at the root of the project directory to run the server, which install all of the dependencies for the application:

$ npm i

How to run the project using NodeJS

In your Terminal or Command Prompt, run the following at the root of the project directory to run the server, which will expose the application:

$ npm start

How to build the project using Docker

In your Terminal or Command Prompt, run the following at the root of the project directory to run the server, in order to build the application:

$ docker build . -t postmastr

How to run the project using Docker

In your Terminal or Command Prompt, run the following at the root of the project directory to run the server, which will run the application:

$ docker run --restart=on-failure -d -p 3000:3000 -e APP_PASS=var -e DATABASE_CONNECT=var ... -t postmastr

How to run the project using Docker and an environment file

In your Terminal or Command Prompt, run the following at the root of the project directory to run the server, which will run the application:

$ docker run --restart=on-failure --env-file path/to/file -d -p 3000:3000 -t postmastr

Licensed under the MIT license.

About

OCR-powered mailroom package tracker — reads shipping labels with Tesseract.js and emails recipients. Node.js/Express backend.

Topics

Resources

Stars

3 stars

Watchers

2 watching

Forks

Releases

Contributors

Languages