Skip to content

digital-blueprint/lunchlottery-app

Repository files navigation

Lunch Lottery App

GitHub Repository | npmjs package | Unpkg CDN

Build and Test

This is an application for users to apply to the lunch-lottery.

Prerequisites

Form creation

You may use this SQL command to create the form:

INSERT INTO formalize_forms (
  identifier, name, date_created, data_feed_schema, 
  availability_starts, availability_ends
) 
VALUES 
  (
    "7432af11-6f1c-45ee-8aa3-e90b3395e29c", 
    "LunchLotteryParticipants", CURRENT_TIMESTAMP, 
    "{\"type\": \"object\",\"properties\": {\"identifier\": {\"type\": \"string\"},\"givenName\": {\"type\": \"string\"},\"familyName\": {\"type\": \"string\"},\"email\": {\"type\": \"string\"},\"organizationIds\": {\"type\": \"array\",\"items\": {\"type\": \"string\"}},\"organizationNames\": {\"type\": \"array\",\"items\": {\"type\": \"string\"}},\"preferredLanguage\": {\"type\": \"string\",\"enum\": [\"de\", \"en\", \"both\"]},\"possibleDates\": {\"type\": \"array\",\"items\": {\"type\": \"string\"}},\"privacyConsent\": {\"type\": \"boolean\"}},\"required\": [\"identifier\", \"givenName\", \"familyName\", \"email\", \"organizationIds\", \"organizationNames\", \"preferredLanguage\", \"possibleDates\", \"privacyConsent\"]}", 
    "2024-01-01 00:00:00", "2024-02-01 00:00:00"
  )

Overview

# get the source
git clone https://github.com/digital-blueprint/lunchlottery-app.git
cd lunchlottery-app
git submodule update --init

# install dependencies
npm install

# constantly build dist/bundle.js and run a local web-server on port 8001 
npm run watch

# same as watch, but with babel, terser, etc active -> very slow
npm run watch-full

# constantly build dist/bundle.js and run a local web-server on port 8001 using a custom assets directory assets_local/
npm run watch-local

# run tests
npm test

# build for deployment
npm build

Jump to https://localhost:8001, and you should get a Single Sign On login page.