Permalink
Browse files

Added starter design doc

  • Loading branch information...
1 parent 7a4b294 commit 0ee9d2980efa4d7afdd9eaa83d97262557bdc037 @yuvipanda yuvipanda committed Nov 22, 2011
Showing with 50 additions and 0 deletions.
  1. +50 −0 design.txt
View
@@ -0,0 +1,50 @@
+# wtfimb Reboot
+
+## Introduction
+
+This is busroutes.in done right, but not so right that it'll never ship. It is designed with the following goals in mind:
+
+1. Make it easy for anyone to start an instance for their own city.
+2. Make the entire data *user editable*, so that minor edits are absolutely painless.
+3. Have an API + several clients (web/mobile/sms), so that work does not get repeated
+4. Make it easy to keep data in sync with official sources, in cases where official sources are actually provided
+
+We've picked **GTFS** to be the standard data import/export format, and **GeoJSON** to be the API transport format.
+
+## API
+
+The API provides read/write access to the data, along with routing information. People need to be logged in to make write calls to the API. The API design should be as minimal as possible, and hide all implementation details.
+
+POST login
+ In: Username/Password.
+ Out: An access token (valid for a day or so?) on success. Should be included with all future requests
@tecoholic

tecoholic Nov 22, 2011

Contributor

This should be done the Oauth way. Why should the access token be "valid for a day or so?" Let there be a acess key and secret available with the client app always

@yuvipanda

yuvipanda Nov 22, 2011

Owner

Point taken. Do you want to write up that part?

@tecoholic

tecoholic Nov 22, 2011

Contributor

Sure! On a quick thought, can we make this OpenID? Good idea or otherwise?

@yuvipanda

yuvipanda via email Nov 22, 2011

Owner
@tecoholic

tecoholic Nov 22, 2011

Contributor

Ya you are right, I was thinking bout something and posted this :P Anyways, I will do that OAuth part. Deal done

+ Alternative: Cookie based logins too!
+POST logout
+ In: An access token
+ Logs out the user by invalidating the access token
+GET stop?id=$id
+ In: Stop ID
+ Out: Returns a FeatureList containing a single point that is the stop of this particular id
+GET stop?name=$name
+ In: Stop Name
+ Out: Returns a FeatureList containing possibly multiple points that have a name that matches the inbuilt name
+POST stop?id=$id
+ In: A Point GeoJSON that should be used to populate given ID
+ Out: Id of stop updated
+ Leave Id empty to create
+GET route?id=$id
+ In: Route ID
+ Out: Returns a FeatureList containing a single point that is the stop of this particular id
+GET stop?name=$name
+ In: Stop Name
+ Out: Returns a FeatureList containing possibly multiple points that have a name that matches the inbuilt name
+POST stop?id=$id
+ In: A Point GeoJSON that should be used to populate given ID
+ Out: Id of stop updated
+ Leave Id empty to create
+GET/POST route?id=$id&name=$name
+ FeatureList of Points that are part of the given Route (identified by id or name)
+GET path?from=$from_id&$to=$to_id
+ FeatureList of GeometryCollections that are changeoverpoints
+GET stopsnear?lat=$lat&lon=$lon&distance=$dist&type=$type
+ FeatureList of Points that represent stops near the given location

0 comments on commit 0ee9d29

Please sign in to comment.