Shopify Production Engineer Intern Challenge - Summer 2022

shopify-pe
----------

A tiny inventory management web-application.


DESCRIPTION

	The API backend for this application is written in `go'. It handles
	routes to perform CRUD operations on the inventory database (which
	is on `postgres') and also stores and manages dynamic thumbnail
	generated for the uploaded images. The frontend of the application
	is written in HTML and some JavaScript.


DIRECTORY STRUCTURE

	- client/*html
		HTML files to interact with the API backend.

	- db/*.sql
		Schema files for the database.

	- proxy/*
		Configuration files (`nginx') for the frontend proxy.

	- server/*.go
		API backend implementation. This is deployed as a `docker'
		image with the `Dockerfile' in the repository root.

	- docker-compose.yml
		Configuration file for `docker-compose' to pull, and build all
		the necessary `docker' images to start the application.

	- .env
		For environment variables.


HOW-TO

	To run the application, clone this repository and run:
		
		$ docker compose up --build

	... at the repository root. Note that this requires "docker" to be
	installed on the machine. The above command will show the logs for
	application start-up as well as any API requests received by the
	backend.

	To use the application, visit http://localhost:8000 in the browser.
	Hit ^ (CRTL) + C to stop the application.



API DOCUMENTATION

	The API backend run on port 8080 by default and implements the
	following routes:

		- POST /api/add
			Adds an item to the inventory.

			POST payload (application/json):

				{
					"item_name": "A name for the item.",
					"item_desc": "A brief description of the item.",
					"item_count": "Number of items; must be an integer.",
					"item_price": "Price per unit; must be a number.",
					"item_brand": "Manufacturer of the item."
					"image_base64": "Base64 encoded string of the image file."
				}

			On success, the API will respond with a 201. Example:
				{
					"data":{
						"item_id": "WZ1CBcfC"
					},
					"error": null
				}

		- GET /api/get/:item_id
			Fetch the details of the given item with ID "item_id".

			On success, the details of the item are returned with a
			200. Example:

			{
				data: {
					item_id: "WZ1CBcfC",
					created_at: "2022-01-15T22:52:29.226202Z",
					updated_at: "2022-01-15T22:52:29.226202Z",
					item_count: 1,
					item_price: 42,
					item_brand: "Disney Inc.",
					item_name: "Darth Vader Suit",
					item_desc: "This is the real deal."
				},
					error: null
				}

		- GET /api/list
			List all the items in the invertory.

			On success, the list is returned with a 200. Example:

			{
				data: [
					{
						item_id: "neWkGQLh",
						created_at: "2022-01-15T22:56:29.960512Z",
						updated_at: "2022-01-15T22:56:29.960512Z",
						item_count: 10,
						item_price: 34,
						item_brand: "Nintendo",
						item_name: "Pixel Art",
						item_desc: "All the pixels."
					},
					{
						item_id: "FLic6vfP",
						created_at: "2022-01-15T22:56:23.752321Z",
						updated_at: "2022-01-15T22:56:23.752321Z",
						item_count: 1,
						item_price: 42,
						item_brand: "Disney Inc.",
						item_name: "Darth Vader Suit",
						item_desc: "This is the real deal."
					},				
					/* ... */
				]

		- PUT /api/update/:item_id?update_field=field_to_update
			Updates a specific field for an item. The field to be updated
			should be specified in the "update_field" query string parameter,
			and the payload should be as follows:

				{
					"field_to_be_updated": "New Data."
				}

			On success, the API responds with a 201. Example:
				{
					"data": {
						"item_id":"FLic6vfP"
					},
					"error": null
				}

		- DELETE /api/delete/:item_id
			Delete an item with ID "item_id" from the inventory.

			On success, the API responds with a 200. Example:
				{
					"data": "OK",
					"error": null
				}

		- GET /img/:item_id[?h=H&w=W]
			Returns the image for an item bearing the ID "item_id". If
			the "h" and "w" query strings are specified, the API generates
			a thumbnail with resolution h x w pixels. The aspect ratio from
			the original image is maintained.

			On success, it responds with a 200 with the image file.
Similar Resources

API desarrollada en Go (Golang) para modificar precios en una tienda eCommerce (Shopify)

API desarrollada en Go (Golang) para modificar precios en una tienda eCommerce (Shopify)

Go eCommerce API API para modificar precios de productos en una tienda eCommerce de Shopify. Instrucciones Ingresar a la tienda eCommerce. Seleccionar

Oct 1, 2021

The Ultimate Engineer Toolbox YouTube 🔨 🔧

 The Ultimate Engineer Toolbox YouTube 🔨 🔧

The Ultimate Engineer Toolbox YouTube 🔨 🔧

Jan 8, 2023

A non-go engineer tries to write Go to solve Advent of Code

Wherein an engineer (who primarily uses Kotlin, Java, Scala and C#) tries to teach themselves Go by solving Advent of Code challenges. It's... not pre

Dec 9, 2021

âš” Personal Golang starter kit with an engineer research perspective, expressjs developer friendly, and aims for rapid app development.

âš” Personal Golang starter kit with an engineer research perspective, expressjs developer friendly, and aims for rapid app development.

Goku (WIP; Author Only) âš” Personal Golang starter kit with an engineer research perspective, expressjs developer friendly, and aims for rapid app deve

Jan 6, 2022

customer.io full stack engineer take home project

customer.io full stack engineer take home project

customer.io full stack engineer take home project

Jan 21, 2022

Abfahrt! Der InformatiCup 2022

Abfahrt! Der InformatiCup 2022

informatiCup 2022 Die Gesellschaft für Informatik veranstaltet den informatiCup - im Jahr 2022 bereits im 17. Jahr in Folge. Für den informatiCup 2022

Dec 4, 2022

Lottery program for Go Conference 2022 Spring Online

2022-Spring-Sponsors How to use Dump company names Dump company names into below files. cmd/gentest/_companies/platinum_gold.txt cmd/gentest/_companie

Jan 11, 2022

DevOps Roadmap 2022

Want to learn DevOps the right way in 2022 ? You have come to the right place I have created the complete DevOps roadmap that anyone can follow and be

Dec 28, 2022

Course system - The project of Group 28 for ByteCamp 2022 Winter

Course System This is the project of Group 28 for ByteCamp 2022 Winter. Quick St

Jul 20, 2022

Vulnerability scanner for Spring4Shell (CVE-2022-22965)

go-scan-spring Vulnerability scanner to find Spring4Shell (CVE-2022-22965) vulnerabilities For more information: https://www.fracturelabs.com/posts/ef

Nov 9, 2022

Reverse Shell in Golang and PowerShell Fud (27/04/2022)

ShellPwnsh Spanish: Generador de Backdoor en Golang, usando Reverse Shell en PowerShell, con formato de variables en el codigo para Bypass de AMSI y c

Nov 9, 2022

ICPP 2022 (pap351) Under Review

SciCoFK: A Decentralized Scientific Computing Framework Embraced with Consensus and Incentive Mechanism This repo is the primary code of SciCoFK. In t

May 27, 2022

Higher Order Functions using Golang Generics (Hack Days 2022)

hoff: Higher Order Functions (and Friends) Golang 1.18+ implementations of common methods/data structures using Go Generics Requirements Go 1.18 or ne

Jan 4, 2023

Simple webhook to block exploitation of CVE-2022-0811

webhook-cve-2022-0811 This is a really simple webhook that just blocks pod creation if malicious sysctl values are configured. Build go test CGO_ENABL

Nov 9, 2022

Production-Grade Container Scheduling and Management

Production-Grade Container Scheduling and Management

Kubernetes (K8s) Kubernetes, also known as K8s, is an open source system for managing containerized applications across multiple hosts. It provides ba

Dec 28, 2022

A Crypto-Secure, Production-Grade Reliable-UDP Library for golang with FEC

 A Crypto-Secure, Production-Grade Reliable-UDP Library for golang with FEC

Introduction kcp-go is a Production-Grade Reliable-UDP library for golang. This library intents to provide a smooth, resilient, ordered, error-checked

Dec 28, 2022

Production-Grade Container Scheduling and Management

Production-Grade Container Scheduling and Management

Kubernetes (K8s) Kubernetes, also known as K8s, is an open source system for managing containerized applications across multiple hosts. It provides ba

Jan 2, 2023

GRONG is a DNS (Domain Name System) authoritative name server.It is more a research project than a production-ready program.

GRONG (Gross and ROugh Nameserver written in Go) is a DNS (Domain Name System) authoritative name server. It is intended as a research project and is

Oct 17, 2020

A minimalist Go PDF writer in 1982 lines. Draws text, images and shapes. Helps understand the PDF format. Used in production for reports.

A minimalist Go PDF writer in 1982 lines. Draws text, images and shapes. Helps understand the PDF format. Used in production for reports.

one-file-pdf - A minimalist PDF generator in 2K lines and 1 file The main idea behind this project was: "How small can I make a PDF generator for it

Dec 11, 2022
Related tags
Spotify Backend Developer Intern Challenge 2022 (Go, Gin, SQLite3)

Shopify Backend Developer Intern Challenge - Summer 2022 This is an API for managing inventory items. The API is written in Go and uses Gin and sqlite

Jan 19, 2022
This is an assignment for Intern-Software Engineer, Backend Go from LINE MAN Wongnai. It is create with Go and GIN framework

COVID-19-API-Assignment Create by Chayaphon Bunyakan, Email: [email protected] Run the API by typing the following command go run main.go Run t

Jan 9, 2022
Total-go-shopify-graphql - A simple client using the Shopify GraphQL Admin API

A simple client using the Shopify GraphQL Admin API.

Jan 25, 2022
Owldetect - Take home challenge for Haraj Solutions Engineer candidates

OwlDetect Welcome to Haraj take home challenge! In this challenge you will be as

Feb 17, 2022
Servian-tech-challenge - Submission to Servian Tech Challenge
Servian-tech-challenge - Submission to Servian Tech Challenge

Submission to Servian Tech Challenge LinkedIn Application live version TABLE OF

Jan 7, 2022
Cross commerce challenge - Cross Commerce Store Challenge With Golang
Cross commerce challenge - Cross Commerce Store Challenge With Golang

Cross Commerce Store Desafio Simples Aplicação ETL Todo o código fonte está cont

Feb 13, 2022
Spothero-challenge - Spot Hero Backend Challenge

##Spot Hero Backend Challenge As per the requirements mentioned in the challenge

Feb 17, 2022
Golang Clean Architecture based on Uncle Bob's Clean Architecture and Summer internship in 2021

clean-architecture-api Description This is an example of implemention of Clean Architecture in Golang projects. This project has 4 layer : Infrastruct

Feb 20, 2022
Simple Shopify API for the Go Programming Language

go-shopify Simple API made with go to make CRUD request to your Shopify Store. Installation go get github.com/rapito/go-shopify How-to-use Get Reques

Dec 7, 2022
Gopify is a simple package for developing Shopify applications in Go.

Gopify Gopify is a simple package for developing Shopify applications in Go. Table of Contents Usage Oauth Start oauth process Oauth callback API call

Dec 30, 2022