Skip to content

glg-public/glg-assignment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GLG - Software Support Engineer Interview Project

Order Processing System

Overview

This project is a rudimentary order processing system that accepts orders via a REST API (with Express, documented using Swagger) and processes them through a series of queues (using ElasticMQ behind an SQS Client). Data in this project is stored in DynamoDB. All components of this project are containerized using Docker and orchestrated using Docker Compose and run entirely on your local machine.

The system generates an order, processes it to create a PDF receipt, and sends the receipt via email to the customer. The system is designed with message queues to handle jobs asynchronously and decouple different parts of the processing flow.

Features

- Order Creation: Accept customer orders via a REST API.
- Queue-Based Processing:
- Intake Queue: Pushes order data into a queue for order generation and processing.
- Processor Queue: Processes the order, generates a PDF receipt, and emails the receipt to the customer.
- Email Notification: Sends a confirmation email with a PDF receipt to the customer after the order is processed.

Architecture

Order Submission:
    The customer submits an order through the REST API.
    The system pushes the order data into the Intake Queue.

Order Processing:
    A worker listens to the Intake Queue and processes the incoming order.
    The order is transformed into a detailed data structure and pushed into the Processor Queue.

Receipt Generation:
    A worker listens to the Processor Queue, retrieves the order data, and generates a PDF receipt. 
    The receipt is then sent to the customer via email as an attachment.

Prerequisites

  • Docker & Docker Compose

Project Structure

  • bin/setup.sh: Script to set up the project.

  • bin/run.sh: Script to start the Docker containers.

  • bin/rebuild.sh: Script to rebuild the Docker containers.

  • etc/dev.env: Environment variables for the development environment.

  • pipeline/src/index.ts: Main entry point for the pipeline application.

  • app/src/server.ts: Main entry point for the REST API application.

Setup

0. Prerequisites

Install Docker and Docker Compose on your machine, if you haven't already. If you are using a Windows machine, you may need to install WSL2 to run Docker Desktop or update your BIOS settings to enable virtualization.

If prompted to enable file sharing in Windows, please accept the prompt.

Windows: https://docs.docker.com/desktop/install/windows-install/

Mac: https://docs.docker.com/desktop/install/mac-install/

1. Fork/Clone the Repository

git clone [email protected]:your-github/glg-assignment.git
cd glg-assignment

2. Setup the Project

./bin/setup.sh

3. Start Docker Containers

./bin/run.sh

URLs

Tasks

Please complete the exercises found in TASKS.md.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages