Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
7e50e9e
feat: working with offline sync
bwees Oct 1, 2026
e150e97
chore: format
bwees Oct 1, 2026
ec687fb
fix: stops are unique in directions
bwees Oct 2, 2026
1cb54d8
fix: api server override
bwees Oct 2, 2026
5e69b77
feat: offline fonts and glyphs
bwees Oct 4, 2026
2cbf3cb
feat: plan trips through the gateway and search stops locally
bwees Oct 19, 2026
c91a9d0
refactor: migrate route plan state to runed
bwees Oct 19, 2026
ec246ab
feat: offline pill
bwees Oct 19, 2026
3436e96
refactor: extract retry scheduler from live socket
bwees Oct 19, 2026
2025595
feat: retry failed syncs and fall back to full sync
bwees Oct 19, 2026
b3d3058
fix: only mark stop estimates unavailable when timetables are current
bwees Oct 19, 2026
e0ccdb5
chore: point dev builds at production api
bwees Oct 19, 2026
935fec2
refactor: replace moment with luxon
bwees Oct 21, 2026
cf11838
refactor: track live connection as one state
bwees Oct 21, 2026
36eac37
refactor: simplify sync manager state and drop unused failure reports
bwees Oct 21, 2026
d738a09
feat: validate gateway messages and sync lines with zod
bwees Oct 21, 2026
16c3164
refactor: share upcoming estimate logic between live and scheduled times
bwees Oct 21, 2026
93e2b09
chore: drop comments that restate code
bwees Oct 21, 2026
30f12e1
refactor: share stop estimate status messages and query
bwees Oct 21, 2026
64b1918
refactor: look up route tints on the theme manager
bwees Oct 21, 2026
a1f4bc0
fix: read route favorite from manager and show alert badge only with …
bwees Oct 21, 2026
e038826
refactor: simplify plan state and split route planning helpers
bwees Oct 21, 2026
1f97b55
fix: detect a dead live socket when the gateway stops answering pings
bwees Oct 21, 2026
8d0b24b
feat: show offline notice once at the top of the route stop list
bwees Oct 22, 2026
f640a24
fix: cap live socket reconnect backoff at 10 seconds
bwees Oct 22, 2026
e9aa6fa
fix: animate the offline pill away when back online
bwees Oct 22, 2026
520f7e8
feat: set app user agent with platform and version
bwees Oct 22, 2026
8a7936f
feat: report sync failures to the gateway
bwees Oct 22, 2026
aece1c2
chore: release 3.0.0
bwees Oct 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,9 @@ vite.config.js.timestamp-*
vite.config.ts.timestamp-*

*.pmtiles
static/map/sprites/
static/map/fonts/

dev.config.ts
dev.config.ts
# Copied from sql.js by `pnpm sqlite:wasm`
static/assets/sql-wasm.wasm
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@ bun.lockb

# Managed by release-please
/.release-please-manifest.json


# generated migration snapshots
/src/lib/db/migrations/meta
3 changes: 3 additions & 0 deletions android/app/capacitor.build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ android {

apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies {
implementation project(':capacitor-community-sqlite')
implementation project(':capacitor-app')
implementation project(':capacitor-app-launcher')
implementation project(':capacitor-filesystem')
implementation project(':capacitor-geolocation')
implementation project(':capacitor-preferences')
Expand Down
9 changes: 9 additions & 0 deletions android/capacitor.settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
include ':capacitor-android'
project(':capacitor-android').projectDir = new File('../node_modules/.pnpm/@capacitor+android@8.3.0_patch_hash=5f151b861cf2cde88167eece495aecb0862a61bea5115b27870_874123a7c3556940d002a867e09a2b84/node_modules/@capacitor/android/capacitor')

include ':capacitor-community-sqlite'
project(':capacitor-community-sqlite').projectDir = new File('../node_modules/.pnpm/@capacitor-community+sqlite@8.1.1_@capacitor+core@8.3.0/node_modules/@capacitor-community/sqlite/android')

include ':capacitor-app'
project(':capacitor-app').projectDir = new File('../node_modules/.pnpm/@capacitor+app@8.1.1_@capacitor+core@8.3.0/node_modules/@capacitor/app/android')

include ':capacitor-app-launcher'
project(':capacitor-app-launcher').projectDir = new File('../node_modules/.pnpm/@capacitor+app-launcher@8.0.1_@capacitor+core@8.3.0/node_modules/@capacitor/app-launcher/android')

include ':capacitor-filesystem'
project(':capacitor-filesystem').projectDir = new File('../node_modules/.pnpm/@capacitor+filesystem@8.1.2_@capacitor+core@8.3.0/node_modules/@capacitor/filesystem/android')

Expand Down
5 changes: 5 additions & 0 deletions capacitor.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { readFileSync } from 'node:fs';
import type { CapacitorConfig } from '@capacitor/cli';

const { version } = JSON.parse(readFileSync('./package.json', 'utf8'));

let devConfig: CapacitorConfig = {};
try {
//@ts-expect-error ts-ignore
Expand All @@ -12,6 +15,8 @@ const config: CapacitorConfig = {
appId: 'com.maroonrides.maroonrides',
appName: 'Maroon Rides',
webDir: 'build',
ios: { overrideUserAgent: `Maroon Rides App (iOS) v${version}` },
android: { overrideUserAgent: `Maroon Rides App (Android) v${version}` },
...devConfig,
};

Expand Down
7 changes: 7 additions & 0 deletions drizzle.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { defineConfig } from 'drizzle-kit';

export default defineConfig({
dialect: 'sqlite',
schema: './src/lib/db/schema.ts',
out: './src/lib/db/migrations',
});

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions ios/App/CapApp-SPM/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", exact: "8.3.0"),
.package(name: "CapacitorCommunitySqlite", path: "../../../node_modules/.pnpm/@capacitor-community+sqlite@8.1.1_@capacitor+core@8.3.0/node_modules/@capacitor-community/sqlite"),
.package(name: "CapacitorApp", path: "../../../node_modules/.pnpm/@capacitor+app@8.1.1_@capacitor+core@8.3.0/node_modules/@capacitor/app"),
.package(name: "CapacitorAppLauncher", path: "../../../node_modules/.pnpm/@capacitor+app-launcher@8.0.1_@capacitor+core@8.3.0/node_modules/@capacitor/app-launcher"),
.package(name: "CapacitorFilesystem", path: "../../../node_modules/.pnpm/@capacitor+filesystem@8.1.2_@capacitor+core@8.3.0/node_modules/@capacitor/filesystem"),
.package(name: "CapacitorGeolocation", path: "../../../node_modules/.pnpm/@capacitor+geolocation@8.0.0_@capacitor+core@8.3.0/node_modules/@capacitor/geolocation"),
.package(name: "CapacitorPreferences", path: "../../../node_modules/.pnpm/@capacitor+preferences@8.0.1_@capacitor+core@8.3.0/node_modules/@capacitor/preferences")
Expand All @@ -22,6 +25,9 @@ let package = Package(
dependencies: [
.product(name: "Capacitor", package: "capacitor-swift-pm"),
.product(name: "Cordova", package: "capacitor-swift-pm"),
.product(name: "CapacitorCommunitySqlite", package: "CapacitorCommunitySqlite"),
.product(name: "CapacitorApp", package: "CapacitorApp"),
.product(name: "CapacitorAppLauncher", package: "CapacitorAppLauncher"),
.product(name: "CapacitorFilesystem", package: "CapacitorFilesystem"),
.product(name: "CapacitorGeolocation", package: "CapacitorGeolocation"),
.product(name: "CapacitorPreferences", package: "CapacitorPreferences")
Expand Down
28 changes: 22 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
{
"name": "maroonrides",
"private": true,
"version": "2.0.3",
"version": "3.0.0",
"type": "module",
"scripts": {
"dev": "vite dev --host 0.0.0.0",
"build": "vite build",
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
"prepare": "svelte-kit sync && pnpm sqlite:wasm || echo ''",
"sqlite:wasm": "cp node_modules/sql.js/dist/sql-wasm.wasm static/assets/sql-wasm.wasm",
"api:generate": "openapi-typescript ../api/openapi.json -o src/lib/api/openapi.d.ts",
"db:generate": "drizzle-kit generate",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "prettier --check .",
"format": "prettier --write .",
"pmtiles": "./pmtiles/cstat.sh"
"pmtiles": "./pmtiles/cstat.sh",
"test": "vitest run"
},
"devDependencies": {
"@capacitor/cli": "^8.0.2",
Expand All @@ -24,22 +28,31 @@
"@tailwindcss/vite": "^4.1.18",
"@types/lodash-es": "^4.17.12",
"@types/luxon": "^3.7.2",
"@types/semver": "^7.8.0",
"@types/sql.js": "^1.4.11",
"bits-ui": "^2.18.1",
"clsx": "^2.1.1",
"drizzle-kit": "^0.31.11",
"openapi-typescript": "^7.13.0",
"prettier": "^3.8.1",
"prettier-plugin-svelte": "^3.4.1",
"prettier-plugin-tailwindcss": "^0.7.2",
"sql.js": "1.11.0",
"svelte": "^5.49.2",
"svelte-check": "^4.3.6",
"tailwind-merge": "^3.4.0",
"tailwind-variants": "^3.2.2",
"tailwindcss": "^4.1.18",
"tw-animate-css": "^1.4.0",
"typescript": "^5.9.3",
"vite": "^7.3.1"
"vite": "^7.3.1",
"vitest": "^5.0.2"
},
"dependencies": {
"@capacitor-community/sqlite": "^8.1.1",
"@capacitor/android": "8.3.0",
"@capacitor/app": "^8.1.1",
"@capacitor/app-launcher": "^8.0.1",
"@capacitor/core": "^8.3.0",
"@capacitor/filesystem": "^8.1.2",
"@capacitor/geolocation": "^8.0.0",
Expand All @@ -48,13 +61,16 @@
"@googlemaps/polyline-codec": "^1.0.28",
"@leveluptuts/svelte-fit": "^1.0.3",
"@tanstack/svelte-query": "^6.0.18",
"aggie-spirit-api": "^1.3.4",
"drizzle-orm": "^0.45.3",
"jeep-sqlite": "^2.8.0",
"lodash-es": "^4.18.1",
"luxon": "^3.7.2",
"maplibre-gl": "^5.17.0",
"mode-watcher": "^1.1.0",
"moment": "^2.30.1",
"openapi-fetch": "^0.17.0",
"pmtiles": "^4.4.0",
"runed": "^0.37.1",
"semver": "^7.8.5",
"zod": "^4.3.6"
}
}
24 changes: 24 additions & 0 deletions pmtiles/cstat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,27 @@ pmtiles extract \
--bbox="$BBOX" \
--minzoom=0 \
--maxzoom=15

ASSETS_BASE="https://protomaps.github.io/basemaps-assets"
MAP_DIR="$SCRIPT_DIR/../static/map"

SPRITE_THEMES=(light dark)
SPRITE_FILES=(".json" ".png" "@2x.json" "@2x.png")

for theme in "${SPRITE_THEMES[@]}"; do
mkdir -p "$MAP_DIR/sprites"
for file in "${SPRITE_FILES[@]}"; do
curl -fsSL "$ASSETS_BASE/sprites/v4/$theme$file" -o "$MAP_DIR/sprites/$theme$file"
done
done

FONTS=("Noto Sans Regular" "Noto Sans Medium" "Noto Sans Italic")
# Basic Latin, Latin-1, Latin Extended A/B, IPA, combining diacritics, general punctuation, currency/letterlike symbols
GLYPH_RANGES=(0-255 256-511 512-767 768-1023 8192-8447 8448-8703)

for font in "${FONTS[@]}"; do
mkdir -p "$MAP_DIR/fonts/$font"
for range in "${GLYPH_RANGES[@]}"; do
curl -fsSL "$ASSETS_BASE/fonts/${font// /%20}/$range.pbf" -o "$MAP_DIR/fonts/$font/$range.pbf"
done
done
Loading
Loading