Skip to content

Commit 4255a0b

Browse files
committed
add documentation about meteor and lcs documentation
1 parent 94805cb commit 4255a0b

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

HOWITWORKS.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# How it works
2+
This is a more detailed documentation of how meteor works, and how
3+
the code we added interacts with helpq, and allows integration with LCS
4+
5+
## Meteor
6+
Meteor is a framework for doing both frontend and backend development
7+
in JavaScript. The meteor server accomplishes this by two means:
8+
9+
### Methods
10+
these are effectively like api requests. a client can call a method with
11+
Meteor.call and that communicates with the server to call serverside code.
12+
methods are added with Meteor.methods
13+
14+
### Collections
15+
Meteor also gives you a conduit to directly query the MongoDB database from
16+
the client. This is built on a websocket type interface so when you update a
17+
collection it can push the changes out to all the clients that are watching it.
18+
users don't have access to the whole database though. you manually configure
19+
what users can and can't do with documents. this allows meteor to be secure and
20+
is also why methods are needed for when a user needs someone with special
21+
permission (like the server) to do something for them.
22+
23+
## LCS integration
24+
On startup and for login, the server will contact LCS over HTTP to get user data
25+
and to validate passwords. in server/lib/lcs.js there is a function that takes in
26+
the config and adds all the LCS functionality to helpq. things like:
27+
- dynamically getting the floor plan image to display to the user
28+
+ this is so there is a single source of truth so if the floor plan changes
29+
we don't have to rebuild/redeploy a bunch of applications that use this
30+
- get the names of all available locations on the map.
31+
+ this is only updated at start time, but is done for all the reasons above
32+
+ this can get fixed using something like fetch in the client and passing the
33+
client the endpoint from config
34+
- LCS login
35+
+ on every login helpq asks if a username and pass is valid. if it isn't it checks
36+
to see if the user was added manually
37+
+ if a user was valid it changes their password/creates their account in helpq
38+
- checking user roles in LCS
39+
+ the first time a user logs in it will check to see if they have the mentor role
40+
in LCS. if they do it also gives them the appropriate role in helpq

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
## Description
44
this is a configuration and extension of MIT's helpq specifically for HackRU
55
the main idea is to integrate it with lcs and other HackRU type things
6-
the [HELPq readme](HELPQ.md) may give some more insight on HELPq specifically
6+
the [HELPq readme](HELPQ.md) may give some more insight on HELPq specifically.
7+
for more information about meteor and how this fork integrates with LCS see
8+
[how it works](HOWITWORKS.md)
79

810
## Inspiration
911
Originally we used a slackbot in order to provide mentorship to hackers during

0 commit comments

Comments
 (0)