MacWeb is my biggest project so far that I’ve worked on periodically in the past 2 years, and ever since I rewrote it from scratch for like the third time to migrate to Next.js and fullstack during Flavortown, I have not touched it at all
I didn’t plan on starting it again any time soon, but I actually needed to make a form for a hackathon I’m hosting, and while I could’ve used Google Forms or something else, I decided making my own form creation tool was the best option
I wanted the tool to be part of MacWeb, meaning it had to connect to the original auth and database system, but those were outdated and I wanted a more modern stack, so I decided to completely migrate this platform before even starting with the form tool
The database was the easiest to migrate since I just had to set up Neon and Prisma, rewrite a few server actions and APIs, build a clean, new schema and type system, and run a few migrations
Auth was the actual pain because not only did I have to replace all the original structure with the new framework and generate new OAuth clients, I also had to make cross origin subdomain cookie session sharing work because the other apps are on their own subdomains. This meant reading a ton of docs and changing the auth config way too many times
Every time I had to change the config to see if the subdomain CORS/whatever error was fixed, I had to commit, push, and redeploy on the actual domain since cookies and auth behave differently in local dev environment
I ended up repeating this frustrating cycle of endless commits to fix that one bug for like 2 hours before realizing I made a typo for an environment variable and then everything got fixed…
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.