Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 96 lines (64 sloc) 3.171 kb
c6dd8a4 @fkh adding a pic of the architecture
fkh authored
1 Shareabouts Architecture
2851b8a @slinkp Added a basic description of the SA architecture.
slinkp authored
2 ========================
3
4 Shareabouts (SA) is composed primarily of two parts:
ebcfd77 @atogle Remove sa-web and sa-service branch references
atogle authored
5 the [Shareabouts API](https://github.com/openplans/shareabouts-api)
6 service, and the [Shareabouts](https://github.com/openplans/shareabouts)
7 front-end application.
2851b8a @slinkp Added a basic description of the SA architecture.
slinkp authored
8
c6dd8a4 @fkh adding a pic of the architecture
fkh authored
9 ![Shareabouts Architecture](https://docs.google.com/drawings/d/10KdhBgw7lYlpEda77W9ry4ZIxbkGAt84uIRS5JH-2_c/pub?w=960&h=720)
2851b8a @slinkp Added a basic description of the SA architecture.
slinkp authored
10
11 The Shareabouts Web Application
12 -------------------------------
13
14 The web application is mostly client-side JavaScript, using Backbone
15 and Mustache templates.
16
17 There is also a small, nearly static server-side layer which serves a
18 few purposes:
19
20 * Static media - CSS, images.
21
22 * Configuration - there is a config file that allows various
23 customizations, notably the forms that the client displays for user
24 input. See [the config documentation](CONFIG.md).
25
26 * Proxy - In order to ensure that the JavaScript layer can make AJAX
27 requests to the back-end API even if it's running on a different
28 domain, we send those requests through a simple HTTP proxy.
29
30 The current implementation of the server side is in Django, but it
31 uses so few features that it could fairly easily be re-implemented
32 with nearly any web development platform.
33
34
35 The Shareabouts API
36 -------------------
37
38 This is a separate web service. It provides a RESTful API for
39 creating and retrieving geographic points and metadata about them.
40 It also includes a management UI for creating datasets and
41 inspecting the raw data stored by the back end.
42
521a0a9 @fkh fixing missing link to sapi docs.
fkh authored
43 For more about this, see [the Shareabouts API docs](https://github.com/openplans/shareabouts-api/tree/master/doc).
2851b8a @slinkp Added a basic description of the SA architecture.
slinkp authored
44
45 Shareabouts Data Model
46 -----------------------
47
48 The data served by the Shareabouts API and used by the web app is
49 composed of just a few kinds of flexible objects:
50
51 ### Data Sets
52
53 A user of the API can create any number of "data sets".
54 All location information you create or retrieve is associated with a
55 single Data Set. Currently, the SA web app can only be configured to
56 work with a single Data Set.
57
58 ### Places
59
60 A Place represents a geographic point and can have a few data
61 attributes stored on it:
62
63 * data - this is an arbitrary JSON object.
64 * submitter name - a string.
65 * dataset - a Place belongs to a single Data Set.
66
67 ### Submissions
68
69 A Submission represents some data attached to a Place.
70 Every Submission has a type, which is represented by its parent
71 SubmissionSet (see below). A Submission has these data attributes:
72
73 * data - an arbitrary JSON object containing the submitted data.
74 * submitter_name - a string.
75 * parent - the SubmissionSet it belongs to.
76
77
78 ### SubmissionSets
79
80 A SubmissionSet is a group of Submissions attached
81 to a single Place. A SubmissionSet has these attributes:
82
83 * place
84 * submission_type - a string identifying the type of these
85 submissions; for example, "comment" or "rating" or "vote".
86
87
88 ### Activity
89
90 Activity represents all user activity on the site. Any time you
91 create, modify, or delete a Place or Submission, an Activity is
92 generated, identifying who did it, what happened, and when.
93
94 These are used for the "activity stream" that appears on the right
95 sidebar on the default Shareabouts design.
Something went wrong with that request. Please try again.