# Stećak Oracle: Exploring Medieval Stone Monuments with Sanity and Gemini
I decided to build something around a subject that is very close to where I live: stećci , the medieval tombstone monuments found across Bosnia and Herzegovina and neighboring countries. The result is Stećak Oracle , a small knowledge-driven web application that combines Sanity , Next.js , and Google Gemini . The idea is simple: Store structured historical information in Sanity, then let an AI…
I built Stećak Oracle to explore medieval stone monuments called stećci, which are found throughout Bosnia and Herzegovina, Croatia, Montenegro, and Serbia. The project uses Sanity, Next.js, and Google Gemini to create a knowledge-driven web application. Stećci are medieval tombstones, and there is a wealth of historical information about them, but I wanted to approach the subject from a developer's perspective by creating a structured knowledge system.
The application contains several key components:
- Individual stećak records, which include information such as the name, location, historical period, and inscription motifs.
- Motifs, which are separate documents because the same motif can appear on multiple monuments.
- Sources, which are also separate documents. For the initial dataset, I used information from the UNESCO World Heritage Centre.
The frontend of the application is built with Next.js and TypeScript. It includes several main areas:
- Home
- /stecci (where individual stećak records are displayed)
- /motifs (motif information)
- /sources (source information)
- /oracle (the AI interface)
When a user asks a question through the Oracle page, the frontend sends the question to a Next.js API route. This route retrieves the knowledge base from Sanity, which includes stećci, motifs, and sources. The data is then serialized and included in the Gemini prompt, asking the model to answer the question while ensuring historical facts are not invented, documented facts are distinguished from interpretations, and the answer is concise if the available information is insufficient.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.