A full-stack application for tracking travels, visits, and locations with interactive maps, statistics, and user management.
- Node.js with Express (v5) - Main API
- Java 21 with Quarkus 3 - Statistics Service
- MongoDB with Mongoose
- RESTful API architecture
- Next.js 16 (App Router, Turbopack) with React 19
- TypeScript
- Tailwind CSS v4 with shadcn/ui components
- Leaflet for interactive maps
- Recharts for data visualization
- Docker Compose for containerization
- MongoDB database service
timeline-app/
βββ backend/ # Express API server
β βββ controller/ # Request handlers
β βββ domain/ # Pure business rules & value objects
β βββ events/ # In-process event emitter (publisher/subscriber)
β βββ error/ # Custom error types (BusinessRuleError)
β βββ models/ # Mongoose schemas
β βββ routes/ # API routes
β βββ services/ # Business logic
β βββ test/ # Node test runner tests
β
βββ statistics-service/ # Quarkus Stats microservice (Java 21)
β βββ src/ # Source code
β βββ pom.xml # Maven dependencies
β
βββ frontend-v2/ # Next.js application
β βββ src/
β βββ app/ # Routes under [locale] (Server Components)
β βββ components/ # React components
β βββ hooks/ # Custom React hooks
β βββ services/ # API client services
β βββ contexts/ # React contexts
β
βββ e2e/ # Playwright test suite (runs against the full stack)
βββ docs/ # ADRs, software design docs
βββ curl-examples/ # Known-good curl one-liners for the API
βββ postman/ # Postman collections
- Docker and Docker Compose
- Node.js 22+ (for local backend/frontend/tooling development)
- Clone the repository:
git clone <repository-url>
cd timeline-app- Create a
.envfile in the root directory from the template:
cp .env.example .env- (Optional) Create a
frontend-v2/.env.localfor user defaults:
# Set a default user ID for auto-login (prevents Guest mode)
NEXT_PUBLIC_DEFAULT_USER_ID=1- Start all services:
docker compose up --build -dThis will start:
- MongoDB on port
27017 - Backend API on port
3000 - Statistics Service on port
8081 - Frontend on port
3002
β οΈ Important: When making changes to the frontend code, always use the--buildflag to force a rebuild:docker compose up --build -dThis ensures Next.js recompiles with your latest changes.
- Open your browser:
http://localhost:3002
cd backend
npm install
npm startcd statistics-service
./mvnw quarkus:devThe service will run on http://localhost:8081.
cd frontend-v2
npm install
npm run devThe frontend will run on http://localhost:3002 (Next.js default).
cd e2e
npm install
npm test # run the full suite against the running stack
npm run test:ui # interactive UI mode
npm run codegen # record new testsThe full stack must be running locally (see Docker Quick Start above) before running E2E tests.
cd frontend-v2
npm test- Travel Tracking: Record and manage travels between locations with duration and distance
- Visit Management: Track visits to locations with weighted statistics
- Location Management: Create and manage locations with coordinates
- Interactive Maps: Visualize travels on Leaflet maps
- Statistics Dashboard: View travel statistics, charts, and analytics
- User Management: Multi-user support with data isolation
- Date Range Filtering: Filter data by custom date ranges
- Cross Management: Manage travel crosses and intersections
The full endpoint reference (query params, request/response shapes) lives in backend/API_DOCUMENTATION.md. Quick map:
/locations- Location CRUD operations/travels- Travel management/visits- Visit tracking/crosses- Cross management/users- User management/api/v2/stats- Statistics & map geometry (Quarkus service, port 8081)
Quick command reference (all local dev workflows are in Getting Started):
| Package | Command | Description |
|---|---|---|
backend |
npm test |
Run backend tests (node:test) |
frontend-v2 |
npm test |
Run Vitest unit tests |
frontend-v2 |
npm run lint |
Run ESLint |
frontend-v2 |
npm run build |
Production build / typecheck |
e2e |
npm test |
Run Playwright E2E suite |
- See
DOCS.mdfor detailed documentation - See
CHANGELOG.mdfor version history - See
docs/ADR.mdfor architecture decisions - See
CLAUDE.mdfor repo-wide conventions
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
ISC




