KONSol is an information screen in Konsulatet. The project contains the page that is shown on the screen, an admin page to upload slides, and a backend written in Actix.
- Ability to upload slides (images, title, text, date) that will be shown on the screen.
- SL departure data.
- Fysiksektionen calendar integration.
- Environment Variables:
(Defined in
backend/.env
)DATABASE_URL
: Path to the SQLite database file.IMAGE_PATH
: Directory where slide images are stored. Defaults to/tmp/konsol_slides
. Warning: Currently all files in this directory are served under/api/screen/slides/images
.
See endpoints.
- Make sure Rust is installed and
cargo
works. Otherwise, install Rust. - Install Diesel CLI, for example by running
cargo install diesel_cli
orcargo-binstall diesel_cli
. - Navigate to
backend/
and rundiesel migration run
. - To fill the database with 4 mock slides, navigate to
backend/scripts
and (while in that directory) runpython3 mock_data.py
. - Run the backend with
cargo run
orcargo r
from thebackend/
directory. (The port will be displayed in the terminal)
- Make sure
node
andnpm
are both installed. - Navigate to either
screen-frontend/
oradmin-frontend
and runnpm install
. - Run the frontend with
npm run dev
. (The port will be displayed in the terminal)