A simple hiking log app; the companion source code for the "API Design for Mobile Engineers" course. Users log hikes: trail name, distance, date, and notes.
This repo has two halves:
trailkeep_backend/— a Dart Shelf + Postgres APItrailkeep/— the Flutter client
Each has its own README with setup steps and a table mapping course lessons to the exact files that demonstrate them.
A look at the app:
![]() |
![]() |
| List of hikes | Hike detail |
# 1. Backend
cd trailkeep_backend
cp .env.example .env
docker compose up -d
psql postgresql://trailkeep:trailkeep@localhost:5432/trailkeep -f lib/db/schema.sql
dart pub get
dart run bin/server.dart
# 2. Frontend (in a separate terminal)
cd trailkeep
flutter pub get
flutter runEvery lesson in the course references Trailkeep as its running example. This code isn't meant to be a production-ready app; a few things are deliberately simplified for teaching clarity:
- Token signing uses HMAC-SHA256 directly rather than a full JWT library.
- The in-memory cache only covers the first page of hikes.
- There's no offline/persisted storage layer (that's flagged in Lesson 7 as a natural next topic, not covered here).
- Here are examples of persisted storage solutions you can use:
If you're following the course, the READMEs in trailkeep_backend/ and
trailkeep/ each have a table linking specific files back to the lesson
that introduces them.

