Giter Site home page Giter Site logo

Filmstund

A web application for making it easier planning to go to the cinema with your friends

CI Deploy beta

React frontend

cd web
yarn
yarn build
yarn test

Requirements

  • yarn
  • Node 16

Go backend

The backend is written in Go and is currently also serving up the frontend using a file server.

Linting and sanity checks

These checks need to pass in order to be able to merge a pull request:

make checks

Build

You can use the provided Makefile to build the project.

make build

Running

export OIDC_CLIENT_ID=jyXDFia9V5Hjy43pweTHo3A1onBRJEHk
export OIDC_CLIENT_SECRET=<ask-a-dev>
export OIDC_AUDIENCE=https://filmstund-dev
export OIDC_ISSUER=https://dev-filmstund.eu.auth0.com/
export LOGGER_VERBOSITY=10
make run

Requirements

The following sections details how to setup the requirements to run the backend server.

  • go >1.17
  • postgres
  • redis

Database

To run the app you will need to have access to a Postgres instance.

Docker

An easy solution is to run Postgres using docker:

docker run --name postgres -e POSTGRES_PASSWORD=filmstund -e POSTGRES_USER=filmstund -e POSTGRES_DB=filmstund -d -p 5432:5432 postgres:14

Podman

Alternatively, you can use podman instead of docker:

sudo podman run -d --rm -p 5432:5432 --name postgres -e POSTGRES_PASSWORD=filmstund -e POSTGRES_USER=filmstund -e POSTGRES_DB=filmstund postgres:14

Migrations

Our database migrations are written in migrate-go format. To run the migrations, do the following:

go run ./cmd/migrate --path configs/database/migrations

Note that the username, password etc are configured using environment, and the same rules as the normal backend applies.

Add new migration

To add a new migration, do the following:

# Skip the first step if you already have migrate installed and in your $PATH
go install -tags 'postgres' github.com/golang-migrate/migrate/v4/cmd/migrate@latest
migrate create -ext sql -seq -dir configs/database/migrations <migration_name_goes_here>

Redis

Redis is used as a cache for ephemeral data that expire after some duration.

You can configure Redis using environment variables:

export REDIS_HOST=127.0.0.1
export REDIS_PORT=6379

note that the above values are the defaults

If your redis instance is setup to use a "master" password, you can configure that using the REDIS_PASSWORD env var.

Installation (macOS)

On macOS, you can use Brew:

brew install redis
brew services start redis
# Optionally configure:
vim /usr/local/etc/redis.conf

Or docker/podman:

docker run -d --name redis -p 6379:6379 redis
podman run -d --rm --name redis -p 6379:6379 redis

filmstund's Projects

filmstund icon filmstund

A web-app for making it easy going to the cinema with your friends

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.