/bingobaby

A guessing game for a baby's time of birth.

Primary LanguageTypeScriptMIT LicenseMIT

The icon of the website, showing stylized film perforations surrounding stylized diaphragm blades
Wann kommt das Baby? Und was wird es? Melde dich an und rate mit! 👶🏻🗳️📅

GitHub Actions: Deploy workflow License


A screenshot of the index page, showing the header section consisting of an image still of the baby from the Dinosaurs series and a login form, as well as the headline reading Bingo, Baby and a subtext


What is it?

This repository contains the source code of a website containing a game for guessing a baby's time of birth created using the Remix framework.

Getting started

Prerequisites

The following prerequisites are needed to successfully launch this project locally:

Runtimes

Remote services

  • A hosted PostgreSQL database for storing guesses and user data, if not using Docker.
    • The schema.sql file contains the database migrations for setting up a PostgreSQL database.

Populating the users table

In order to provide a login functionality, any eligible participant has to be manually entered into the database upfront.

Adding a single user

A single user may be added using the following SQL statement:

INSERT INTO users (name) VALUES ('John Doe');
Adding multiple users in batch mode

Multiple users may be added at once using a .csv file in the following format:

name
Jane Doe
John Doe

Afterwards, the following SQL statement may be used to import the users from the .csv file:

COPY users (name)
FROM 'the-csv-file.csv'
DELIMITER ',' CSV HEADER;

Quick start

  1. Copy .env.sample to .env and populate the environment variables

    cp .env.sample .env
  2. Install dependencies

    yarn # or npm install
  3. Run the build

    yarn build # or npm run build
  4. Run the local server

    yarn start # or npm start

--- OR ---

  1. Run development preview

    yarn dev # or npm run dev

Deployment

Prerequisites

  • A Netlify account

    • Remix supports other integrations as well. Check out the Remix website for getting to know how to switch to another hosting provider.
  • Access to GitHub Actions for benefitting from an automated deployment integration (optional)

    • If used, environment variables listed in .env.sample need to be set in the repository settings at GitHub accordingly.
  • A hosted PostgreSQL database for storing guesses and user data.

    • The schema.sql file contains the database migrations for setting up a PostgreSQL database.

License

Licensed under the MIT license.

Copyright ©️ 2024 Sascha Zarhuber