Skip to content

kirkedev/mpr.kirke.dev

Repository files navigation

MPR Dashboard

About

This repository hosts the code for a dashboard of daily hog and pork prices based on historical Mandatory Price Reporting data hosted by the USDA's Agricultural Marketing Service.

Lean hog futures traders normally retrieve these reports as PDFs, like this afternoon cutout report. While these reports are great, it's not really possible to see price trends over time, and seasonality is a huge component of agriculture prices. I know traders who write them down in a legal pad, and others who are a little more technical that manually maintain an Excel spreadsheet. Fortunately for everyone the USDA hosts an API with historical data.

Aside from being useful to myself and like two other people as a personal project, this repository also serves as a portfolio project for what I believe to be best practices in web development. It's a containerized typescript monorepo with clean architecture, thorough testing, and CI/CD.

Project Setup

The only system dependencies are node.js with yarn and docker with docker-compose

git clone [email protected]:kirkedev/mpr.kirke.dev.git
yarn install
yarn workspace test playwright install
yarn prepare

Commands

Start the app in dev mode. The app will be hosted at http:https://localhost:3000 and a debugger is available on port 9229

yarn dev   

Start the app in production mode. The app will be hosted at http:https://localhost

yarn start

Shut down the app

yarn stop

Fix lint errors

yarn fix

Testing

Command Description
yarn workspace test unit Run unit and integration tests
yarn workspace test watch Run unit and integration tests in watch mode
yarn workspace test e2e Run end-to-end acceptance tests
yarn workspace test smoke Run smoke tests

CI/CD Workflows

Add git hooks with yarn prepare

GitHub Actions