HeritageGraph is an initiative taken by researchers at CAIR-Nepal.
While many individuals and organizations are doing remarkable work to preserve cultural heritage at the ground level, the growing trend is that today most users discover and interact with knowledge through the internet via browsers, search engines, and even chatbots like ChatGPT.
To make heritage truly accessible in the digital age, we need to go beyond physical preservation and digitally preserve, publish, and democratize access of knowledge where,
- 🕸️ Crawlers can crawl,
- 🤖 Agents can interact,
- 👩💻 Developers can query, and
- 💬 Users can seek answers through chatbots.
We intend to provide unparalleled digital access to the knowledge of our shared heritage.
There is a powerful quote:
“If you want to know where we should head in the future, then you should know where we came from our past, our shared understanding of it, and the experiences of our forefathers. These things serve as a strong moral compass for where to go and what to pursue in the future.”
Heritage is not just memory, it’s direction.
Sounds interesting and want to try it out?
Clone the repository:
git clone https://github.com/CAIRNepal/CHLODSwitch to the working branch (v1):
git switch v1The fastest way to get everything running:
# 1. Copy the environment template
cp .env.example .env
# 2. Build and start all services
make setup
# Or: docker-compose up --buildOnce running, access:
| Service | URL | Description |
|---|---|---|
| Frontend | http://frontend.localhost | Main application UI |
| Backend API | http://backend.localhost/api | REST API |
| API Docs | http://backend.localhost/docs | Swagger documentation |
| Authentication | NextAuth (Google OAuth in production) | Authentication provider used by the frontend and backend |
| Traefik | http://traefik.localhost:8080 | Reverse proxy dashboard |
📖 Full deployment guide: See DEPLOYMENT.md for production setup, SSL, backups, and more.
make help # Show all available commands
make up # Start services
make down # Stop services
make logs # View logs
make health # Check service health
make backup # Backup database
make prod-up # Start in production modeIf you want to contribute :-)
Here is a guide for setting up frontend and backend.
The frontend is built with Next.js and uses shadcn components.
⚠️ Note: Avoid adding custom colors directly to components. We manage colors globally viaglobal.cssusing tweakcn.
Setup:
cd heritage_graph_ui
npm install
npm run devAccess the app at:
- Landing page → http://localhost:3000
- Dashboard → http://localhost:3000/dashboard
The backend is powered by Django REST Framework and uses Keycloak for authentication (JWT via OIDC).
⚠️ Note: Make sure to set up the required.envfile (see.env.example).
Setup:
cd .. # Make sure you are in main directory
python -m venv .myvenv
source .myvenv/bin/activate # Linux/Mac
pip install uv
uv pip install -r requirements.txt
python manage.py makemigrations
python manage.py migrateCreate a superuser (optional, for admin access):
python manage.py createsuperuserRun the backend:
python manage.py runserverAccess the backend at (development):
- API →
http://backend.localhost/apiorhttp://localhost:8000 - Admin dashboard →
http://backend.localhost/adminorhttp://localhost:8000/admin(use superuser credentials)
- Start from the
v1branch. - Open an issue or submit a PR with improvements.
This project includes comprehensive documentation designed to help both human developers and AI coding assistants work effectively:
Documentation site: A consolidated MkDocs site lives in the docs/ folder and is configured to publish to GitHub Pages via CI. Visit the published site at: https://cairnepal.github.io/heritagegraph/ (update if your org URL differs).
| Document | Purpose |
|---|---|
| AGENTS.md | 🤖 Start here — Master guide for AI agents. Project overview, critical rules, directory structure, API summary |
| FORMS.md | 📋 How forms work — Add fields, enums, sections, and new entity types. Registry-driven form system guide |
| AUTH.md | 🔐 Authentication system — NextAuth + Google OAuth + Django token verification |
| CLAUDE.md | 📝 Coding conventions and patterns for both Python/Django and TypeScript/Next.js |
| SKILLS.md | 🗺️ Feature capability matrix — maps every feature to exact files with status indicators |
| ARCHITECTURE.md | 🏗️ System design with ASCII diagrams — network topology, auth flow, data models, Docker lifecycle |
| CONVENTIONS.md | 📏 Naming rules, import ordering, code style patterns for all languages in the project |
| PLATFORM_PLAN.md | 🗺️ Contributing platform vision — phased roadmap, data flow, API contracts |
| TROUBLESHOOTING.md | 🔧 Known issues, gotchas, debugging tips, and deployment checklist |
| DEPLOYMENT.md | 🚀 Full deployment guide — Docker setup, production config, SSL, backups, monitoring |
AI agents: Read
AGENTS.mdfirst, then consult other files as needed for your task.
The license for this project is yet to be finalized. We’ll choose one that both empowers the community and benefits this project :-)
This repository contains the LinkML code for NCHLOD. It includes the following components:
schema.yaml: Defines the schema for NCHLOD.