downforacross / downforacross.com

Web frontend for downforacross.com -- continuation of stevenhao/crosswordsio
https://downforacrosscom.downforacross1.now.sh
MIT License
229 stars 90 forks source link

Start mirroring puzzle data to postgres #130

Closed stevenhao closed 3 years ago

stevenhao commented 3 years ago

Create puzzle now sends a POST /api/puzzle request as well.

I bit off a bit more than I could chew at first, trying to build a fully functional drop-in replacement for the existing storage system for the puzzle repository. Instead I'll take this in pieces:

  1. send newly created things to both firebase and postgres [this PR]
  2. migrate first read method: puzzle list to use postgres, while keeping game creation on firebase [partially implemented in this PR, but switch is not flicked yet]
  3. do a backfill firebase->postgres for old puzzles (if i decide i want to keep them...)
  4. finish migrating read methods to only read from postgres -- game creation can still live in frontend [partially implemented here but it was a bad idea]
  5. nuke puzzles from firebase when confirming that things are stable

TS migration stuff:

vercel[bot] commented 3 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/downforacross/downforacrosscom/514tbavis
✅ Preview: https://downforacrosscom-git-puzzle-repo.downforacross1.now.sh