2 minute read

Today was a quiet but profound day in my journey as a beginner builder.


🧱 Lifting the Curtain: The Architecture of an AI Companion

Until now, I had only scratched the surface of building a tool like Dialogus. I had imagined it as a kind of friendly AI window—a space where students could type their reflections, and receive helpful, human-like responses.

But what really happened under the hood?

Today I learned that building such a window means learning to orchestrate two very different realms:

  • The frontend: the part the user sees and interacts with (HTML, CSS, JavaScript).
  • The backend: the part the user never sees, but which connects silently to OpenAI, retrieves a reply, and sends it back.

The backend is like a kitchen hidden behind a café wall. The frontend is the beautifully designed counter and seating area. But what surprised me is that the chef doesn’t do the cooking alone—the chef is calling OpenAI, a kind of celestial oracle in the cloud.


🔁 What I Built

Dialogus is now a functioning single-page app. When I type a question and click Ask, the question travels from browser to server to OpenAI—and returns, transformed, to guide me.

At this stage, it’s a simple Q&A window. But its structure is modular and reusable. I now understand that this is the AI window pattern, and it can be used in many future projects—Burmese apps, quiz bots, professor avatars.


🔍 Key Concepts I Learned

Term Meaning Metaphor
.env Where I hide my API key 🔐 A locked drawer behind the bookshelf
backend The server code that connects to OpenAI 🍳 A chef who places orders to a divine kitchen
frontend What users see and interact with 🪟 A window with a welcoming face
fetch() The function that sends a question to the server 🏃‍♂️ A butler delivering notes between rooms
API The structured request to a service like OpenAI ☎️ A phone call to a philosopher

🛠️ What Surprised Me

I’ve long associated terms like “frontend” and “backend” with the technical world. But today, they became architectural—visualizable, metaphorical, even emotional.

What truly amazed me was the elegance of this hidden choreography. One button click, and suddenly a whole system awakens: sending, retrieving, transforming. I began to see how this choreography might be reused in other projects that matter to me.


🔮 What’s Next

Now that Dialogus can ask and answer, it’s time to think like a teacher.

Next step: Prompt design and persona shaping.
What kind of questions should Dialogus ask me back?
How can it give feedback that is thoughtful, Socratic, even poetic?

I want Dialogus to understand struggle—not just to reply, but to respond.

Today, I built not just a webpage, but the architecture for something deeply human.