A web application for exploring prosopographical data from the Syriaca.org project, built with vanilla JavaScript (ES modules) and SPARQL queries against an AWS Neptune triplestore.
Developers: for detailed, code-accurate technical documentation (architecture, boot lifecycle, SPARQL query construction, caching, Neptune/API Gateway backend, local development, and operations), see
TECHNICAL.md.
SPEAR provides an interactive interface for searching and analyzing historical persons, events, and relationships from Syriac sources. Search runs against a public SPARQL endpoint backed by a Neptune database. To reduce load, default and simple views are served from bundled JSON snapshots, and only complex facet combinations issue live SPARQL queries.
- Person search — find individuals by name, occupation, gender, relationships, and associated places.
- Event search — explore historical events, filtering by participants, places, event keywords, and sources.
- Relation search — explore documented relationships, filtering by source and relationship type.
- Multi-select facets — combine events, relationships, places, occupations, gender, and sources.
- Source filtering — Letters of Severus, Lives of the Eastern Saints, Chronicle of Edessa. (Selecting all three is treated as no source filter.)
- Uncertainty filter — exclude claims by certainty level.
- Geographic filtering — birth place, death place, residence, and event place.
- Shareable URLs — active mode and facet selections are encoded in the URL.
- JSON-first — default/simple views read from bundled JSON; live SPARQL is a fallback for complex facet combinations.
- Client-side caching — facet menus and event-factoid results are cached in
localStorage(24h TTL) to reduce endpoint traffic. - Backend safeguards — API Gateway throttling plus a Neptune query timeout
(
neptune_query_timeout) protect the triplestore.
- Vanilla JavaScript, no build step — plain ES modules, no bundler or
package.json. - Mode router (
mode.js) — routes betweenperson,event, andrelationmodes based on the?type=URL parameter; manages mount lifecycle and browser history. - Per-mode modules (
modes/*.js) — each exportssidebar,bind,fetch, andrender. - Query builders (
{person,event,relation}/search.js) — construct SPARQL from facet state and fetch results. - Responsive UI — Bootstrap-based sidebar with collapsible filter sections.
- SPARQL over HTTP GET — requests use
?query=<url-encoded>withAccept: application/sparql-results+json. - AWS Neptune — cluster (writer + reader) in a VPC, reached via API Gateway → VPC Link → NLB, targeting the reader endpoint.
- Error handling — failed/timed-out queries degrade to empty results.
See TECHNICAL.md for the full backend topology, security
posture, and tuning guidance.
- A modern browser with JavaScript enabled.
- Access to the configured SPARQL endpoint.
No build step. Serve the folder over HTTP (ES modules and localStorage do not
work under file://):
python3 -m http.server 8000
# then open http://localhost:8000/browse.htmlAlternatives: npx serve, or the VS Code "Live Server" extension.
CORS: the SPARQL endpoint must allow your local origin (e.g.
http://localhost:8000); otherwise browser fetches fail with a CORS error even when the query is valid.
- Open
browse.html. - Choose a search mode (Person, Event, or Relation).
- Apply filters in the sidebar.
- View results in the main panel.
- Share the search via the URL.
SPARQL_ENDPOINT is defined in each search/menu module:
menu.js,list.jsperson/search.js,event/search.js,relation/search.js
- 24h TTL in
localStorage; shared helperfetchWithCacheinmenu.js. - Cache key prefixes:
dropdown_,keywordListV2_,keywordPrettyV1_,eventFactoidsV1_. - Call
clearMenuCache()(inmenu.js) to purge all cached menu/result data — e.g. after a Neptune data refresh.
- SPEAR prosopography graph:
https://spear-prosop.org - Syriaca persons graph:
http://syriaca.org/persons#graph - Place labels graph:
http://syriaca.org/geo#graph - Source collections: Letters of Severus, Lives of the Eastern Saints, Chronicle of Edessa
Requires ES6 modules, the Fetch API, localStorage, and CSS Grid/Flexbox.
Recent Chrome/Edge, Firefox, and Safari are supported.
spear/
├── browse.html # production entry
├── dev.html # development entry
├── mode.js # mode router / boot lifecycle
├── filter.js # shared filter state + URL sync
├── menu.js # facet menu queries + caching (fetchWithCache, clearMenuCache)
├── list.js # event-concept / ethnicity menu loader + caching
├── modes/
│ ├── person.js
│ ├── event.js
│ └── relation.js
├── person/ { search.js, person.json, README.md }
├── event/ { search.js, person.json, README.md }
├── relation/ { search.js, *.json, batch_query_*.sh }
├── utils/ { cleanUi.js, url.js }
├── aggregate/ # static person/place/taxonomy HTML pages
└── CTS/ # CTS resolver (XQuery) — separate subsystem
- Add the UI control to the relevant mode's
sidebar/bind(modes/*.js). - Add the facet to the filter state and to
FILTER_MAPinfilter.js. - Extend the SPARQL query builder in the relevant
*/search.js. - Add URL parameter handling so the facet is shareable.
Open source — see the original Srophé Application license terms.
See LICENSE §3.