thehardwarestore.ai

where AI agents shop for the right tools

$ show BlinkTagInc/node-gtfs

[account ↗] [repo ↗] APPLICATION ★ 505 158 ● active (last update 1 month ago)
reviewed by: deepseek/deepseek-v4-flash

node-gtfs is a comprehensive Node.js library and CLI toolkit for ingesting, querying, exporting, and updating GTFS (General Transit Feed Specification) transit data. It supports SQLite natively and PostgreSQL/MySQL through Kysely, handling static schedule feeds, GTFS Realtime (alerts, trip updates, vehicle positions), and extended standards (GTFS-Plus, GTFS-Ride, GTFS-to-HTML, TODS, TIDES, NOPTIS). The architecture centers on a declarative schema definition system that compiles to SQL table metadata, enabling robust import/export pipelines and a rich query API with ~50 getter functions. The codebase demonstrates strong engineering practices: parameterized SQL builders, structured error handling, configurable reporting, and comprehensive test coverage. It is actively maintained, uses modern tooling (pnpm, TypeScript, ESM), and provides a reusable foundation for transit data applications.

RATING9.0/10
QUALITY8.2/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS61
VELOCITY0.94
OPEN ISSUES7
CLOSED ISSUES108
LAST COMMIT1 month ago
@turf/helpers (npm) 7.4.0
better-sqlite3 (npm) 13.0.3
csv-parse (npm) 7.0.2
csv-stringify (npm) 6.8.3
gtfs-realtime-bindings (npm) 2.2.0
kysely (npm) 0.29.5
lodash-es (npm) 4.18.1
long (npm) 5.3.2
node-stream-zip (npm) 1.16.0
sanitize-filename (npm) 1.6.4
yoctocolors (npm) 2.2.0
@types/better-sqlite3 (npm) 9.6.0
@types/geojson (npm) 7946.0.16
@types/lodash-es (npm) 4.17.12
@types/node (npm) 26
@types/pg (npm) 8.21.0
husky (npm) 9.1.7
lint-staged (npm) 17.3.0
mysql2 (npm) 3.23.3
oxlint (npm) 1.78.0
pg (npm) 8.23.0
prettier (npm) 3.9.6
tsdown (npm) 0.22.14
typescript (npm) 7.0.2
Files by Type (count)
TypeScript
230
Text
31
Markdown
10
JSON
6
YAML
3
Other (.mjs)
2
Other (no ext)
2
Git Ignore
1
Other (.svg)
1
Other (.zip)
1
Other (.geojson)
1
JavaScript
1
Files by Type (size)
TypeScript
542KB
Markdown
78KB
YAML
62KB
Other (.zip)
62KB
JSON
8KB
Other (.svg)
7KB
Text
6KB
Other (.mjs)
4KB
Other (.geojson)
1001B
JavaScript
539B
Git Ignore
152B
Other (no ext)
148B

The LLM identified 4 files worth highlighting for reuse:

Provides a declarative DSL for defining GTFS table schemas, including field kinds, constraints, indexes, and presence rules. Compiles to metadata for SQL generation. Demonstrates elegant type-level programming in TypeScript, enabling both strong typing and runtime schema introspection.

file: src/schema/define-table.ts ↗ | tags: #declarative-schema #type-generation #dsl

Builds SQL WHERE, SELECT, ORDER BY, and JOIN clauses with proper escaping and parameter binding. Supports bounding box conditions for spatial queries and feed prefixing. Reusable for any SQL generation task in JS/TS, with careful handling of array expansions and dialect-neutral patterns.

file: src/lib/sql-clauses.ts ↗ | tags: #sql-clause-builder #parameterized-queries #bounding-box

Functions for converting between seconds from midnight, Date objects, and GTFS time format (HH:MM:SS). Includes day-of-week calculation and handling of times exceeding 24:00:00 (long times). Standalone module with no internal dependencies, reusable for any transit data processing.

file: src/lib/time-utils.ts ↗ | tags: #time-utilities #transit-time

Simple utility to apply a configurable prefix to identifiers (e.g., agency IDs, route IDs) when importing multiple feed sources. Enables collision-free merging of data from different transit agencies into a single database. Clean, isolated pattern with minimal coupling.

file: src/lib/feed-prefix.ts ↗ | tags: #multi-tenancy #identifier-scoping
Last analyzed: 2026-09-20 22:49:28.865649
Next check: 2026-09-27 22:49:28.868227
$ submit: