The final RCOS web client. Built on the RCOS database via Hasura and an extremely safe and boring Python Flask stack.
The RCOS website goes through a periodic cycle of being frantically written, never finished, losing the maintainers to graduation, falling out of use, and then eventually being rewritten. We need to break this cycle! Below are the reasonings for the technologies used.
Python is a well-known, general purpose language taught at RPI. It has a huge ecosystem and support community. Pick a random RCOS Coordinator or member and they will be comfortable with Python. Every future group of Coordinators will likely have at least a few Python developers, and this cannot be said for less popular languages. It has happened before that all Coordinators present don't know the language the current RCOS website used. That can't happen again.
Flask is an extremely popular Python microframework. It's simple, powerful, easy to deploy, and easy to find answers to online. It was chosen over a larger framework like Django as we don't need the "batteries included" and added complexity.
A traditional server-rendered website is preferred to a fancy, modern single page application because it is simpler to understand, less code to write (no separate frontend and backend projects) and no crazy Javascript build steps that require understanding of 10 different tools and configuration files. Do we need React for a CRUD application that isn't real-time or particularly interactive? No.
Mocked for being easy-to-use and generic, that's exactly the reason to use it here! It is recognizable to developers, easy to pickup, and avoids the need for custom CSS in most cases. Less written CSS is better CSS.
Setup is very straightforward.
- Python 3.10.x
python3 -m venv ./venv
source ./venv/bin/activate
pip install -r requirements.txt
(note:pip
and notpip3
)cp .env.example .env
- Fill out
.env
with valid values
source ./venv/bin/activate
flask run
The test deployment at https://rcos.up.railway.app/ automatically deploys on updates to the main
branch!
MIT