Skip to content

matteopolak/a-slice-of-pi

Repository files navigation

a slice of pi

build status license

a slice of pi is a web app created for the OutStem Coding Challenge that allows users to view charts about various statistics aggregated from the fictional pizza place of the same name.

Tools

Bonus

  • API documentation
  • Chart and page animations
  • Nice header and cohesive design
  • Infinite scrolling of reviews with pagination

Major Parts

Website sequence diagram

sequenceDiagram
  participant C as Client
  participant S as Server
  participant D as Database

  C->>+S: get page content
  S-->>-C: page content with no data
  C->>+S: fetch chart data
  S->>+D: aggregate chart data
  D-->>-S: chart data
  S-->>-C: chart data

Development

Prerequisites

Setup

# install dependencies
pnpm install

# start the development server
pnpm dev

# load in data (one-time)
pnpm load-data

Environment Variables

See the .env.example file for a list of environment variables that need to be set.

Deployment

# build for production
pnpm build

# start the server
pm2 start ecosystem.config.cjs