#describes the back-end server architecture of this project
Organization
The app uses REST to facilitate mobile access later on.
- GET requests fetch pages.
- /user
- no email supplied -> new user page
- email supplied -> user info page or modification page, based on cookie.
- /want or /have
- no id supplied -> new listing page
- id supplied -> listing view or modification page, based on cookie.
(if the user has no cookie -> always point to sign in page)
- PUT methods modify pages
- /user/:email -> modify user info
- /want/:id or /have/:id -> modify listing
- POST methods create new listings or users
- /user -> create new user
- /want or /have -> create new listing
- DELETE methods remove listings or users
- /user/:email -> remove user
- /want/:id or /have/:id -> remove listing
ALSO:
This is an event-based system. Every time a user executes a
(non-idempotent) action, this application will send a message to all other
users who might be affected. This is 2010. We CAN have results of searches
and posts show up immediately, so why not?