This tool uses a Puppeteer scraper and Google's Gemini API to search, download, and analyze court entries from the official e-Oglasna ploča (e-Bulletin Board).
It is a full-stack, single-tenant application: a user submits an OIB, case number, or free-text search, and the system runs a court-analysis pipeline that returns a structured report with a progress stream. Analysis runs and their events are persisted locally to JSON files on the backend — no database or user accounts are required.
It came about as I was trying to build a dataset of legal information in Croatian as a pretraining for an LLM, but noticed that Google has already scraped most of the threads, topics and webpages I was interested in, which led me to just use it as-is.
Accessing and understanding court records is a challenging process for the average person. The official portal provides data but lacks analysis tools or any kind of insight. This project tries to address that by providing a "one-click" analysis pipeline.
Users can enter a person's ID (OIB), a case number, or free text, and the system will:
- Automate a browser to search the official court portal.
- Download the latest case documents (PDFs, DOCX, etc.).
- Extract the text, using OCR as a fallback for scanned documents.
- Send the text to the Google Gemini AI for summarization and structured data extraction.
- Present a clear, comparative analysis to the user.
The scraper part can be adapted reasonably well to any other country's court case website, or a database.
This project is GPLv3 licensed (LICENSE.md).
- Real-time Court Search: Scrapes the official portal in real-time using a search term.
- Automated Document Processing: Downloads, unzips, and extracts text from various document formats.
- AI-Powered Summarization: Leverages the Google Gemini API to generate concise, human-readable summaries of complex legal texts in Croatian.
- Comparative Analysis: Analyzes documents from multiple court entries for the same case to highlight progress and changes.
- Discovery + Reasoning: The analysis pipeline first discovers case clusters from search metadata, then selects one cluster and generates one structured report for it.
- Analysis History: Runs and their SSE events are persisted locally (JSON files); the Dashboard lists past runs and streams live progress on the detail page.
- Frontend: React, Tailwind CSS, React Router, react-markdown, Mermaid
- Backend: Node.js, Express.js
- Persistence: Local JSON files (
backend/data/analysis/) - Web Scraping: Puppeteer, Browserless.io (for production deployment)
- AI & NLP: Google Gemini API via
@langchain/google-genai - Deployment: Render
- Node.js (v18 or later)
- npm
-
Clone the repo:
git clone https://github.com/your-username/your-repo-name.git cd your-repo-name -
Install Backend Dependencies:
cd backend npm install -
Install Frontend Dependencies:
cd ../simple-chat npm install -
Set up Environment Variables: Copy
backend/.env.exampletobackend/.envand fill in your values. The backend refuses to start withoutGOOGLE_API_KEY:# .env in /backend GOOGLE_API_KEY="your_google_ai_studio_api_key" # Required — server exits at startup if missing CORS_ORIGIN="http://localhost:3000" # Optional; frontend dev origin GEMINI_MODEL="gemini-2.5-flash" # Optional; override the Gemini model across the pipeline GEMINI_REQUEST_TIMEOUT_MS=30000 # Optional; per-request timeout before the fail-fast guard aborts GEMINI_RETRY_TIMEOUTS=1 # Optional; retry timeout AbortErrors with backoff (paid keys), "0" to disable BROWSERLESS_TOKEN="your_browserless_io_api_key" # Optional, for production scraping # Optional: ANALYSIS_DATA_DIR=/absolute/path/to/data
The frontend dev server (Vite, port 3000) proxies
/apito the backend on port 3001, so no frontend env vars are required locally. Override withsimple-chat/.env.localif needed:# .env.local in /simple-chat VITE_API_URL="http://localhost:3001/api"
-
Start the Backend Server:
cd backend npm start -
Start the Frontend Development Server:
cd simple-chat npm startOpen http://localhost:3000 to view it in the browser.
Use three terminals for live browser smoke tests.
- Install dependencies:
cd backend && npm ci
cd ../simple-chat && npm ci- Start backend (Terminal A):
cd backend
npm run start- Start frontend (Terminal B):
cd simple-chat
npm run start -- --host 127.0.0.1 --port 3000- Run test lanes (Terminal C):
cd backend
npm run test:unit
npm run test:integration
npm run test:e2e:smokeOptional combined live suite:
cd backend
npm run test:nightly-liveIf your local URLs differ, override smoke endpoints:
cd backend
SMOKE_BACKEND_HEALTH_URL=http://127.0.0.1:3001/health \
SMOKE_FRONTEND_URL=http://127.0.0.1:3000 \
npm run test:e2e:smokeSmoke failure artifacts are written to:
backend/test-artifacts/puppeteer-smoke/
Alimentacija.info je web aplikacija koja koristi umjetnu inteligenciju za automatsko pretraživanje, analizu i sažimanje sudskih objava s hrvatske e-Oglasne ploče. Alat pomoću scrapera (Puppeteer) preuzima dokumente, a zatim ih pomoću Google Gemini AI modela pretvara u razumljive sažetke. Cilj projekta je učiniti složene pravne informacije dostupnijima običnim građanima, i olakšati praćenje predmeta.
Možete isprobati funkcionalnost uz vlastiti OIB, OIB neke druge pravne ili fizičke osobe, kao i kroz njihova imena i nazive.