This repository contains a Django-based prototype platform for harvesting,
enriching and searching Open Educational Resources (OER). The project uses
Postgres (with the vector extension), optional AI enrichment, and a set of
harvesters (OAI‑PMH, MARCXML, CSV, API).
This README is the authoritative, up-to-date onboarding guide. If you are evaluating or demoing the project, follow the Quick Start below.
- Environment variable names in
oer_rebirth/settings.pyuseDB_NAME,DB_USER,DB_PASSWORD,DB_HOST,DB_PORTfor Django's database config. The database container still usesPOSTGRES_*variables for initialization. - Celery is configured in
.envto use Redis by default; settings may fall back to other backends if not provided. - The
docker-entrypoint.shwill create a default superuseradmin/adminpassif one does not already exist.
- Docker & Docker Compose (recommended: Docker Compose v2; use
docker compose) - Git
- For local non-Docker development: Python 3.12 (Docker image uses 3.12)
Optional services for advanced features:
- Redis (task broker)
- Qdrant (vector DB alternative)
- pgAdmin (DB admin UI)
- Clone the repository:
git clone <repo-url>
cd OER_Rebirth
cp .env.example .env
# Edit .env as needed (see .env.example keys)- Build and start:
docker compose up --build -d- Follow logs while the containers start:
docker compose logs -f webNotes:
- The
webcontainer'sdocker-entrypoint.shwaits for the DB, creates the database if missing, enables the Postgresvectorextension, runs migrations, and creates a default superuseradmin/adminpassif necessary.
The project uses a .env file. A complete example is provided in .env.example.
Key variables you will commonly set:
DJANGO_SECRET_KEY— Django secret key.DJANGO_DEBUG—True/Falsefor local dev vs production.
DB_NAME,DB_USER,DB_PASSWORD,DB_HOST,DB_PORT— used by Django.POSTGRES_DB,POSTGRES_USER,POSTGRES_PASSWORD— used by the DB container during first-time initialization (these often mirror theDB_*values but are read by the Postgres image).
CELERY_BROKER_URL— e.g.redis://redis:6379/0(recommended when using the providedredisservice indocker-compose.yml).CELERY_RESULT_BACKEND— e.g.redis://redis:6379/1.
LOCAL_LLM_URL,LOCAL_LLM_MODEL,LOCAL_LLM_TIMEOUT— URL and model for any local model used for enrichment. When using Docker Desktop and running an LLM on the host, usehttp://host.docker.internal:<port>in the.env.ENABLE_LLM_ENRICHMENT— setFalseby default unless you have an LLM available. Installing AI deps (torch, transformers) is optional and recommended only for users who enable enrichment.
- Visit: http://localhost:8000/ (admin at
/admin/). - Default admin user:
admin/adminpass(created by entrypoint if missing). Please change the password immediately. - Add an OER source in the admin and run a harvest (see management commands).
Open a shell in the web container:
docker compose exec web bashCommon commands (exact names present under resources/management/commands):
python manage.py fetch_oer— run harvests (see command help for args).python manage.py normalise_resource_type— normalise legacy resource types.python manage.py enrich_subjects— run subject enrichment/backfill jobs.python manage.py export_talis— export resources to Talis (requires creds).python manage.py reindex_qdrant— reindex into Qdrant (if used).python manage.py apply_subject_itemtypes— apply item type mappings.python manage.py backfill_subjects— backfill subject data.
Use python manage.py help <command> to view usage for each command.
The Compose file includes celery and celery-beat services. Ensure
CELERY_BROKER_URL in .env points to Redis when using the bundled Redis
service. Example values are present in .env.example.
- Qdrant: exposed on port
6333indocker-compose.ymlwhen enabled. - pgAdmin: exposed on port
8080(useful for inspecting the Postgres DB).
- Database connection errors: verify
.envDB_* values and that thedbcontainer is healthy (docker compose ps/docker compose logs db). - Celery not processing tasks: check
docker compose logs celeryand ensureCELERY_BROKER_URLpoints to a running Redis instance. - Embeddings or AI jobs failing: ensure
ENABLE_LLM_ENRICHMENT=trueandLOCAL_LLM_URLpoints to a reachable model; install optional AI packages only when required.
- Fork, branch, and open a pull request to
main. Keep documentation changes in the same PR as related code changes.
If you want, I can now apply these documentation changes to OldREADME.md
and create a short .env.example if you prefer a trimmed version. I will not
change any runtime code in this step.