Creating a backend web server for Hydrant
Opened this issue · 1 comments
Base Features
- hosting the Hydrant SPA
- this server could also just be an API server
- login functionality
This would be further extended in other issues.
Language & Server Framework
Hydrant currently uses Python and TypeScript. Much of our existing schedule scraping is written in Python, but some useful logic, like creating iCalendar files, is written in TS.
Writing TS is much more fun than writing Python IMO (for context, most code I write is Python), but either is a decent enough lang for a server.
For Python, FastAPI is a great server framework.
For JavaScript, the Express ecosystem, while good, doesn't have great async support out of the box and holds many footguns, while more robust frameworks like NestJS are a little overkill.
Database
Pretty much all SIPB projects use MySQL as a database solution; I have no qualms with this.
I'd like to take over this issue + #47 and #48 by creating a Node.js backend for Hydrant that hosts an iCalendar endpoint but keeps its data within the FireRoad backend. The only thing I'd need help with is getting access to the production instance of the FireRoad API, which maybe @psvenk would know more about - but I can write code around the assumption that we'll be granted access until then.
This would also open up a ton of new possibilities involving linking Hydrant and CourseRoad more closely, e.g. importing your class list from a road you make on CourseRoad into Hydrant.