School food web app
Find a file
2025-12-20 18:11:06 +01:00
skolmaten server migration 2025-12-20 18:11:06 +01:00
static server migration 2025-12-20 18:11:06 +01:00
templates server migration 2025-12-20 18:11:06 +01:00
.dockerignore forgot .env is in docker ignore hehe 2025-05-05 16:40:13 +02:00
.gitignore fixed some stuff for the baseurl change to work. 2025-05-05 13:37:54 +02:00
Dockerfile baking in .env to the Docker image cause it aint working bruh 2025-05-05 16:38:12 +02:00
pyproject.toml added dockerfile and pyproject.toml 2025-05-03 18:03:07 +02:00
README-sv.md Update README-sv.md 2025-06-10 11:17:22 +02:00
README.md Update README.md 2025-06-10 11:16:54 +02:00
requirements.txt added restart script for docker, and did some stuff on the app i dont fucking remember 2025-05-12 10:45:54 +02:00
restart.sh added restart script for docker, and did some stuff on the app i dont fucking remember 2025-05-12 10:45:54 +02:00

Note

En svensk översättning av denna README kan hittas med namnet README-sv.md

🍽️ Skolmaten - School food planning

A minimal async web app for managing weekly food menus (skolmaten) with user authentication and role-based permissions. Built with Flask, aiosqlite, and python-jose.


⚙️ Features

  • 🔐 JWT-based login system with roles
  • 🗓️ Week-based food planning
  • 🧑‍💼 Role-based management dashboard
  • 🌐 Async-first with simple HTML forms
  • 🍞 Built-in SQLite database

🚀 Getting Started

1. Clone the repo

git clone https://github.com/spelis/skolmaten.git
# or git@github.com:spelis/skolmaten.git
cd skolmaten

2. Install Dependencies

pip install -r requirements.txt

3-1. Run the app

gunicorn -w 4 -b 0.0.0.0:8000 'skolmaten:create_app()'

3-2. Run the app through Docker

touch database.db # create empty database
docker build -t skolmaten . # build docker container
docker run -d -p 8000:8000 -v ./database.db:/app/database.db skolmaten # run container and mount the database

3-3. Run the app in developer mode

flask --app skolmaten run --debug

4. Open in your browser

Open localhost:8000 if you started with gunicorn or Docker. Otherwise you open localhost:5000

🧪 Default Admin Account

After running the program, the following account is created:

  • Username: adminacc

  • Password: adminpassword

Use it to invite/register other users. It is also recommended you change the password. It can be changed by logging in and changing the password from the rightmost or center panel in the week view.

🔒 Permissions

Role Value Can Edit Food Can Manage Users
User 0
FoodEditor 1
Moderator 2
Admin 3

🧠 Tech Stack

  • Flask
  • aiosqlite
  • jose