timetabling for uni students and society members, made easy.
cd backend && pnpm i
- set the following values in
backend/.env
:
SESSION_SECRET=
NODE_ENV=development
ALLOWED_ORIGINS=commaseparated,urls,or,regexes
DATABASE_URL="postgresql://.../postgres?pgbouncer=true"
DIRECT_URL="postgresql://.../postgres"
REDIS_PORT=6379
EMAIL_KEY="mailgun_api_key"
OTP_EXPIRES=600
NODE_ENV
may be either 'development' or 'production'.
cd ../frontend && pnpm i
- set the following values in
frontend/.env
:
TODO
- optionally, create a .env file at the root of the repository (ie. not in
trainee-fool-24t3/frontend
ortrainee-fool-24t3/backend
, buttrainee-fool-24t3
). - assuming you did step 5, include your corresponding cloudflare deploy hook endpoint inside this file.
echo "https://api.cloudflare.com/client/v4/pages/webhooks/deploy_hooks/ENDPOINT_GOES_HERE" > .env
you can now use the rebuild
script in the root of the repository to initiate manual deployments without having to push changes to main
.
cd backend
docker run -d --name redis-stack-server -p <REDIS_PORT>:6379 redis/redis-stack-server:latest
pnpm run start
cd frontend
pnpm run dev
to run tests locally, follow the steps below.
- create a new file called .env.test in the backend folder. Set the following values:
DATABASE_URL="postgres://postgres:postgres@localhost:5432"
DIRECT_URL="postgres://postgres:postgres@localhost:5432"
NODE_ENV=test
REDIS_PORT=6380
SESSION_SECRET=notsecret
-
ensure you have docker and docker-compose installed and make sure you have the docker engine running.
-
make sure that the tests you've written are in the tests directory. You can then run these tests by running:
pnpm run test:int
⚠️ note that docker-compose or docker may require root privileges to run. any errors pertaining to either of things that appear when running the above scripts can probably be resolved by usingsu
.
if you're not interested in self-hosting, you can invite the pyramids discord bot here.
cd discord && pnpm i
- create an application in the discord developer portal.
- set the following values in
discord/.env
to match those noted in the discord developer portal for your new app. note thatSERVER_ID
is optional and only needs to be set if you're runningpnpm run cmds test
, which ensures changes to the bot's commands only affect a single server. the value you enter forREDIS_PORT
should be the same as the one you entered inbackend/.env
.
APPLICATION_ID=
BOT_TOKEN=
SERVER_ID=
REDIS_PORT=
BACKEND_URL=
pnpm run cmds public
to establish the commands, thenpnpm run bot
to start the bot.
-
aaron fang
-
isaac kim
-
jared schulz
-
lachlan shoesmith
-
ricky pham
-
vincent tannos
-
pyramid icon by liam gabe