Setup
npm
installed./knt-backend
named start-backend.sh
/knt-font
. npm install
to install all the packages in the package.json
npm run dev
. The front-end app should be up and running now.Backend Documentation
The backend has swagger docummentation which allows you to test out the backend queries without setting up the frontend or the admin panel.
You can run the swagger docummentation either from the start script (requires open-swagger-ui) or the swagger ui vscode extention
Notes
In the front-end file nuxt.config.js
and in the knt.py
file, the two urls that are used are based on my machine. Usually, React/Vue.js/Nuxt.js uses port 3000 and flask uses port 5000, but if this isn't the case for you, just change the ports in the urls but don't commit the changes.
There are still some things that need to be figured out on this fork if we decide to go through with Flask, those things being:
Relevant documentation
The old one is very insecure and pretty much impossible to maintain.
When buying snacks / soda / beer:
When topping up account: User goes to stormwebshop.nl and buys credits. Webshop calls API on backend to update the account.
Backend: Go
Rationale: Relatively simple and has an extremely strong stl that allows to do most things without using third party libraries which ensures future support of the added functions. Most importantly its functional (AKA: Not cringe)
Frontend: HTML/JS/CSS
Rationale: Much easier to update the interface and adapt it to different needs.
The K&T system (I assume it stands for Koffie en Thee although tea is free) allows STORMers to purchase edible and drinkable items such as sodas, coffee, beer, snacks and instant noodles. Because there is no cashier, STORMers have an account with credits in the system that they subtract by themselves through the software whenever they're buying something.
The system is composed of a user interface running on a computer at the bar, a server holding the backend, and the STORM web shop which is used to buy credits.
Who benefits from it: all STORMers, BorrelCie
It is going to be a web app that runs on the K&T thing in the StoKa. While this setup would technically allow STORMers to use the app from the comfort of their own mobile phones / laptops, I (Tudor) consider that it wouldn't be a good idea, because:
This piece of software is going to be a Python (or Go?) executable that provides a REST API for doing business. The client is going to be made of a bunch of HTML pages that call that API through JS.
There will also be an administrative API used also by the webshop to update the balance.