Commit graph

7 commits

Author SHA1 Message Date
Levi Lesches
d0387c7aa2
Working "find a path" code (#13)
The client first requests stops from the TS server (`0.0.0.0:80`), then the path from the Dart server (`localhost:8001`). It will be trivial to move the TS logic to the Dart server since the Dart server is the one that parsed all that data, and it's anyway in a `JSON` file. 

There is a `server/GET_ROUTES.json` file, but it's not needed. I just included it for easier debugging. `server/GET_STOPS.json` includes both the stops and the routes, and the client does some (inefficient) work to re-organize it.

The Dart server uses a basic A* implementation to sort find direct routes and routes with transfers. The A* logic is in `src/shared/lib/src/graph/graph.dart`. This file defines the state itself, and `package:a_star` on Pub.dev (mine) defines the algorithm. `src/shared/bin/path.dart` is the whole of the Dart server. 

TODO: 
- add unit tests
- this PR breaks almost nothing, so there is duplicate work being done on the client and some unused logic
- return a structured path object for the client to use as it wants. This PR just sends a well-formatted string
2025-05-02 19:55:59 -04:00
Levi Lesches
c878d08c23
Move data parsing definitions out of the client (#11)
Makes a new (dart) package called `shared`, which contains: 
- the code needed to parse through OCCT and BC data
- any data definitions for types in that data (eg, stops)
- shared utils

The client will then import types from this package. This PR also re-generates the GET_STOPS json file to include OCCT
2025-05-02 02:10:57 -04:00
Levi Lesches
c39cbab3dd
Bc stops data as JSON (#7)
* Start script to generate BC data

* Finished BC data

* moved file slightly to account for future addition of OCCT and added /stops endpoint to server

---------

Co-authored-by: Pagwin <git@pagwin.xyz>
2025-04-24 16:39:18 -04:00
Levi Lesches
2705953282
Fixed URI issues, test data format, and draw polyline (#6)
* Fixed base API

* Better parsing of the actual server data

* Removed deno.lock from the repo

* Fixed server responses and added usingDocker

* Fix uris with usingDocker

* Fixed polyline logic to show entire route
2025-04-10 00:48:47 -04:00
Levi Lesches
b3fcb692ad
Add Google Maps to the background (#5)
* Added .env file for Google Map API key

* Added google_maps_flutter

* Added map widget to home page

* Maps is working on first try
2025-04-02 17:14:01 -04:00
Pagwin
174a9665dc
client and server are integrated now 2025-04-02 16:59:07 -04:00
Levi Lesches
dc9a3b0e1d
Function client to send GET /path to server (#4)
* Created default project

* Added client to .vscode/launch.json

* Ignore .vscode/settings.json

* Some data scraping

* Client skeleton

* Client data types and fromJson() functions

* Final touches on JSON

* Added ApiService

* ApiService changes

* Prototype for stops

* ViewModel and UI

* Basic client UI
2025-04-02 15:39:57 -04:00