Overcoming Roadblocks and Building the Backend
Continuing the Journey
This is the next chapter of my coding adventure.
Previously, I shared how I built a mortgage calculator with Python and hosted it with Streamlit.
I also introduced HomePayAI, the AI component I’m now developing.
If you’ve been following along, you know I’ve already:
- Refactored the code
- Separated files for clarity
- Organised the codebase for scalability
This post picks up where we left off — tackling the roadblocks that come with building a real AI backend.
Learning to Document — The First Hurdle
After refactoring, I ran into a familiar problem: forgetting setup steps.
I’m using GitHub’s tester API with a token, integrating it into my project.
I’ve done this twice before — and each time, I forgot the steps.
That taught me a vital lesson: document setup instructions in a dedicated file.
Now, anyone — including future me — can follow the steps without retracing old mistakes.
A small documentation file saved me hours of frustration — and will save even more in the long run.
Debugging Backend JSON Errors
Next, I hit a bigger wall: JSON errors.
I placed the JSON file next to main.py.
But the backend couldn’t find it.
The reason? Root directory matters.
This was a hard lesson in file structure and backend architecture.
Even small mistakes can break a project.
Every error is a lesson in disguise. Understanding how the backend locates files is foundational for scalable, reliable code.
Building the AI Component
Right now, my focus is on developing the backend AI functionality.
Most of the backend was carried over from the mortgage calculator, with small amendments for AI tasks.
The goal is clear:
- Ensure the API works correctly
- Make the AI tasks function as intended
It’s slow work, but each bug solved is progress.
Slow, deliberate work builds a system that lasts.
Frontend Foundations
I’ve also started laying the frontend groundwork.
Learning JavaScript while building the UI is a challenge.
But the payoff is enormous: a more user-friendly, polished product that delivers real value.
Slow progress now = rapid efficiency later. Every line of code is an investment in a stronger, more maintainable application.
The Takeaway
Part 2 of HomePayAI is about resilience, documentation, and learning through obstacles.
Key lessons:
- Document every step for future-proofing
- Pay attention to file structure and root directories
- Build deliberately, line by line
- Embrace the slow learning curve for long-term gains
Every bottleneck, every error, every line typed by hand is a step toward mastery.
The journey isn’t fast.
It isn’t easy.
But every small victory compounds into something powerful.