styling fixes, login, removed donate temp
[oweals/finalsclub.git] / README.md
1
2 # Finals Club (FC)
3
4 This is the source code repository for [finalsclub.org](http://finalsclub.org/).
5
6 FC is a 501(c)(3) non-profit open education project dedicated to
7 helping college students collaborate, learn, and share their knowledge freely online.
8
9
10 ## Additional resources
11
12 [[ discussion groups, chat rooms, etc. related to FC and FC sources ]]
13
14
15
16 # Quick install
17
18 Requirements:
19
20 - A typical Linux server (circa 2011)
21 - Node.js (Version 0.4.10 or later) [More ...](http://nodejs.org)
22 - MongoDB (Version  1.8.2 or later) [More ...](http://mongodb.org)
23 - forever 
24
25         $ pwd
26         /home/you
27         $ install git
28         $ install node
29         $ git clone git@github.com:/finalsclubdev/FinalsClub fc
30         $ cd fc
31         $ git submodule init
32         $ git submodule update
33
34         [[ flesh this out with correct commands - reference util scripts - fix util scripts ]]
35
36
37 # System components
38
39 The system consists of these main parts:
40
41 - The website
42 - The collaborative, real-time editor
43 - The back channel
44
45 Most of the system is written in Javascript and executed by the Node.js runtime.
46
47
48
49 # Source Code
50
51
52 ## The Collaborative Real-time Editor 
53
54 The editor is an embedded editor called [Etherpad-Lite](https://github.com/Pita/etherpad-lite) (EPL).
55 It provides the ability for multiple people to simultaneously edit a single document.
56 The documents in FC are the notes for a specific lecture.
57
58 EPL is installed as a git submodule to the main FC source tree with the name "etherpad-lite".
59
60
61 ## The Back Channel (BC)
62
63 The back channel portion of FC is implemented with ["BC"](https://github.com/FinalsClubDev/bc).
64 BC allows the note takers, or anyone else who is just observing,
65 to suggest questions for the lecturer, and vote on each other's questions.
66 It also allows people to post commentary.
67
68 Although the actual BC code was written for FC, it has been extracted from the original
69 FC source and turned into an independent open source project.
70
71 BC is installed as a git submodule to the main FC source tree with the name "bc".
72
73
74 ## The Surrounding Website
75
76 This is the FC website, which brings together the other two elements into
77 a single website that serves it's stated purpose (above).
78 This would be the home page, privacy policy page, the page that lists the participating
79 schools, the sub pages containing lists of lectures and note taking sessions, and the
80 core page where EPL and BC are both found along side each other. 
81
82 Several node modules are leveraged to to make the basic website work:
83
84 - [async](http:npmjs.org)
85 - [aws-lib](http:npmjs.org)
86 - [connect](http:npmjs.org)
87 - [connect-mongo](http:npmjs.org)
88 - [ejs](http:npmjs.org)
89 - [express](http:npmjs.org)
90 - [express-messages](http:npmjs.org)
91 - [hat](http:npmjs.org)
92 - [hooks](http:npmjs.org)
93 - [init](http:npmjs.org)
94 - [jade](http:npmjs.org)
95 - [mongodb](http:npmjs.org)
96 - [mongoose](http:npmjs.org)
97 - [socket.io](http:npmjs.org)
98
99
100 [[ more detail about website generally, then defer to src comments ]]
101
102
103 # Database
104
105 The database is MongoDB.
106 MongoDB is not a relational database, but rather a noSQL or "document/object" database.
107 Data is stored as structured objects versus tables and rows.
108 (More about MongoDB)[http://mongodb.org].
109
110 ## Collections in the database
111
112 - archivedcourses
113         [[ schema needed ]]
114 - archivednotes
115         [[ schema needed ]]
116 - archivedsubjects
117         [[ schema needed ]]
118 - courses
119         [[ schema needed ]]
120 - lectures
121         [[ schema needed ]]
122 - notes
123         [[ schema needed ]]
124 - posts
125         [[ schema needed ]]
126 - schools
127         [[ schema needed ]]
128 - sessions
129         [[ schema needed ]]
130 - users
131         [[ schema needed ]]
132
133
134 ## [[ stuff ]]
135
136 [[ notes about scaling/replication/etc. ]]
137
138
139
140 # AWS Infrastructure
141
142 The actual finalsclub.org servers run in the cloud on Linux servers, using Amazon Web Services (AWS).
143 Scaling is accomplished by adding additional servers to a load balancer.
144
145 NOTE: The scaling system is automatic; new servers have to be added manually, but it it's very easy.
146 NOTE: Automatic fail-over of the database is not yet in place.
147
148 NOTE: There are currently 2 running server instances.  One for the live server and one for testing.
149
150 Data is stored in a MongoDB server running on the same AWS instance as the website.
151 Data is backed up daily to the durable AWS S3 system.
152 One backup of the database is kept for the most recent 30 days, one for each of the most
153 recent 12 months, and one for every year.
154
155 AWS Cloudwatch is used to monitor the servers.
156 When the configured conditions warrant attention, notices are sent to "info@finalsclub.org".
157
158 NOTE: There are currently 2 monitors set up:
159
160 - available disk space
161 - CPU utilization
162
163 NOTE: We still have an ongoing issue with the EPL server hanging up.  This is being worked on.
164
165
166
167
168