Website for the students at Industrial Economics and Technology Management at NTNU Trondheim. Built with Django, Next.js, and a GraphQL API. Maintained by Rubberdøk NTNU.
- 🏔 Book the luxurious cabins Oksen and Bjørnen
- 💸 Register for upcoming events and purchase tickets through Vipps
- 🎉 Find and apply for the ideal student organization at Indøk
- 🔒 Simple login through Feide
- 📝 Easily navigate through the archive of Indøk documents
Found a bug, got a suggestion, or something we should know about? Take a look at the roadmap and file an issue if it's not on the roadmap!
- Download, install and start Docker Desktop: https://www.docker.com/products/docker-desktop
- In the terminal, move to where you want to store the project (easiest is just where you are when you open the terminal)
- Type
git clone https://github.com/rubberdok/indok-web.git- This creates a new folder named
indok-web, which contains the project
- This creates a new folder named
- Type
cd indok-webto move into the new folder - Type
docker compose buildto build the project - Type
docker compose upto run the frontend, backend and database - Open a new terminal, and navigate back to
indok-web - Type
docker compose exec backend python manage.py migrateto update the database - Type
docker compose exec backend python manage.py loaddata initial_datato load example data into the database - Set up the backend locally, to get linting, auto-complete and environment variables
- Follow steps 1-9 under Without Docker: Backend below
- Set up the frontend locally, to get pre-commit hooks, linting, auto-complete and environment variables
- Follow steps 1-8 under Without Docker: Frontend below
The frontend runs on http://localhost:3000, and the backend on http://localhost:8000. The GraphQL API endpoint is http://localhost:8000/graphql, and the Django panel is at http://localhost:8000/admin.
Some users, particularly those using Windows, may have issues running the app through Docker. Some functionality such as hot reloading (which drastically improves developer experience) only work when you have the whole project in WSL (Windows Subsystem for Linux, which is what Docker on Windows uses). Therefore, you may prefer to run the project without Docker — in that case, follow the below steps to set up the frontend, backend and database locally.
Before following the steps below, make sure to clone the project with Git:
- In the terminal, move to where you want to store the project (easiest is just where you are when you open the terminal)
- Type
git clone https://github.com/rubberdok/indok-web.git- This creates a new folder named
indok-web, which contains the project
- This creates a new folder named
- Type
cd indok-webto move into the new folder - If using VSCode, you can type
code .to open the current folder in VSCode
The project uses PostgreSQL as its database. Even when running the frontend and backend outside of Docker, we still recommend running Postgres through Docker, since you don't need hot reloading there and it makes the setup simpler.
To set up PostgreSQL in Docker, follow these steps:
- Download, install and start Docker Desktop: https://www.docker.com/products/docker-desktop
- Open the
indok-webfolder in VSCode - Make a new file called
.envinsidebackend - Paste the following line in that file, and save:
DB_HOST=localhost - Navigate to
indok-webin the terminal (cd indok-web) - Type
docker compose up postgres
Now Postgres should be up and running! Leave the terminal window open to keep the database running in the background.
If you want to close the database, press Ctrl + C in the terminal running Postgres, or type docker compose down inside the indok-web folder in another terminal. To start Postgres again, type docker compose up postgres, also in the indok-web folder (and make sure Docker Desktop is running!). If you want to clear the database, go to the Volumes tab in Docker Desktop, and delete indok-web_postgres_data
If you still want to run Postgres without Docker, download and install it from here instead: https://www.postgresql.org/download/. Then follow steps 2-4 as above.
- Download and install
pyenv(Python version manager): https://github.com/pyenv/pyenv#installation- If on Windows, install
pyenv-wininstead: https://github.com/pyenv-win/pyenv-win#installation - Type
pyenv --versionin a new terminal to check that it was installed correctly
- If on Windows, install
- Type
pyenv install --list | grep " 3.9"to get the list of available Python 3.9 versions- If on Windows, type
pyenv install --list | findstr " 3.9"instead
- If on Windows, type
- Type
pyenv install 3.9.X, whereXis the latest version found from the previous step - Type
pyenv global 3.9.X, whereXis the same as the previous step- If you do not want to use Python 3.9 globally, type
pyenv local 3.9.Xinstead (make sure you are in theindok-webfolder when you do this) - Type
python --versionto verify that it has been set to3.9.X
- If you do not want to use Python 3.9 globally, type
- Type
cd indok-web/backendto move into the backend folder (or justcd backendif you were already inindok-web) - Type
python -m venv venv- This sets up a Python virtual environment, to isolate this project from others
- Type
source venv/bin/activateto activate the virtual environment- If on Windows, type
.\venv\scripts\activateinstead
- If on Windows, type
- Type
python -m pip install -r requirements/local.txtto install dependencies- If on Windows, also install the GTK3 runtime from the
.exehere: https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases (one of the Python libraries we use depends on this)
- If on Windows, also install the GTK3 runtime from the
- Ask the project maintainers for dev environment variables (not strictly required, but step 14 will not work without this)
- If you're a member of Rubberdøk:
- Go to the
#devchannel in Slack - Find the pinned post with dev environment variables
- Copy the variables for
backend/.envinto your own.envfile inindok-web/backend(make sure not to overwrite theDB_HOSTvariable from the database setup)
- Go to the
- If you're a member of Rubberdøk:
- Set the environment variable
DJANGO_READ_DOT_ENV_FILEtotrue- On Mac/Linux:
- Type
code ~/.zshrcto open thezshconfig - Paste this line somewhere in that file:
export DJANGO_READ_DOT_ENV_FILE=true - Save the file, and re-open the terminal
- Type
- On Windows:
- Use the Windows search bar to search for "environment variables" (Norwegian: "miljøvariabler")
- Click the "Edit the system environment variables" result
- Click "Environment variables..." (may not be necessary, if you were brought directly to the environment variable overview)
- Click "New" under "User variables"
- Set variable name as
DJANGO_READ_DOT_ENV_FILEand variable value astrue - Click OK through all the windows
- On Mac/Linux:
- Type
python manage.py runserverto run the backend server- If it fails, make sure that you:
- are in the
indok-web/backendfolder - have your virtual environment active
- have the database running
- are in the
- If it fails, make sure that you:
- Open a new terminal (leave the previous terminal open to keep the server running!)
- Type
cd indok-web/backendto get back to the backend folder - Type
source venv/bin/activate(Mac) or.\venv\scripts\activate(Windows) to re-activate the virtual environment in this new terminal
- Type
- Type
python manage.py migrateto update the database with our backend models - Type
python manage.py loaddata initial_datato load example data into the database- This also creates an admin user with username
adminand passwordadmin123
- This also creates an admin user with username
Now the backend should be running at localhost:8000! You can check out the GraphQL API at localhost:8000/graphql, or use the Django admin panel at localhost:8000/admin (log in with the admin user from step 14).
If you want to close the backend, press Ctrl + C in the terminal where it runs. To start it again:
- Move into the backend folder (
cd indok-web/backend) - Activate your virtual environment
- On Mac:
source venv/bin/activate - On Windows:
.\venv\scripts\activate
- On Mac:
- Type
python manage.py runserver - If you need to run migrations:
- Open a new terminal, and repeat steps 1 and 2
- If you've made changes to Django models and want to generate new migrations:
python manage.py makemigrations - Run migrations with
python manage.py migrate
- Download and install
nvm(Node Version Manager): https://github.com/nvm-sh/nvm#installing-and-updating- If on Windows, install
nvm-windowsinstead: https://github.com/coreybutler/nvm-windows/releases- Scroll down on that page to find
nvm-setup.exe, and download it - Open the terminal as administrator (
PowerShell/Command Prompt/Windows Terminal) - Use
cdto navigate to where you downloaded the.exefile (e.g.cd downloads) - Type
.\nvm-setup.exe, and go through the installer
- Scroll down on that page to find
- Type
nvm versionin a new terminal to check that it was installed correctly
- If on Windows, install
- Type
nvm install 16in the terminal to install Node.js version 16 - Type
nvm use 16.X.Y, where16.X.Yis the version shown in the terminal after running the previous command- If on Windows, you may have to run the terminal as administrator
- Open the
indok-webfolder in VSCode, and create a file called.env.local - Ask the project maintainers for dev environment variables
- If you're a member of Rubberdøk:
- Go to the
#devchannel in Slack - Find the pinned post with dev environment variables
- Copy the variables for
frontend/.env.localinto your own.env.localfile inindok-web/backend
- Go to the
- If you're a member of Rubberdøk:
- Type
cd indok-web/frontendto move into the frontend folder (or justcd frontendif you were already in indok-web) - Type
npm install -g yarn- This installs Yarn, which we use to manage dependencies in the frontend
- Type
yarnto fetch dependencies - Type
yarn devto run the frontend
Now the frontend should be running at localhost:3000! You can check it out in the web browser.
If you want to close the frontend, press Ctrl + C in the terminal where it runs. To start it again, type yarn dev inside indok-web/frontend (if dependencies have changed, you may have to run yarn first).
The python manage.py loaddata initial_data command used in the setup above sets up one admin user and two test users:
| Username | Password | Indøk |
|---|---|---|
| eva_student | 5tgb | true |
| asbjorn_elevg | 1qaz | false |
| admin | admin123 | super |
To log in as one of these test users when testing out the frontend locally, click "Other login alternatives" on the Feide login screen, then "Feide Test Users".
The project has error logging through Sentry, and can be accessed by authenticating with Github SSO.
This project is completely open source and is intended to serve as a platform for students who are interested in web development to have a project where they can find inspiration and contribute, and as such, we gladly welcome outside contributors to the project. If you're interested in how to get started, no matter what level of experience you have, please see CONTRIBUTING.
The app is deployed through AWS ECS.
- E2E testing through Cypress, publicly accessible.
- Code coverage through Codecov, accessible with Github SSO.
- Domains managed through domene.shop.
- Postmark as e-mail service, contact an administrator for access.
- Vipps, contact an administrator for access.
- Feide, contact an administrator for access.
- AWS for various services, contact an administrator for access.
- Google Workspace for account management, contact an administrator for access.
- Slack for communication, available with a rubberdok.no domain.
Logo created by Skraagen

