Back
Vidik: Offline-first national route planner with a dual-plane data and sync model
VIDIK VIDIK VIDIK

Vidik

Offline-first national route planner with a dual-plane data and sync model

Vidik is a progressive web app that turns Serbia’s offbeat single-sights into effortless day trips, focused on one simple loop: see what is near you, grab a curated route, launch Google Maps, go, and tick it off.

ivanprtljaga/vidik

52

Hours

1.5

Weeks

148

Commits

Solo Developer

Role

Private
About

Vidik is a location based day route planner for Serbia’s offbeat single-sights, designed around a tight loop of discovery, routing, and simple check offs. Instead of broad city guides, it focuses on discrete places you can stand in front of for about thirty minutes, from spomeniks and brutalist structures to natural oddities, all sorted by real driving distance from your door. Screenshot 1 illustrates this Nearby experience, where a chosen starting point such as Belgrade drives ranked results enriched with tags, accessibility notes, and visit tracking.

The project intentionally keeps the backend tiny by treating curated content as static, typed data that lives in the repository and is validated at build time with Zod. User state for visited places is handled through a local first model, writing to localStorage and syncing to a single Supabase Postgres table only when the user opts into Auth, making the Passport view in Screenshot 4 privacy friendly yet available across devices. Next.js App Router, React, and strict TypeScript form the core stack, while Leaflet and leaflet.markercluster render the nationwide map in Screenshot 5, and next-intl ensures the UI is bilingual from day one.

The UX is packaged as a PWA built with @serwist/next, so Vidik installs like an app on phones without any app store dependency. The tab based AppShell layout shown in Screenshot 0 keeps Nearby, Routes, Map, and Passport accessible at all times, while route detail views like “Monasteries of Fruška Gora” in Screenshot 3 combine an interactive map with deep linked Google Maps navigation for a one tap launch to the road. Overall, Vidik demonstrates how a carefully constrained product and a lean technical stack can still deliver a rich travel planning experience for an entire country.

Key Features

Tabbed AppShell layout composes Nearby, Routes, Passport, and detail screens under src/app/[locale]/(tabs)/layout.tsx for a consistent mobile first navigation.

Leaflet and leaflet.markercluster power an interactive /map view that clusters all sights into a dark themed national map, as seen in Screenshot 5.

Static place and route content is stored in the repo and accessed via helpers like getPlace and getRoute in src/data/index.ts, with Zod validating schemas at build time.

Local first visit tracking keeps check offs in localStorage and optionally syncs them to a single Supabase Postgres table defined in supabase/schema.sql.

next-intl handles bilingual UI chrome with Serbian default and English secondary locales, configured via messages/sr.json and messages/en.json and middleware.ts.

Google Maps deep links from place and route detail screens (Screenshot 2 and Screenshot 3) start navigation without any Maps JavaScript API or server side calls.

Nearby screen (Screenshot 1) computes and ranks day trip destinations by distance from a chosen home point, while exposing bucket filters like monument and brutalism.

Curated day routes such as “Monasteries of Fruška Gora” (Screenshot 3) display stop lists, total distance, and map visualization, audited via scripts/audit-routes-dossier.ts.

Passport view (Screenshot 4) presents visited places as a visual grid with progress metrics like 12 of 192 seen, backed by the same check off state model.

PWA capabilities are wired with manifest.webmanifest and @serwist/next service worker configuration in src/sw.ts for installable offline friendly usage.

Visual Showcase

This composite mockup highlights the overall product story and navigation structure, showing how the AppShell keeps key tabs persistent while the Next.js PWA installation flow makes Vidik feel like a native travel app.

Here the core discovery experience is visible, where static place data is filtered and ranked at runtime, and the starting point selector personalizes results while maintaining the local first check off model.

This screen connects curated content to real navigation, leveraging Leaflet for precise visualization and simple URL based integration with Google Maps rather than heavy mapping APIs.

The route view demonstrates Vidik’s day route abstraction, using static route data and Leaflet mapping to bundle several places into a coherent itinerary while keeping both UI and backend minimal.

This feature turns the user’s travel history into a stamp like passport, driven entirely by the lightweight two plane data model that separates static content from user state and sync.

The map view represents the whole Serbian dataset in a single interface, with marker clustering and bucket chips enabling exploration at different zoom levels without overwhelming the user.

Built with
TypeScriptNext.jsReactLeafletLeaflet.markerclusterZodPostgreSQL (via Supabase)
Impact

Vidik helps travelers quickly discover, route, and track offbeat single-sight trips across Serbia from their current doorstep, even on flaky or offline connections.