Rethinking the Frontend
Late start today, but I'll try to put in at least 4 productive hours.
I started by finishing the refactor. Now I need to figure out the config.
Done. I am now dynamically creating the config and writing it to the output file.
The api works, and the next step is setting up the web app.
Now that i've set up the web-app generation, I think it's finally time to make the big move. I was thinking about ditching Next for a long time, for a few reasons:
- It's too complicated
- Projects feel bloated
- I don't know how to make it fast
- I don't know how the caching works and don't want to invest time into learning
- I'm not using most of the features
- Debugging anything is a nightmare
- I can't self host it
- I'm afraid of the inevitable rugpull and having to migrate everything, like with heroku
I did a lot of research and decided to go with the following setup:
- Astro for landing page / static content
- React for web apps
This should hopefully give me fast, seo optimized static pages and a fast web app.
When deploying, I'll serve them with nginx, which will allow me to proxy analytics requests. The only feature I'll be missing is the image optimization, but I'll figure something out.
I've created a Vite React app and added tailwind, shadcn, prettier, and react router.
Tried to set up the login and dashboard, but there's something wrong with the google setup and I can't figure out what. It's making me update account information after logging in. Maybe the mapping is incorrect?
Anyways, I'm close to finishing this. After that, I'll move onto exploring Astro and the landing pages. Very excited for that. Once I'm comfortable, I'll turn them into templates and finish things up. Then, it's a matter of getting it ready for prod.
Some things left to do, off the top of my head:
- Automating DNS
- Generating dockerfiles and deploying
- Creating github repositories
- Finishing up the config
- Setting up database credentials and creating databases
Hopefully won't take me longer than a few weeks.