A React CMS. Currently manages authentication, user profiles, and an admin dashboard with configurable options.
Once this repo is cloned,
-
Install MySQL
-
Install Node and NPM
-
Install Sharp
-
Install webpack and redis globally
$ npm install -g webpack $ npm install -g redis
-
Install dependencies
$ npm install
-
Start necessary servers
$ mysql.server start $ redis-server
-
Import alumConnect schema to mySQL database
$ mysql -u root < server/schema.sql
-
In schema.sql, replace the values from line 97-98 and 110-111 with the necessary info. Delete lines 100-105 and lines 113-118. (Note: If you are Dan, leave the values as is!)
To find your github id, do:
curl https://api.github.com/users/*YOUR HANDLE HERE*
-
Obtain github OAuth credentials (see wiki)
-
Replace githubAPIConfig.example.js in /server/config/ to githubAPIConfig.js. Fill up the keys as follows:
exports.sessionSecret = 'YOUR SECRET STRING HERE'; exports.githubClientId = 'GITHUB CLIENT ID HERE'; exports.githubClientSecret = 'GITHUB CLIENT SECRET HERE'; exports.githubCallbackUrl = 'http://127.0.0.1:3000/auth/callback';
-
Insert data to alumConnect table (Note: This step is only relavent to Dan!)
$ node server/new_insertData.js
-
Launch the server
$ npm start
Endpoint | Action | Returns | Side Effect | Parameters/Req Body |
---|---|---|---|---|
/auth | GET | ? | ? | ? |
/auth/logout | GET | ? | ? | ? |
/auth/sessionreload | GET | ? | ? | ? |
/auth/refreshcookies | GET | ? | ? | ? |
/auth/error | GET | ? | ? | ? |
/auth/callback | GET | ? | ? | ? |
/auth/islogged | GET | ? | ? | ? |
/auth/isadmin | GET | ? | ? | ? |
Endpoint | Action | Returns | Side Effect | Parameters/Req Body |
---|---|---|---|---|
/db/groups | GET | All groups and their visible groups | - | - |
/db/groups | POST | Newly created group and its visible groups | - | group_name: new group name |
visibleGroups: array of visible groups by id | ||||
/db/groups/group/:id | GET | A group and its visible groups | - | id: group id |
/db/groups/group/:id | POST | Modified group and its visible groups | - | id: group id |
group_name: modifed group name | ||||
visibleGroups: array of visible groups by id | ||||
/db/groups/group/:id | DELETE | - | Deletes all associated relational data | id: group id |
Endpoint | Action | Returns | Side Effect | Parameters/Req Body |
---|---|---|---|---|
/db/users | GET | Userinfo and groups | - | - |
/db/users | POST | - | - | handle: user handle |
githubid: user github account | ||||
name: user full name | ||||
email: user email address | ||||
image: user image url | ||||
public: user visibility (0 or 1) | ||||
permission: admin privilege (o or 1) | ||||
/db/users/user/:id | GET | User info, sites, bio, and groups | - | id: user id |
/db/users/user/:id | POST | - | - | id: user id |
handle: user handle | ||||
githubid: user github account | ||||
name: user full name | ||||
email: user email address | ||||
url: user url link | ||||
public: user visibility | ||||
permission: user admin privilege | ||||
/db/users/user/:id | DELETE | - | Deletes all associated relational data | id: user id |
/db/users/name | GET | ? | ? | ? |
/db/users/user/visibility | POST | ? | ? | ? |
/user/uploadimage | POST | ? | ? | ? |
Endpoint | Action | Returns | Side Effect | Parameters/Req Body |
---|---|---|---|---|
/db/sites | GET | All sites a user can have | - | - |
/db/sites | POST | Newly created site | - | site_name: site name |
base_url: site url | ||||
hospitalId: Id of appointment hospital | ||||
/db/sites/site/:id | POST | Modified site | site_name: site name | |
base_url: site url | ||||
active: 0 or 1 | ||||
/db/sites/site/:id | DELETE | - | Deletes all associated relational data | id: site id |
Endpoint | Action | Returns | Side Effect | Parameters/Req Body |
---|---|---|---|---|
/db/fields | GET | All bio field titles | - | - |
/db/fields | POST | Newly created bio field title | - | title: bio field title |
/db/fields/field/:id | POST | Modified bio field title | - | title: bio field title |
/db/fields/field/:id | DELETE | - | Deletes all associated relational data | id: bio field title id |
MIT