What is this page?

Someone mentioned that it would be good to know more about who's making the project, so I thought I'd write a mix of an FAQ, about page, and blog post.

Who am I?

Hi! I'm Alex Chambers-Jones. I'm British, 19, and in my gap year between school and university, where I'll be studying Physics at Bristol uni.

When I started this gap year, I knew that I wanted to work on a project that people would actually use. I was leaning towards building an educational platform based on the approach I used for my A Levels - Obsidian and Anki. But when I went through my list of project ideas, "selectively translate appropriate sentences into TL with high quality translation" stood out. So, I started working on it! I'd been really getting into learning German, and I quite liked the project idea.

That was almost a year ago now. I've built and released Nuenki, and people seem to quite like it! It's great to see people using it, and it was good fun to write. The marketing, less so!

I plan to keep supporting and building Nuenki into the future.

My LinkedIn is alex-chambers-jones, and my Github is Alex-Programs. I also have a Twitter account, where I nerd out about cosmology and spaceflight.

Technical details!

This is all really boring. It's designed to work well, be robust, and get out of the way, not make for fancy blog posts!

Extension

The extension is largely vanilla JS, with React for the settings popup and some Rust-via-webassembly for the low-latency difficulty estimation secret sauce. It's boring. Most of Nuenki's stack is!

Relay Server

This is the bit that takes translation requests and checks the cache, then queries from the upstream translation provider. It's overoptimised Rust via Axum-web.

Translation

I use the DeepL API, Claude Sonnet 3.5 via Bedrock and Anthropic, and Llama-3.3-70b via Groq.

Database

It's a really boring postgres instance. There are a few tweaks to make it run faster, but they're frankly unnecessary.

Website Frontend

Next.js. Probably the most boring part. I use semantic CSS; I suppose that's rare nowadays.

Website Backend

Axum-web, Rust, same as before. Again, very boring.

Dictionaries

Axum-web, Rust, serving an in-memory concurrent hashmap of the data, loaded from another Rust program that turns Wiktionary data into the correct format for Nuenki and uses about 15GB of my 16GB of RAM! Cloudflare is set to cache it as much as possible, so a lot of the requests don't even hit the server.

This has the bonus of making it practically free. Feel free to use https://dictionary.nuenki.app/get_definition?language=UppercaseLanguageName&word=LiterallyJustTheWord for small projects. The code's on my Github, if you want to selfhost.

Block Storage

I use Cloudflare R2 to host the bloom filters of the cache, which get updated every 3h or so and pulled by the extension every 30 minutes. I could've definitely selfhosted this, but it's less than a pound a month.

Observability

Loki; Prometheus; Grafana; DBGate. Grafana is cool to watch. There's not much logging, particularly on the relay, for privacy reasons. There are metrics though, and they're cool to watch.

Deployment

A 20 euro Hetzner VPS running Docker, firewalled to only talk to Cloudflare and my home IP. It sits at about 5% CPU usage. I use Caddy, because I learnt that when I was twelve and it's worked quite nicely since.

I think that's it. I'm probably missing something. There's a (Rust, obviously) program that handles expiring demos and uploading caches, too.

Languages

There's a centralised store of language information, because I was tired of spending 2h going around the codebase to add a new language.

SQLx

SQLx is a great library and I use it everywhere. Give it a try next time you're accessing a SQL database in Rust!

Security

I write good code, Rust makes it quite difficult to make mistakes, everything's firewalled and follows defence in depth, passwords are thoroughly hashed, etc etc. The data architecture also makes it quite difficult to leak data, even if the developer is impressively incompetent. It's quite funny to see the logs when people try and break stuff, though. There is actually one trick you can do - you can change the currency your browser reports, and that'll let you get Nuenki for marginally cheaper, particularly if you're American, because the price varies a little by what I thought rounded nicely and how cost sensitive people seemed to be. GBP is best for that, though maybe not during sales, because it only gets 10% off while the others get 20%.

Stripe handles payment details, so I don't even have access to them.

Marketing and Feedback

I'm hopeless at marketing. If you have any advice, I'd love to hear it. If you think I should change something, please let me know!

Contact

Email [email protected] or [email protected]. You can also join the Discord.