deploying a project, v.2

for a non-programmer, i have a lot of ideas in the world of bits.

yesterday, i wrote that exploring and creating on those ideas has been wildly possible in the last year because of AI. 

for many, i've done 20-60% of the project and then I'll move on to the next thing. some of them, i think i simply need to take that idea and put it into a prompt and watch the code cascade down the stream in order to feel like i did something about it.

most have never gotten to deployment. some have, but i gave up for whatever reasons. 

this one i'm working on now -- an always-on ai tech assistant for older people -- really has some legs. i see actual use case for it. so, as i've predictably gotten to the deployment stage, i've run into big hurdles. and, for the near-7th day in a row, i haven't given up.

front and backend

when i gets to the stage, i so fiercely want to get the thing online and start trying to get users, that i go way too fast. i don't read docs, i don't google. i don't look at forums like stack overflow. i just keep screenshotting errors, attaching those to cursor, and trying to cram it through. 

the one breakthrough i had in the development, pre-deployment phase, was getting my apis to call for both the chatbot (openai) and the ai-voice phone call (bland.ai). i'd been stuck for a few days (few hours over a few days) on this. 

the breakthrough happened because i read the docs.

for deployment, i'd originally decided to go with replit. i've seen this all over xtwitter and some posts about pairing it with cursor (which i'm using) and so i signed up for an account. i ran into some issues testing deployment within replit so i gave up - moved on. 

i went then went to netlify for the frontend and firebase for the backend. that's what i used for predictstuff.lol so i thought i could pick that up easily. nope. i ran into lots of errors. 

so i went back to replit. i watched videos on it. nothing.

went back to firebase and netlify. still confusing. screenshot, send, deploy to netlify, and nothing.

then, i went to vercel for the backend and netlify for the frontend. this felt like i'd made progress as i was able to get a github repo synced with them all. again, i'd done that successfully with the predictstuff project, but had trouble on this one originally. 

but, then i started running into CORS erros. which, i gather, happen when two different domains are trying to pass information (functions?) between one other but the proper security settings aren't in place to allow it. idk, something like that. but it makes sense in my head that vercel and netlify aren't talking.

so i sent a screenshot to my friend emmett (x). he said CORS issues are a pain; said that you can run front and backend on vercel; said to google the CORS error. i googled and found some helpful context that hadn't been coming just by continuing to cram through chatgpt or claude via curosr. 

i read some docs on vercel's website about CORS. screenshotted that to cursor. that seemed like it was going to turn the corner on this. but, no dice. 

still, small wins in that i took two actions today that i didn't take yesterday and helped me get unstuck: 1. ask a friend. 2. research.

merge

so, tomorrow i'll work on merging the frontend to vercel. i'm certain that will not be straightforward. i hope that i'll remember these 2 actions. and this blog. 

useful

that's the useful thing about reflecting on the process.

and, oddly, i've been very hesitant to learn anything about my mistakes so far or try and understand them. writing is a great way to do that. 

i think i've been hesitant because once i try to overcome hurdles by learning, if i then do not succeed very soon it seems like some sort of failure of self-improvement on my part. whereas, if i just keep screenshotting the same CORS message over and over and over again to the ai, i am implying, "better you work hard to figure out how to fix this than me." 

and that is the key insight. it took me this whole post to get to it.