Project learning for school
- Install Docker Desktop
- From the project root, run:
docker compose up --buildThe database schema from tables.sql is applied automatically on first startup.
Use the free English → Vietnamese dataset from minhqnd/dictionary (CC BY-SA 4.0):
- Download
dictionary.dbfrom the releases page - Place it at
data/dictionary.db - Import:
docker compose exec web python import_minhqnd.pyFor a quick test with 1000 words:
docker compose exec web python import_minhqnd.py --limit 1000Place dataapp.csv in the project root, then run:
docker compose exec web python import.pydocker compose down # stop containers
docker compose down -v # stop and remove database volume (fresh start)
docker compose logs -f web # follow app logsCopy .env.example to .env if you run the app outside Docker.
Vocabulary imported via import_minhqnd.py comes from dict.minhqnd.com and is licensed under CC BY-SA 4.0. Keep the attribution in the app footer when using this data.
- Clone the repository
- In your terminal window, navigate into the project
- Run
pip3 install -r requirements.txtto make sure all of the necessary Python packages (Flask, SQLAlchemy and others) are installed - Set the environment variables:
export FLASK_APP=application.py. On Windows, the command is insteadset FLASK_APP=application.py
DATABASE_URL= URI for your local postgreSQL database (for example:postgres://username:password@localhost:5432/databasename)
- Run
tables.sqlagainst your database to create the necessary tables - Download
dictionary.dbtodata/and runpython import_minhqnd.py - Finally execute
flask runcommand in your terminal to start the server