Skip to content

Application for booking tables for formal events etc

License

Notifications You must be signed in to change notification settings

ecss-soton/table-booking

 
 

Repository files navigation

Table booking

A service to create, join and choose seats for tables for formal sit down meals with a seating plan.

Image showing the seat booking process

Run Locally

Clone the project

  git clone https://github.com/ecss-soton/table-booking.git

Go to the project directory

  cd table-booking

Install dependencies

  npm install

Have a PostgreSQL server running

Configure the environment variables. See [Environment Variables]

Sync the database with the local schema

  npm run prisma:dbpush

Start the server

  npm run start

Or start with auto refresh in development mode

  npm run dev

Environment Variables

To run this project, you will need to add the following environment variables to your .env file

A list of these can also be seen in .env.example

NODE_ENV="development"
DATABASE_URL="In the form `postgresql://USER:PASSWORD@HOST:PORT/DATABASE`"

NEXTAUTH_SECRET="Random bytes for auth crypto"
NEXTAUTH_URL="Absolute URL of the server"

# University of Southampton Azure AD Tenant ID - Change only if you want to auth with a different tenant ( ie univerisity account etc )
AZURE_AD_TENANT_ID="4a5378f9-29f4-4d3e-be89-669d03ada9d8"
AZURE_AD_CLIENT_SECRET="Your Azure AD OAuth application secret"
AZURE_AD_CLIENT_ID="Your Azure AD OAuth application client id"

SOTON_VERIFY_API_AUTH="API key for soton verify"

Docker image

TODO Add docker image link with dockerfile

Running Tests

To run tests, run the following command

  npm run test

Documentation

Authorization

All requests must supply a Authorization HTTP header in the format: Authorization: TOKEN

Example Authorization header

Authorization: b583ef41-9c75-41a4-b4ec-19feb0befbd6

Rate limiting

Currently, there are no rate limits in place

API Reference

About

Application for booking tables for formal events etc

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 96.7%
  • CSS 2.7%
  • JavaScript 0.6%