OnboardLite is the result of the Influx Initiative, our vision for an improved student organization lifecycle at the University of Central Florida
git clone https://github.com/HackUCF/OnboardLite.git
python3 -m venv .venv
echo ".venv/" > ./.git/info/exclude
source ./.venv/bin/activate
python3 -m pip install -r requirements.txt
python3 -m pip install -r requirements-dev.txt
pre-commit install
cp options-example.yml ./config/options.yml
Goto https://discord.com/developers/applications create an application. Then under oauth2 get client id and client sceret set redir url to http://localhost:8000/api/oauth/?redir=_redir
Set
discord
client_id:
secret:
redirect_base: http://localhost:8000/api/oauth/?redir=
enable: false
set
email:
enable false
Set
http:
domain: localhost:8000
Set jwt secret to a <32 charcter random string
Set database to
database:
url: "sqlite:////data/database.db" # For docker create database/
url: "sqlite:///database/database.db" # For local dev create database/
To run you can do either
python3 -m uvicorn app.main:app --host 0.0.0.0 --reload --port 8000
or
docker compose -f docker-compose-dev.yml watch
Debug in vscode create .vscode/launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: FastAPI",
"type": "debugpy",
"justMyCode": true,
"request": "launch",
"module": "uvicorn",
"args": [
"app.main:app",
"--reload",
"--port",
"8000"
]
}
]
}
~/.aws
is populated.
AmazonDynamoDBFullAccess
and PowerUserAccess
(or preferrably, a policy that includes the actions dynamodb:*
and sso:account:access
)aws configure sso
on the host machine. See this article for more details.id
$URL/pay/webhook/validate
and the account is activated.
checkout.session.*
.sudo apt install -y nginx certbot build-essential python3.11 python3.11-dev
(or later versions of python3). You may need to use get-pip.py to install pip3.11
as well.python3.11 -m pip install -r requirements.txt
nginx
(recommended) to proxy to port 80/443 + enable HTTPS. Set headers like Content-Security-Policy
.
sudo apt install redis
systemd
service, replacing values as appropiate:
[Unit]
Description=Uvicorn instance to serve OnboardLite
After=network.target
[Service] User=ubuntu Group=www-data WorkingDirectory=/home/onboard-user/OnboardLite/ Environment="PATH=/home/onboard-user/OnboardLite/" ExecStart=python3.11 -m uvicorn index:app --host 127.0.0.1 --port 8000 --workers 2
[Install] WantedBy=multi-user.target
10. Drop the following nginx site config:
```conf
server {
listen 80;
listen [::]:80;
server_name join.hackucf.org;
proxy_set_header X-Forwarded-For $proxy_protocol_addr; # To forward the original client's IP address
proxy_set_header X-Forwarded-Proto $scheme; # to forward the original protocol (HTTP or HTTPS)
proxy_set_header Host $host; # to forward the original host requested by the client
root /var/www/html;
index index.html;
location ^~ / {
proxy_pass http://127.0.0.1:8000;
}
}
systemctl
. Do the same for nginx
if installed.config/pki
. See this tutorial for details.To edit questions on a form, edit the JSON files in the forms/
folder. Each JSON is a separate page that acts as a discrete form, with each value correlated to a database entry. OnboardLite uses a file format based on a simplified Sileo Native Depiction and achieves the same goal: render a UI from a JSON schema. The schema is, honestly, poorly documented, but is rendered by util/kennelish.py
. In short, each object in an array is a discrete element that is rendered.
Database entries must be defined in models/user.py
before being called in a form. Data type valdiation is enforced by Pydantic.
Administrators are classified as trusted Operations members and are not the same thing as Executives. These are people who can view roster logs, and should be FERPA-trained by UCF (either using the RSO training or the general TA training). The initial administrator has to be set via DynamoDB's user interface.
Please report security vulnerabilities to execs@hackucf.org
.