How monarch-initiative/monarch-app works
Project type and purpose
• This is a full-stack web application (“Monarch App”) comprising:
• A Vue.js single-page frontend (under frontend/) that runs in the browser.
• A Python library + FastAPI backend (monarch_py under backend/src/…) that exposes REST endpoints to drive the UI and also supports CLI tooling.
• A suite of adapters that connect the backend to multiple knowledge‐graph and NLP data stores (Solr, SQL, OAK triple store, spaCy).
• Infrastructure pieces (nginx reverse proxy, Dockerfiles, GitHub CI/CD workflows) to build, test, and deploy both tiers.
File structure
• Top-level: .github/workflows/ (CI, build, test, deploy), Makefile, mkdocs.yaml, and services/nginx/ for containerized deployment.
• frontend/: Vite-powered Vue 3 SPA with:
• src/api/ modules that wrap each FastAPI endpoint.
• src/components/, src/pages/, and src/router/ for UI structure.
• e2e/ and unit/ tests, plus Playwright & Vitest configs.
• backend/:
• src/monarch_py/api/: FastAPI routers, middleware.
• src/monarch_py/service/: business logic services (semsim, solr, curie).
• src/monarch_py/interfaces/: port definitions for search, entity, mapping, etc.
• src/monarch_py/implementations/: adapter (“hexagon”) modules for Solr, SQL, OAK, spaCy.
• src/monarch_py/datamodels/: pydantic schemas and YAML models.
• cli.py entrypoints for SQL and Solr command-line utilities.
• tests/: unit, integration, and API tests.
• Dockerfile + start_api.sh for containerized run.
README for additional insights
• Purpose: host an interactive UI over a massive biological knowledge graph, queryable via REST.
• Provides both a browser widget (Phenogrid) and a full standalone site.
• Encourages local dev via Docker, with scripted data‐generation and fixture tools under scripts/.