You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Added a column to the zoom room SQL table to associate each room with an
ID of an RCTogether note block. Updated docs to reflect that. Forwarded
RCTogether note data on startup and on change to the RCVerse UI.
Disabled automatic note cleaning. Added Markdown formatting to
RCVerse notes to reflect RCTogether's Markdown notes. Updated `/note`
RCVerse API endpoint to call RCTogether REST API call to update the note
there.
Copy file name to clipboardexpand all lines: README.md
+41-27
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,8 @@
2
2
3
3
Forked from [Recurse OAuth example](https://github.com/reedspool/recurse-oauth-example-node-express)
4
4
5
+
## Setup Your Local Development Environment
6
+
5
7
Node >=20 required (or see notes about Oslo installation for Node <20 [here](https://oslo.js.org))
6
8
7
9
```sh
@@ -12,19 +14,27 @@ To get your Client ID and Client Secret, go to <https://recurse.com/settings/app
12
14
13
15
Then make a copy of `config.env.template` named `config.env` and fill in the secrets there. For PostgreSQL, see the Neon section below.
14
16
15
-
Once you've done the above steps run the server locally with `npm start`.
17
+
Once you've done the above steps, you can start your local dev environment.
18
+
19
+
## Run Local Development Environment
20
+
21
+
Once you've got all your local configuration done, including setting up and running a database, you should be able to run the development server with:
22
+
23
+
```sh
24
+
npm start
25
+
```
16
26
17
27
## Fly.io Deployment
18
28
19
29
`OAUTH_CLIENT_ID`, `OAUTH_CLIENT_SECRET` and `POSTGRES_CONNECTION` are set as Secrets inside the Fly App.
20
30
21
31
When you update those values, you'll need to run `fly deploy` to use the new versions.
22
32
23
-
## Neon deployment/PostGreSQL dev environment system
33
+
## Neon deployment/PostgreSQL dev environment system
24
34
25
-
Technically you can use any PostgreSQL database, not just Neon, but this project is using Neon.
35
+
RCVerse production uses [Neon](https://neon.tech/) to host a PostgreSQL database. You don't need to use Neon, any PostgreSQL server should work.
26
36
27
-
Sign up for a new account with Neon. Make a new database. Save the PostgreSQL connection string into the `config.env` variable `POSTGRES_CONNECTION` as well as in the Secrets section of your Fly App.
37
+
If you want to use Neon, you'll need to sign up for a new account. Make a new database. Save the PostgreSQL connection string into the `config.env` variable `POSTGRES_CONNECTION` as well as in the Secrets section of your Fly App.
28
38
29
39
Create some tables. Run these queries separately in the Neon "SQL Editor":
30
40
@@ -45,42 +55,44 @@ CREATE TABLE user_session (
45
55
)
46
56
```
47
57
48
-
Then create a table and fill it with all the standard RC room information.
58
+
59
+
Then create a table and fill it with all the standard RC room information. This table should be write-only most of the time, since RC rooms rarely change. You can locate the values of the `note_block_rctogether_id` field by watching the websocket messages in RCTogether when you save an edit to a note block.
49
60
50
61
```sql
51
62
CREATETABLEzoom_rooms (
52
63
id serialPRIMARY KEY,
53
64
room_name TEXT,
54
65
location TEXT, /* Usually URL */
66
+
note_block_rctogether_id TEXT, /* Associated note block ID in VirtualRC */
55
67
visibility TEXT/* if not "visible", shouldn't appear in UI */
56
68
);
57
69
58
-
INSERT INTO zoom_rooms (room_name, location, visibility)
70
+
INSERT INTO zoom_rooms (room_name, location, note_block_rctogether_id, visibility)
This table is meant mostly to be write-only mostly, but RC does change the rooms sometimes. To fill this table, please ask Reed. Mostly, it's not kept in this table since it may have personally identifying information in it.
93
+
Above are all the visible rooms, but some rooms are "invisible" to RCVerse, like personal rooms of RC faculty. To add an invisible room, insert a new invisible row. The difference between simply leaving a room out and adding the invisible row to the database is that if there is no associated "invisible" row in the database, a log message will appear warning there's a "surprising" zoom room that's not tracked. You can ignore this though.
82
94
83
-
To add an invisible room (because maybe the name has PIID), insert a new invisible row. The only effect right now of invisible rooms is to squash a log message that "a surprising room showed up":
95
+
To edit the rooms on production RCVerse, please ask Reed. But here's an example addition of an invisible room:
84
96
85
97
```sql
86
98
INSERT INTO zoom_rooms (room_name, location, visibility)
@@ -90,6 +102,8 @@ VALUES
90
102
91
103
## RCTogether API (ActionCable)
92
104
105
+
[The documentation for RCTogether's APIs lives here.](https://docs.rctogether.com/#introduction)
106
+
93
107
Go to https://recurse.rctogether.com/apps and make a new application, then plug in your App ID and App secret into `ACTION_CABLE_APP_ID`and`ACTION_CABLE_APP_SECRET`in your `config.env`.
0 commit comments