This is a simple flashcard game that helps users learn French or Spanish using the 100 most commonly used words in French. The app makes use of a REST API to provide users with a new word to guess each time they play. I used automatic translation to get the spanish one. Some words translation may not be so accurate.
I did this in order to practice:
- SQL databases
- Flask application
- Python
- REST API
- Cypress
- HTML/CSS
- Docker
- Create a Docker compose and run the app on
gunicorn
andnginx
proxy
To run this app on your local machine, you'll need to have Python 3 installed.
- Clone the repository:
git clone https://github.com/your-username/flashcard-game.git
cd flashcard-game
- Create a virtual environment:
python3 -m venv .venv
source .venv
- Install the dependencies
pip3 install -r requirements.txt
To start the app, run the following command:
python3 main.py
Then open a web browser and go to http://127.0.0.1:5000 to play the game.
Alternatively, you can use Docker to run the app:
sudo docker run -p 80:5000 jonathananguise/flashcardgame:latest
Then open a web browser and go to http:127.0.0.1:80 to play the game.
The API provides users with a new word to guess each time they play. To get a new word, send a GET request to the following endpoint:
GET /get-words
The response will be a JSON object that contains the word and its translation:
{
"word": "bureau",
"word_translation": "despacho"
}
- Github: @jonathanAnguise