- Avicenna
- Posts
- How to build anything with AI
How to build anything with AI
AI models have come a long way. From the release of the original ChatGPT in November 2022, AI models have exponentially gotten better, especially at coding. This is one of the domains where models have progressed so rapidly it’s hard to imagine what they will look like in a few years’ time. When the original ChatGPT was released, it could write singular files and it was amazing to see. Now I have gpt5-codex running for over 40 minutes at a time, creating entire products and adding complex features to apps.
Things have changed faster than people realise. Whether you’re in the AI space or not, you may not realise how easy it is to build software. In fact, I would say the age where anyone can build software is already here. A business would need to employ several people and pay hundreds of thousands for what can now be done with an AI model for less than $100 and patient engineering. Obviously there are caveats. Someone who understands coding is bound to do better than someone who doesn’t. Someone who understands how AI works, how to work with them and what their strengths and weaknesses are is bound to have an easier time building with AI. But these things don’t require degrees, qualifications or money. They simply require time and practise.
Here’s how you can get started.
AI tools
There are so many AI tools you can code with that naming them here would be pointless (see appendix down below). Since my wife pays for a ChatGPT pro account, I get to use OpenAI’s coding agent for free so that’s what I use. It just so happens that I believe gpt5-codex is the best coding model out there right now.
If you’re new to this, I’d also recommend downloading warp.dev. It’s a terminal that remembers your previous commands and helps you navigate the terminal; it’s a lot more user friendly for beginners.
From the terminal, install Codex:
npm install -g @openai/codexThen launch Codex:
codexMake sure to run this command in the folder you want to create your app in. So create the new folder, use the terminal to go into the folder then run codex. Warp’s AI assistant can help you with all these, just tell it what you would like to do.
What now?
Just tell Codex what you want to build. Literally, that’s it. Want to build a web app? Codex can easily spin up a backend with a database using sqlite and a frontend using html, css and js or react or nextjs. It doesn’t matter if these things don’t mean anything to you. The more you use codex the more you’ll understand what works best for what you want to do.
In my experience, this what I’ve learned:
1. Make sure you give it context
If you want to build an app that can use AI, go to the OpenRouter docs page and copy the contents of any page that is relevant to what you want to build and give it to Codex. Better yet, tell Codex to add this info into .md files or create these yourself. This way it can refer to this info in new chats. With just this, it can rebuild ChatGPT for you. It can build AI workflows or actual Agents as well.
This is my openrouter_docs folder that has all the relevant files for me. I have this folder in most of my projects.

This works for any type of app. If you want your app to use an api, just copy the api info and put it in files like this. The AI will always be able to reference it when it needs to.
2. You don’t always have to use frameworks
For simple websites, using html, css and js can work very well. It’s simple to edit and you can actually do a lot and keep the code simple. If you use frameworks like React or Nextjs, the code can get very complicated. Sometimes simplicity is best.
3. Do one thing at a time
If you tell Codex to do 10 things at once, it will try and probably even succeed. I’ve had it run for over 40 minutes at a time. However, I’ve noticed when this happens, it will overcomplicate the code and turn a two step process into a five step process. I’m not entirely sure why this happens but because of this, I generally only give 1-2 action items at a time.
4. Remind it to keep it simple
If you find the AI doing things in an overly complicated manner, tell it to remove bloat code and keep the code simple.
5. It can still use frameworks, particularly Nextjs
Codex is very good at using Nextjs with Shadcn. If you don’t know what this means, that’s okay. Just run this command to set up an app with this framework:
npx shadcn init -t nextOn this page, you can browse through the various blocks that you can use in your app for free. Just run the command in your terminal and then tell Codex what you added.
6. How to use a database
If you’re building an app for more than one user or need to save something, you’re going to need a database. If you want to use a database without even looking at it, just tell Codex to use sqlite. It’s a single file. Ask Codex what sqlite is and how it will work, it should be more than enough for most people.
If you want to use a different database, I use Neondb. All you have to do is create an account and a new project. Then just copy the database url from this new project and give it to Codex and tell Codex you’re using Neon. That’s it. It will take care of the rest. I pay $5/month and have multiple projects.
Conclusion
I don’t know how else to say this but you can build enterprise grade software with AI now. There are tens of thousands of businesses paying $100k+ for software that can be built in a few weeks. The speed at which you can build POCs, prototypes and full blown software is unprecedented. You can build full blown apps in 1-2 months.
For anyone who says AI can’t do this or the code won’t be good - my lived experience says otherwise. All I have to say this.
There is code that works, and there is code that doesn’t exist.
For businesses, it has never been a better time to prototype, build and execute. It is unimaginable to me that every business is not rushing to figure out how AI can help them scale. It’s a cheat code. AI can do more than most people can imagine.
And for people, if you’ve ever had an idea to build an app or a website, now is the perfect time.
People used to think AI coding for 20-30min+ was years away. Internally, labs have models running for hours. The technology is already here. People now say that models can’t code for days on end. That technology will soon come also.
We are living in a future people could not imagine just three years ago. The future you cannot imagine now will be here before you realise. Plan accordingly.
Have Questions? Reach out at nofil @ avicenna dot global.
Appendix
I use OpenRouter for all my AI API needs. You can call any model, use images, PDFs and audio. Works very well.
AI Tools:
Codex (Free w/ ChatGPT account w/ limits. Paid with API key)
Opencode (Two free models to use, no login/ads. Otherwise paid with API key)
Claude Code (Free w/ Claude account w/ limits. Paid with API key)
Gemini CLI (Paid with API key)
Qwen CLI (Paid with API key)
Factory AI (Paid with API key. Lots of hype, haven’t used it yet)
Amp (Free w/ ads & training models. Paid)
Cline (Paid with API key)
Cursor (Paid with API key)
Replit (Paid)
Lovable (Small free plan. Otherwise Paid)
Bolt (Don’t know)
cto.new (Came out today. Completely free but sells your anonymised data)
How was this edition? |
As always, Thanks for reading ❤️
Written by a human named Nofil
Reply