Why I built LibreLingo
Tags: svelte, opensource, education, hacktoberfest
Published: 2020-09-22 20:00:54

---
title: Why I built LibreLingo
published: true
description: My story about using Svelte to create an open-source language-learning platform
tags: svelte, opensource, education, hacktoberfest
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/4ulbys77e1sv1nmecaos.jpg
---
<sub>TL;DR I wanted to have a wiki-like language learning app, so I created [LibreLingo](https://librelingo.app/).</sub>

Every morning, I make my smoothie and sit down to study a foreign language for half an hour. This has been part of my morning routine for years.

There is something relaxing and meditative about practicing languages: it's an infinite source of new challenges, but broken down with the right tools, those challenges never become stressful. This is a habit I can do anywhere, and I can start and finish whenever I want.

You might love it or hate it, but my go-to tool has always been Duolingo. It has everything I need: skills are small and roughly uniform in size. I almost never have to look up grammar, because grammar is incorporated into skills. I can dive straight in! That makes the routine more predictable. Isn't it much easier to stick to a habit that's predictable?

This is my ideal way to warm up my brain for more unpredictable challenges later in my day!

## The itch

> Every good work of software starts by scratching a developer's personal itch. - _Eric S. Raymond_

People have different reasons to learn a language: I use it to clear my mind, others use it to connect to their roots. People learn languages to find their dream job. People learn languages to fit in. People learn languages to explore. Every priority requires a different method.

As a developer who loves open source, I want my essential tools to be open and hackable.

Duolingo offers a very wide variety of courses and an increasingly high variety of ways to practice. They, however, [lack an open API](https://forum.duolingo.com/comment/2543108/Open-Source-and-or-API), and although they have [some open-source software](https://github.com/duolingo) and have [released some of their findings](https://blog.duolingo.com/), their course content, as well as their software is proprietary.

Because my morning routine is important for me, I don't want my tools to change in ways I don't like, even if such changes make more money to a company. I don't want to end up in a different A/B test group. I don't want to have limited hearts. I don't want to depend on a SaaS. I want to own the tool I use every day.

There are some great alternatives. [Anki](https://github.com/ankitects/anki) has a great license and customizability. [Shared Anki decks](https://ankiweb.net/shared/decks/) offer a wide variety of content tailored to different needs.

That being said, all the alternatives I could find require the user to be much more proactive: you have to look up the grammar on your own, and you have to know what you want to practice, and in what order. This is ideal if you are experienced in learning languages and want to learn in the most efficient way, but it's not very beginner-friendly, and it's harder to make it into a habit.

The sheer size of the online language-learning and language nerd community, as well as the vast amount of user-created content, shows that there's great interest in creating resources. In a perfect world, these efforts could be channeled into a common cause: something like a Wikipedia of interactive online-learning resources, that offers a clean, fun, and consistent experience. Something that removed the barriers to learning a language and at the same time, gives the user more freedom in choosing how they want to learn.

For a very long time, I have been contemplating creating a project like that. Unfortunately, I had no experience in designing something so complicated. Even if I had a good plan, the amount and diversity of the work alone would mean that I need to attract some people to help me, and doing that without offering a direct financial incentive seemed impossible.

## The solution

> Release early. Release often. And listen to your customers. - _Eric S. Raymond_

Eventually, I decided to just give it a go, and see what happens! If I could find the smallest module of this concept that people would find cool and useful, I could perhaps get some feedback or even incite interest in the project.

I chose to begin with building a simple front-end for practicing skills. This is the most concrete, visual, and user-centered part of the ecosystem I envisioned. Because it's simple and tangible, I felt that people would just get it.

Another reason why I started by building the practice screen is that there are many great examples of this feature, so I wouldn't really have to reinvent the wheel. Also, there are resources I could use for building most of this.

I considered that this part wouldn't initially need any sort of back-end, and I could get away with replacing the course editor with a couple of hand-written JSON files.

 <figure>
<img src="https://dev-to-uploads.s3.amazonaws.com/i/9hfx846no2tlvd9h2bmn.png" alt="A screenshot showing a very minimalist version of the practice screen. The screen is showing three cards, each with a different emoji-animal. The task is to select the card that has a lion on it. The selected card is marked, and a submit button is visible." align="right" width="150" />
  <figcaption>An early screenshot of the practice screen</figcaption>
</figure>

### The "Launch"

Immediately, I wanted to show it to people. Since what I had was working perfectly as a static site, I decided to simply publish it on GitHub pages.

Once I deployed to GitHub pages, I created a README.md, trying to be as informative as I could: I described the project and my motivations, and I laid out some possible milestones. I included a license and some notes about how to contribute.

All set, I was ready to post to Hacker News.

### The reception

So far, LibreLingo received 620⭐ stars on GitHub. While I've had projects that attracted way more GitHub stars, I did not anticipate the amount of interest and contributions this very basic demo and product concept received.

Almost 70 people expressed their interest in working on course content, and many people contacted me with different ideas, proposals, and comments. A lot of people were enthusiastic and started contributing by creating issues and submitting pull requests!

Our [contributors](https://github.com/kantord/LibreLingo#contributors-) list now stands at 30 people, and with the contribution of [Caroline Delesalle](http://carolinedelesalle.com/), we have our amazing mascot, _Lili_:

![Lili is a cute tortoise with a blue shell and skin resembling the color of egg-yolk.](https://dev-to-uploads.s3.amazonaws.com/i/prmcuta4x8vd4mkhwu9o.png)

Someone even [proposed a new design](https://github.com/kantord/LibreLingo/issues/618).

### The progress

Thanks to [PouchDB](https://pouchdb.com/), LibreLingo users can now track their progress on their own devices. This means that storing user data doesn't require communication with a remote server. Thanks to that, the app is snappy and reliable: the functionality of the entire app can be made available without an internet connection.

 <figure>
<img src="https://dev-to-uploads.s3.amazonaws.com/i/7knejvu3vpfglpnvxa71.png" alt="" align="right" />
  <figcaption>Current screenshots of the front-end</figcaption>
</figure>

What's also brilliant about PouchDB is that the data can be synced with a remote database, so the user can still see the same progress across multiple devices.

Another important piece of the puzzle is the course editor. I chose to implement it using [Django Admin](https://docs.djangoproject.com/en/3.1/ref/contrib/admin/). It might not be the sexiest framework you can think of in 2020, but I knew from my previous work experience that it's incredibly easy to create CRUD apps with it. You just have to do define your database models, and Django creates your database and your admin app.

 <figure>
<img src="https://dev-to-uploads.s3.amazonaws.com/i/icx7a3iue9tv5cbgei53.png" alt="" align="right" />
  <figcaption>The current LibreLingo course editor</figcaption>
</figure>


Once the course editor was working, I just had to deploy it to Heroku, create a simple script that can export the course data, fetch any missing illustrations from [Unsplash](https://unsplash.com/), and generate any missing audio files using Amazon Polly.

## The challenges 

> In most projects, the first system built is barely usable... Hence plan to throw one away; you will, anyhow. - _Fred Brooks, The Mythical Man-Month_

An early adopter might be able to use LibreLingo productively already. Nonetheless, before widespread use, much work needs to be done on course content.

I want LibreLingo to empower anyone to work on courses. The real power of a wiki-like system would be unleashed by having content for minority/endangered languages, specific dialects and constructed languages through the enthusiasm of the language nerd community.

While the course editor is fully functional and makes it easy to edit the course content, it does not facilitate collaboration sufficiently. It's not enough to draw in a wealth of contributions, it's also extremely important to maintain an efficient, sensible, and fun course structure. To do this, the course editor would probably need to enforce some sophisticated constraints, and also have a way to determine who can approve content.

I have ideas on how to make this work: extend Django Admin with the required functionality. Or perhaps use Django to create a GraphQL or REST API, and build a custom frontend on top of that for the course editor. Perhaps move to a document store model for the course editor. Perhaps let some people experiment with course content being stored in a git repo for a specific course. Or try using a MediaWiki instance. If you know how to do this in baby steps, please [head to this issue](https://github.com/kantord/LibreLingo/issues/711)!

## Want to help out LibreLingo?

Here's a couple ideas how you could get involved:

👀 [Help making contribution to LibreLingo easier](https://github.com/kantord/LibreLingo/issues/227)
💡 [Help more people get involved with the course editor](https://github.com/kantord/LibreLingo/issues/711)
👩🏽‍💻 [Check out some _good first issues_](https://github.com/kantord/LibreLingo/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22)
📜 [Check out the LibreLingo GitHub repo for more info](https://github.com/kantord)
🎨 [Help us work out the new design](https://github.com/kantord/LibreLingo/pull/637)
💸 [Sponsors me on GitHub Sponsors](https://github.com/sponsors/kantord)

### Hacktoberfest 2020

Hacktoberfest is a global hackathon event celebrating open-source software. To read more about Hacktoberfest, [check out their website](https://hacktoberfest.digitalocean.com/).

LibreLingo has a [curated list of issues for Hacktoberfest](https://github.com/kantord/LibreLingo/issues?q=is%3Aopen+is%3Aissue+label%3AHacktoberfest).

### Update April 2021

Interested in learning more about the LibreLingo platform? Check out my new dev.to post about [creating a LibreLingo-based app in Python](https://dev.to/kantord/practice-tdd-by-creating-a-librelingo-based-language-learning-app-4apf)!