Skip to content

think-elearn/toki-pona-ai

Repository files navigation

AI-Powered Toki Pona Language Learning App

Build Status Dependabot Updates pre-commit.ci status codecov Ruff

This is an AI-powered Toki Pona language learning app based on prototypes created during ExamPro's 2025 GenAI Essentials bootcamp. See the original bootcamp repository for the projects that inspired this app.

Pre-requisites

  • Python 3.12
  • PostgreSQL
  • pre-commit

Installation

Clone the repository

git clone https://github.com/think-elearn/toki-pona-ai
cd toki-pona-ai

Create a virtual environment

python -m venv venv
source venv/bin/activate

Install dependencies

python -m pip install -e ".[dev]"

Set up the database

Create a PostgreSQL database named toki_pona_db.

psql -U postgres
CREATE DATABASE toki_pona_db;
\q

Then create a .env file with the following command:

echo "DATABASE_URL=postgres://postgres:postgres@localhost:5432/toki_pona_db
SECRET_KEY=$(python -c 'import secrets; print(secrets.token_urlsafe(50))')
DEBUG=True" > .env

Apply migrations

python manage.py migrate

Create superuser

python manage.py createsuperuser

Set up pre-commit hooks

Install pre-commit if you haven't already:

pip install pre-commit

Then set up the pre-commit hooks:

pre-commit install

Run the development server

python manage.py runserver

Seed the database with sample data

python manage.py load_sample_phrases
python manage.py load_sample_glyphs
python manage.py load_sample_signs

Testing

pytest