Skip to content

Stanford-TAPS/TAPS_space_request

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TAPS Logo

T&PS Space Requests

A simple space request system designed to be used by theatrical organizations in Stanford University in order to book spaces owned by the Department of Theater and Performance Studies (TAPS)

Powered by Notion and Open-source Technology.


Next JS Prisma Dependabot Neon DB Postgres License Notion


Screenshot

✨ Features


Stanford SSO Login

See space calendars to check availability

Request spaces for a specific time period

See conflicts with other events

If you are an approver: Check all requests, approve/reject

🚀 Development


Installation

Start by cloning the repository and installing dependencies:

git clone https://github.com/Stanford-TAPS/TAPS_space_request
cd TAPS_space_request
yarn install

Environment Variables

Create a .env.local file in the root directory of this project. Add the required environment variables. Here is a table with the required environment variables:

Variable Name Description
DATABASE_URL The URL of the Postgres database, with a pooler
DIRECT_URL The URL of the Postgres database, without a pooler
AUTH_SECRET A random string used to encrypt NextAuth Info
AUTH_URL The URL of the NextJS app, if on Vercel https://$VERCEL_URL
VERCEL_URL The URL of the NextJS app
STANFORD_CLIENT_SECRET The Stanford OAuth Client Secret
STANFORD_CLIENT_ID The Stanford OAuth Client ID
NOTION_EVENTS_ID The ID of the Notion database for events
NOTION_FACILITIES_ID The ID of the Notion database for facilities
NOTION_GROUPS_ID The ID of the Notion database for groups
NOTION_KEY The Notion API key
NOTION_SPACE_REQUESTS_ID The ID of the Notion database for space requests
SENTRY_DSN The Sentry DSN for error tracking
touch .env.local
DATABASE_URL=
AUTH_SECRET=
AUTH_URL=
VERCEL_URL=
STANFORD_CLIENT_SECRET=
STANFORD_CLIENT_ID=
NOTION_EVENTS_ID=
NOTION_FACILITIES_ID=
NOTION_GROUPS_ID=
NOTION_KEY=
NOTION_SPACE_REQUESTS_ID=
SENTRY_DSN=

Database

We use Prisma to manage our database. Once you have configure DATABASE_URL and DIRECT_URL, you may push the schema by running:

prisma migrate deploy

Our database provider for account management is Neon, but any Prisma-compatible with Edge support will work.

The actual Notion database is managed by the Notion API, and is not managed by Prisma, it is used to query all spaces, events and organizations.

Running the App

To run the app, run:

yarn dev

If you wish to run in SSL (required for Stanford SSO to work) mode, run:

yarn devssl

You should have a local certificate in the root directory generated with mkcert, with files called localhost.pem and localhost-key.pem. If developing with Firefox, you must also install nss. All this can be done with:

brew install nss
brew install mkcert
mkcert -install

Once you have the certificate, you can just run yarn devssl and it will work.

Deploying

We use Vercel to deploy our app. Here is a button to deploy your own instance:

Deploy with Vercel

Any Next.js compatible hosting provider should work, but we have not tested any others.

Sentry

We use Sentry to track errors. To use Sentry, you must set the SENTRY_DSN environment variable.

About

Under Development Speace Management and Request system for Stanford TAPS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •