Open sam-lowenkamp opened 6 years ago
Looks like this is a well-regarded TS
based ORM: http://typeorm.io/#/faq
I think we should use psql or mysql for this stuff. I've never used an ORM in JS/TS but feel like we should stay in the JS world so you don't have to learn another language and I don't become a blocker for your work.
If you're pro-relational db, I can work on getting us deployed on heroku or something like that with a relational database + wiring up a sample view. Otherwise, we can move forward in non-relational with more firebase stuff. As long as we use interfaces in the JS, it shouldn't be impossible to migrate to another system down the line.
im fine with moving out of the js world. I kno backend engineers hate it so by all means if you feel that something is better im fine with you going that route this is also a good opportunity to learn stuff so i dont mind picking up another language.
The following model will be expressed (roughly) via TypeScript types but could be easily translated to a relational DB:
Primary workflows:
Eventual workflows:
Suggested trip creation data flow:
Trip
object with the relevant data pre-populatedSuggested trip update flow:
Trip
already existsTrip.id
and the relevant info (separate endpoints for adding a stop vs adding an activity --- probably need to sendStop.id
when updating a stop instead ofTrip.id
)I intend this as a "first take," not final product. Very open to suggestions, edits, changes! I also worked under the assumption that we move to a relational db in the near-ish future. The data feels very relational so it seems appropriate. Also open to challenges to that point.