Powered by Notion and Open-source Technology.
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
Start by cloning the repository and installing dependencies:
git clone https://github.com/Stanford-TAPS/TAPS_space_request
cd TAPS_space_request
yarn installCreate 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.localDATABASE_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=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 deployOur 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.
To run the app, run:
yarn devIf you wish to run in SSL (required for Stanford SSO to work) mode, run:
yarn devsslYou 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 -installOnce you have the certificate, you can just run yarn devssl and it will work.
We use Vercel to deploy our app. Here is a button to deploy your own instance:
Any Next.js compatible hosting provider should work, but we have not tested any others.
We use Sentry to track errors. To use Sentry, you must set the SENTRY_DSN environment variable.

