You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Real-time pilgrimage tracking β Utrecht to Santiago de Compostela
Wanderer is the backend for a real-time pilgrimage tracking platform built for my walk from Utrecht to Santiago de Compostela β roughly 48 days and 50 km per day. It lets friends, family, and anyone following along see where I am, read updates, leave comments, and watch achievements unlock as the journey unfolds.
The system is built on a CQRS (Command Query Responsibility Segregation) architecture with three independently deployable Spring Boot services backed by PostgreSQL, connected to a companion frontend through REST APIs and WebSockets.
Create trips with configurable visibility (Public, Private, Protected) and modality (Simple or Multi-Day)
Post location updates with GPS coordinates, altitude, battery level, and messages
Automatic polyline generation from location history
Reverse geocoding of coordinates into city and country
Day-by-day tracking for multi-day trips with start/end day toggling
Trip status lifecycle: Created β In Progress β Paused / Resting β Finished
Social
Friend requests with accept/decline workflow
Bidirectional friendships that unlock access to Protected trips
User follows for one-directional social connections
Public trip discovery and promoted/featured trips
Comments & Reactions
Threaded comments on trips with one level of nesting (replies)
Five reaction types on comments: β€οΈ Heart, π Smiley, π’ Sad, π Laugh, π Anger
Achievements
25 predefined achievements across categories: distance milestones, update counts, trip duration, and social milestones (followers, friends)
Automatic unlock when thresholds are reached during trip updates
Per-user and per-trip achievement queries
Real-Time Updates
WebSocket endpoint at /ws with 24 event types
Live broadcasting to topic channels (/topic/trips/{tripId}, /topic/users/{userId})
Events for trip changes, comments, reactions, friend requests, follows, achievements, and polyline updates
Administration
Admin role promotion and demotion
Bootstrap admin mechanism for initial setup
Trip polyline and geocoding recomputation
Trip promotion with donation link support
Trip maintenance statistics dashboard
User and credential management
Weather
Google Weather API integration for live weather conditions at the current location
Email
Email verification on registration
Password reset with time-limited, one-time-use tokens
Configurable SMTP provider
π Getting Started
Prerequisites
Java 21 β required
Maven 3.6+ β required
Docker β optional, for running the full stack locally
PostgreSQL 16 β required if running without Docker
Build
# Build all modules
mvn clean install
# Build a single module
mvn clean install -pl wanderer-command
# Format code (run before committing)
mvn spotless:apply
# Run tests with coverage
mvn clean verify
Register β email verification link sent β verify email β account activated
Login β returns a short-lived access token (15 min default) and a long-lived refresh token (7 days)
Refresh β exchange a valid refresh token for a new token pair (rotation policy β old refresh token is revoked)
Logout β access token blacklisted by JTI, all refresh tokens revoked
Authorization
Role-based access: USER and ADMIN roles enforced with Spring Security @PreAuthorize
Protected trips visible only to friends of the owner
Public endpoints: registration, login, token refresh, password reset, public trips, user profiles
Admin endpoints: user promotion, trip maintenance, statistics
Token Storage
All tokens (refresh, password reset, blacklist) are hashed with SHA-256 before being stored in the database. Expired tokens are cleaned up automatically.
π³ Deployment
Docker Compose
The included docker-compose.yml runs the full stack:
postgres-cqrs β PostgreSQL for command and query services (port 5432)
postgres-auth β PostgreSQL for the auth service (port 5433)