Skip to content

Commit

Permalink
Updating the the dev docs
Browse files Browse the repository at this point in the history
Moved how to update the institutions from readme to dev
Also added screenshots to show the db connection steps
  • Loading branch information
Joel committed Sep 27, 2023
1 parent 64f1d57 commit 3354402
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 21 deletions.
38 changes: 29 additions & 9 deletions Dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,42 @@
### Env Variables

These are the env variables that need to be set-up:
- MONGO_READ: The connection string
- MONGO_DATABASE: Which database to use
- GITHUB_TOKEN: The Github token
- LOG_PATH: The path for the log files to be saved in
- DATA_PATH: The path for the data files to be saved in
- MONGO_READ: The connection string. Can be found in Keepass
- MONGO_DATABASE: Which database to use. production or testingNew
- GITHUB_TOKEN: The Github token. Can be found in Keepass
- LOG_PATH: The path for the log files to be saved in. Somewhere on your system.
- DATA_PATH: The path for the data files to be saved in. Somewhere on your system.

### Run Backend

> - From root cd into */oss-api*</br>
> - Run npm i to install all the necessary packages
> - Finally you can start the dec server with **npm run start:dev**
> - Run **npm i** to install all the necessary packages
> - Finally you can start the dev server with **npm run start:dev**
## Frontend

**Pre-requirements:** AngularJS, npm, finished backend setup

> - From root cd into */frontend*</br>
> - Run npm i to install all the necessary packages</br>
> - Finally you can start the dev server with **npm run start**
> - Run **npm i** to install all the necessary packages</br>
> - Finally you can start the dev server with **npm run start**

# Update Institutions

Once someone has updated the github_repos.json file and the pull request was merged, the new or updated insitution must be added to the database.

This can be done in 4 easy steps:

1. Pull Repository
2. Enter the connection string, which can be found in Keepass, into the URI field of MongoCompass.

![MongoCompass Connection string](/assets/images/MongoConnection.png)

3. Choose the **production** DB and then todoInstitution collection.

![Mongo choose DB](/assets/images/MongoDB.png)

4. Press **Add Data -> Import file** and choose github_repos.json. Keep in mind that *Stop on errors* needs to be unchecked. Then just click *Import*.

![Add new Data to DB](/assets/images/AddData.png)
13 changes: 1 addition & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,4 @@ The crawler will just update the data, starting with the oldest timestamp.

## Database Stucture

![System Diagram](/assets/images/DBStructure.png)

## Update Institutions

Once someone has updated the github_repos.json file and the pull request was merged, the new or updated insitution must be added to the database.

This can be done in 4 easy steps:

1. Pull Repository
2. Connect to DB with MongoDB Compass. The Credentials can be found in Keepass
3. Choose the **production** DB and then todoInstitution collection.
4. Press **Add Data -> Import file** and choose github_repos.json. Keep in mind that *Stop on errors* needs to be unchecked. Then just click *Import*.
![System Diagram](/assets/images/DBStructure.png)
Binary file added assets/images/AddData.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/MongoConnection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/MongoDB.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3354402

Please sign in to comment.