A language learning chat app with React + FastAPI
I'll talk about the chat app I built and future plans for extending it, along with an overview of the tech involved
Overview
I created this app tonight to help capture an idea I’ve had for some time—a chat-based language learning application. It’s still a work in progress, and I hope to continue developing it.
I’ve been learning Indonesian for nearly two years with the help of a teacher, and I can hold simple conversations and read easier news articles. However, I struggle to retain the words I’m learning. One idea is to use a chat-based method specifically for practising vocabulary. I believe that by regularly practising the words, I could retain them more effectively.
Future goals
You can see in the image that there is a section for Vocabulary, which lets you add words to your vocabulary list. At first, I thought that I’d make the LLM backing the chat pull out words from the response to add them automatically to the vocabulary, but I’m not sure if that’s a good idea anymore, I’d like to make it more intentional and make it easy to add words to the vocabulary instead.
Another feature would be to support adding a translation button to the text to translate the response into the user’s native language, or maybe to allow translating a sentence or a few words at a time only - this would mean that the user can’t cheat by looking at the full translation of each message.
Tech Stack
The frontend is built with React and Typescript using shadcn-ui for the UI. The backend is built with FastAPI and Python. Currently there is no persistence, authentication or anything fancy, messages are persisted in memory only (using a Python dictionary).
I built a basic version of the UI using bolt.new and then downloaded the code to iterate in Windsurf IDE. Then I built a simple backend in FastAPI which uses LiteLLM to call the OpenAI API. FastAPI is quite nice to use, I like the use of Pydantic models, it’s very different from Django which I’m currently using in my day-job.
Conclusion
In conclusion, I think I’ll keep messing around with this for a bit to see where it leads, I’m not sure if anyone else would be interested in it, but maybe I’ll find out if I keep sharing the progress on Bluesky etc!