Porting to remix is a bit of an epic. Here's the todo list:
[x] Factor out the cookie-handling and JWT handling code to be reusable on other routes
[x] Build out the landing page, and wire up links. (Need a future PR specifically for finalising v0 copy / screenshots etc.)
[x] Make the Sign In button render conditionally as "Dashboard" if the user already has a valid cookie
[x] Also show the user's avatar if they are already logged in
[x] Make sign in button not do the full Github rigmarole if there's already a good cookie
[ ] Basic webpage analytics (roll own since we have server-rendering, but don't go to town because eventually will be easier to pay for a full product probably)
[x] Delete the old /web directory with the original Nextjs landing page
[x] Rename the new Remix app to /web
[x] Rename the /app directory inside Remix directory /src because I like that better
[x] Make a user profile/account page
[ ] Make an API key management page
[x] Ensure that if a user navigates to a protected route like /dashboard when not logged in, they get the login prompt and then redirected back to where they were trying to go afterwards
[ ] Design the dashboard / experiment tracker table to look nice once we have good visualisation infra
[ ] Improve Typescript
[ ] So far, Remix isn't super clean on the Typescript front because it gets you to define these functions for each route like loader, and the return type of this function because the result of calling useLoaderData in the component. But the types seem to get messed up a bit.
[ ] Implement ts-rs wherever we are calling the Rust API, so the types always align automatically
[ ] Deployment
[ ] Consider setting up a Docker container which runs Postgres (needs to be connected to some persistent storage though), Node.js Remix app and Rust API all on a single machine.
[ ] Configure to automatically deploy to a cheap EC2 instance when push to main (but only after CI passes)
[ ] We still need the Rust API to be exposed as api.hitsave.io so Python clients can connect to it
Porting to remix is a bit of an epic. Here's the todo list:
/web
directory with the original Nextjs landing page/app
directory inside Remix directory/src
because I like that better/dashboard
when not logged in, they get the login prompt and then redirected back to where they were trying to go afterwardsloader
, and the return type of this function because the result of callinguseLoaderData
in the component. But the types seem to get messed up a bit.api.hitsave.io
so Python clients can connect to it