App to use during hackathons. Serves the purpose of providing an overview of participants to simplify the creation of project teams.
The code is a complete mess, will try to clean it up for future hackathons.
Open the SQL editor and click on "New Query". Paste the contents "sql/sql_commands.sql" and run the query.
Copy and Paste E-Mail templates into supabase
git clone [email protected]:CorrelAid/KN_Kompetenzdatenbank.git
cd KN_Kompetenzdatenbank
e.g.:
cp example_env.txt .env
Edit the file and follow the instructions provided above the variables.
npm install
cd python_scripts
python -m venv env
source env/bin/activate
python -m pip install -r requirements.txt
python admins.py [email protected]
While in root folder:
npm run dev
You can use this app to check if someone is registered and then confirm their entry in the database. Because there are different types of attendance, ask people if they plan to actively participate. Only then would it make sense for them to show up in the database probably.
Follow the Official Instructions and add .env contents
Authentication happens through magic links. Only admins and confirmed participants can request links. Admins need to be added with the python script "python_scripts/admins.py". This script adds an email to the table "admin_emails" and sends an inivitation link. If a users e-mail exists in the table "admin_emails" a trigger causes the user to be added to the "auth_role" table with the value "true" for "admin". The same trigger will set "admin" to "false" if regular users (not in "admin_email" table) get added to the authentication table. Participants can request magic links if they are in the table "main" and "confirmed" is set to "true". Admins can confirm users through the GUI.
Administrators can upload data using the GUI by opening the corresponding modal. In the background, the csv is transformed with the function transform_array() (you can find it in src/lib/data_processing.js). This creates an array using the column indexes of the uploaded csv.
TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:372:5)
at URL.onParseError (node:internal/url:553:9)
at new URL (node:internal/url:629:5)
at new Request (file:///home/jstet/Gits/CorrelAid/Kompetenzdatenbank/node_modules/@sveltejs/kit/dist/install-fetch.js:5907:16)
at file:///home/jstet/Gits/CorrelAid/Kompetenzdatenbank/node_modules/@sveltejs/kit/dist/install-fetch.js:6189:19
at new Promise (
- possible fix: https://kit.svelte.dev/docs/routing (try different api routes)
- Fix long loading times when loading table row components (Entries). I have no idea why that happens. I had to switch search functionalities to vanilla js because of that
- 10s without pics
- 13s with pics
## Long term development goals
- Send invitation e-mails from custom e-mail instead of supabase mail (use some mail api, e.g. [Googles](https://developers.google.com/gmail/api/quickstart/nodejs))
- add feature to delete/add/change entry
- responsive admin area
- add more (and better) error handling
- clean up this shitty code