A language learning chat app
Lingualearn is a language learning app. It uses chatrooms, each designated for a particular language to help you learn languages more quickly by providing a place to communicate in the language which you are learning. There are a number of additional features. These include:
- Gamification Features
- XP gained every time a message is entered
- XP per week for each user calculated and stored
- Leaderboard which allows users to see their weekly XP
- Streak system
- Translation Features
- When you click a word, it gives you the translation
- You can add your word to any flashcard set that you have made
- Flashcard Features
- You can create, edit and view flashcard sets
- You can upload your sets so that others can view them
- Study features
- You can view flashcards in a full screen focus mode which minimises distractions
- Cards in flashcard sets can be shuffled
Lingualearn can be run as a docker container. This is the recommended usage method. To run Lingualearn first ensure docker is installed. Then run the command: docker run -p 5000:5000 jacobmacleod/lingualearn:latest
The section 5000:5000
stores port of host computer:port of server
, where the port of the host computer can be changed to any port.
The section :latest
defines the version (tag) number, where latest
is the latest version as of the time of writing.
You can add arguments to this command. The first argument is the API key for sending emails, and the second argument is the email address where the arguments are sent from. Therefore, the command is in the format: docker run -p 5000:5000 jacobmacleod/lingualearn:latest APIkey senderEmailAddress
This is not the recommended method of usage, but it is necessary for development. To run through github, first ensure the requirements are installed. This includes:
- Flask
- Python3
Flask can be installed once python3 and python3-pip are installed through pip3 install flask
. Please refer to online documentation to see how to install python for your operating system.
Once the dependencies are installed, assuming git is installed, the repository can be cloned with git clone https://github.com/jacob-macleod/LinguaLearn.git
If you want to generate your own encryption key, you can run python3 generateNewKey.py
. If you do not do this, the default key will be used, which is the one cloned to this github repository. Therefore, this is not secure.
Note that if you want to generate a new key, you'll have to remove the data in the csv files in the database
folder, or they'll be unreadable.
Then, type in touch emailAPI.key
. You can enter a gmail API key and the email address that the API key corrosponds to to this file to be able to send notifications whenever somebody types a chat message, or leave it blank.
Note that if you do this, you will also have to reset the CSV files by clearing data, otherwise they will be undreadable.
Next, the main file can be run with python3 app.py
You can add a command line argument as in python3 app.py myAPIkey myEmailAddressThatTheAPIKeyCorrospondsTo
to add an API key and email address to send emails, or leave it blank. When the script runs the code looks at:
- The command line arguments
- The data in emailAPI.key - line 1 is the API key and line 2 is the email address
- If no data from above is supplied, the key and email adress are left blank and emails are not sent
To generate an API key, the YouTube video https://www.youtube.com/watch?v=g_j6ILT-X0k is a great guide. It is not affiliated with me, its just what I used to generate a working key. You can then supply this key to the program.
I have developed the main functionaility for the initial version of the site, as well as the main UI. Next, I am working on various bug fixes. These can be seen on the issues and projects page.
The following items are encrypted using Ferner algorithms:
- Username
- Password
- Email address
- All chatroom messages
When the repository is cloned, a new key can be generated by running generateNewKey.py
. If this is not run, the default key will be used, which is the one cloned to this github repository. Therefore, this is not secure.
Contributers are welcomed. They can help with any issue. To do this, add a comment to the issue to indicate that you are working on it, and I'll reply with any required information.
Lingualearn uses Python with the Flask framework, and uses CSV files for the database. At some point, I am planning to replace this with a server