A local system that syncs Strava training activities, calculates running statistics (weekly km, pace), and displays them in a web dashboard.
- Status: Specification Complete (v0.3)
- Primary Language: Goal (with Go extensions)
- Frontend: Svelte
- Database: SQLite
running/
βββ specs/ # Spec-Driven Development documents
β βββ strava_dashboard_spec_v0.3.md # Main project specification
β βββ constitution.md # Project principles & governance
β βββ tasks.md # Implementation task breakdown
β βββ adrs/ # Architecture Decision Records
β βββ ADR-1_goal_language.md
β βββ ADR-2_http_extension.md
β βββ ADR-3_web_serving.md
β βββ ADR-4_svelte_frontend.md
β βββ ADR-5_sqlite_extension.md
βββ goal/ # Goal source files (TODO)
βββ extensions/ # Goal extensions in Go (TODO)
βββ frontend/ # Svelte app (TODO)
βββ static/ # Svelte build output (TODO)
βββ .gitignore
βββ README.md
βββ .env.example # Environment template (TODO)
- Goal Language: Install from codeberg.org/anaseto/goal
- Go: Required for building Goal extensions (v1.20+ recommended)
- Node.js: Required for Svelte frontend (v18+ recommended)
The project builds a custom Goal interpreter (strava_goal) that bundles the
standard Goal extensions plus the project's own extensions (currently http).
# From the repository root:
go build -o strava_goal ./cmd/strava_goal
# Run the http extension smoke-test script:
./strava_goal extensions/http/test_http.goal
# Run the Go unit tests for the http extension:
go test ./extensions/http/...The Go module is rooted at github.com/mandus/runningdash and depends on
codeberg.org/anaseto/goal from the module proxy β no local Goal checkout is
required.
# Clone the repo
git clone <repo-url>
cd running
# Set up environment
cp .env.example .env
# Edit .env with your Strava tokens
# Install Svelte dependencies
cd frontend
npm install
cd ..
# Build Svelte for production
cd frontend
npm run build -- --outDir ../static
cd ..
# Run the application
goal run main.goal
# Access dashboard at http://localhost:8080| Document | Purpose |
|---|---|
| specs/strava_dashboard_spec_v0.3.md | Full project specification |
| specs/constitution.md | Principles, governance, standards |
| specs/tasks.md | Implementation task breakdown |
| specs/adrs/ | Architecture decisions |
See specs/tasks.md for detailed task breakdown.
- Goal extensions for HTTP, SQLite, JSON
- Development environment setup
- Strava API client
- Database schema and sync logic
- Pace and distance calculations
- Weekly aggregation
- HTTP server extension
- API endpoints
- Svelte dashboard with charts
- End-to-end testing
- Documentation
- Error handling
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Strava Training Dashboard β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββ β
β β Strava β β SQLite β β Goal Core β β
β β API ββββββ€ Database ββββββ€ (sync, stats) β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββββββ β
β β² β² β² β
β β β β β
β βββββββββ΄ββββββββ βββββββββ΄ββββββββ βββββββββ΄ββββββββ β
β β HTTP Ext β β SQLite Ext β β JSON Ext β β
β β (Go + Goal) β β (Go + Goal) β β (Go + Goal) β β
β βββββββββ¬ββββββββ βββββββββ¬ββββββββ βββββββββββββββββββ β
β β β β
β ββββββββββββ¬ββββββββ β
β β β
β ββββββββΌββββββββ β
β β HTTPS Ext β β
β β (Go + Goal) ββββββ β
β ββββββββ¬ββββββββ β β
β β β β
β βββββββββββ΄βββββββββ β β
β β Goal Backend β β β
β β (main.goal) ββββ β
β βββββββββββ¬βββββββββ β
β β β
β ββββββββΌββββββββ β
β β Svelte β β
β β Frontend β β
β β (static files)β β
β ββββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
This project follows Spec-Driven Development (SDD) methodology:
- Specifications are the source of truth
- All features start with a spec update
- Implementation must match acceptance criteria
- Architecture decisions are documented as ADRs
Spec Update β Task Breakdown β Implementation β Validation β Merge
- Before coding: Update the spec and create/approve ADRs for architectural changes
- Task tracking: Update specs/tasks.md with progress
- Code reviews: Reference spec sections and ADRs in PR descriptions
Goal extensions are written in Go. Install Go first:
Linux (Debian/Ubuntu):
sudo apt update && sudo apt install -y golang-goLinux (Alpine):
sudo apk add goMac:
brew install goVerify:
go versionClone and install Goal from source:
# Clone Goal repository
git clone https://codeberg.org/anaseto/goal.git
cd goal
# Build and install with full tags (required for extensions)
go build --tags full ./cmd/goal
go install --tags full ./cmd/goal
# Verify installation
goal versionNote: The --tags full flag enables all features needed for extension development.
go get github.com/mattn/go-sqlite3To enable automatic SDD consistency checks before each commit:
# Copy the hook to .git/hooks
cp scripts/pre-commit .git/hooks/pre-commit
# Make it executable
chmod +x .git/hooks/pre-commitThis hook verifies:
- Exactly one versioned spec file exists
- AGENTS.md uses version-agnostic references (
specs/strava_dashboard_spec_*.md) - All required SDD files exist (constitution, tasks, ADRs)
- Spec contains all required sections
.git/hooks/pre-commit- End User: Runner who wants to track training stats
- Developer: You (implementing the system)
- Strava: API provider
Not specified yet. Add LICENSE file when ready.