Inspiration
I needed a project to make money, but I didn't want to make a soulless automation, thus, I decided to give my program a personality and an image, as well as a useful function. I wanted it to be easy to use and not require heavy setup, so I build it for use in the Telegram platform
Why the name
Hina is an AI character I run privately, and I wanted to work with a personality I already knew. I didn't replicate Hina (original) here, just a condensed version of her, specialized for Telegram and short chats.
What it does
For this MVP, it takes a document or picture, up to three pages, and processes it using the user's prompt. It can simply extract the text, analyze the document, but its coolest feature is the AI-powered translation and document regeneration. For now we only support Spanish and English translations, and we don't use an AI model for the document regeneration.
How we built it
It started as a for-profit idea, I brainstormed with many chatbots, Gemini, chatGPT and Claude among them, to create a concise, actionable draft plan. We then wrote a Specification to build it. Originally, it was gonna use very lightweight models for the MVP, mainly for cost optimization and speed, but then I found out about the buildweek contest, and to my luck, I had began the initial implementation (config files and setup) just a day after the contest began. I had no knowledge of it before, and learned about it from an email. I decided to pivot and branch out into a 'buildweek' git branch, and use codex to ramp up development speed. I used the 5.6 Sol model as it is the most performant, smart model available, and I needed results, not hallucinations or half-baked code. We managed to finish it against all odds, and deployed on the Cloudflare Platform.
How Codex changed everything
Without codex, it'd have taken me weeks to build Hina, and more to test/deploy. with codex + GPT-5.6, I managed to get this ready in only 4 days.
Challenges we ran into
For me, it was time and money mostly. Codex told me we'd need more CPU juice if pdf processing was involved, and my Free Workers Plan was not gonna cut it. We also needed to subsidize the inference costs for the models, and I was quite low on funds. I had also officially entered the contest halfway already, and I had to accelerate the development. Fortunately for me, Codex helped greatly, without it, I'd still be stuck reading Cloudflare Docs
Accomplishments that we're proud of
- Fast pivot: I quickly decided to change the original idea to fit the contest and actually made it flashier, as the document regeneration feature was not an MVP goal for the mainline Hina, but now it's a reality.
- Beating the odds: I still can't believe I (and codex) managed to complete this in just a few days, it's amazing what AI can do when you harness it properly.
- Not depending on AI for everything. We build the PDF processing module to not use any image generation model, just a vision model and our own processing logic.
- Fast deployment via Cloudflare. We used the edge to bypass VPS setup and risks. ## What we learned
- Edge deployment and optimization
- The basics of encryption for production
- AI-enhanced and AI-accelerated development and building
- PDF processing
- Telegram bot development.
What's next for Hina-OCR Chatbot
We plan on launching a polished MVP on Telegram, add a credit system and a wider variety of models. The end goal is to make Hina accessible, easy to use and helpful
Built With
- bun
- cloudflare
- codex
- effect-ts
- just
- nix
- telegram
- typescript
Log in or sign up for Devpost to join the conversation.