Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/codam-coding-college/find-peers
This website is meant to help students find peers that are working on the same project
https://github.com/codam-coding-college/find-peers
42born2code
Last synced: 3 months ago
JSON representation
This website is meant to help students find peers that are working on the same project
- Host: GitHub
- URL: https://github.com/codam-coding-college/find-peers
- Owner: codam-coding-college
- Created: 2022-02-15T11:19:29.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-02T11:53:45.000Z (3 months ago)
- Last Synced: 2024-11-02T12:27:37.547Z (3 months ago)
- Topics: 42born2code
- Language: TypeScript
- Homepage: https://find-peers.codam.nl
- Size: 298 KB
- Stars: 38
- Watchers: 2
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-42 - source code
README
# Find peers --> [find-peers.codam.nl](https://find-peers.codam.nl)
This website is meant to help students to find peers that are working on the same project
## Developing
## Setup & configuration
- Create a Oauth application on [intra](https://profile.intra.42.fr/oauth/applications)
- Copy the file `./env/.env-example` to `./env/.env` and fill out the (secret) dataAlso see `./src/env.ts` for more configuration
## Changing listed projects
- The projects shown on the front page are listed in `./env/projectIDs.json`. Should the curriculum change, you can edit that file. Remember to restart the server and wait for the server to pull all the data from the intra api.
- A list of all the projects and their corresponding ID in the 42 network (as of march 2022) can be found in `./env/allProjectIDs.json`## Updating the secrets / API tokens
```shell
cd find-peers
vim env/.env
# make changes
docker compose down
docker compose up -d# To get logs
docker logs --tail 10000 -f find-peers
```## Monitoring
At the (unauthenticated) route `/status/pull` you can see a summary of the pull status of every campus
It contains the key `hoursAgo` for every campus, which is the amount of hours since the last successful pull (syncing the 42 DB of the users' completed projects) of that campus
This value should not be higher than 2 * the pull timeout (currently 24 hours)## Configuration files
| File path | Description | Managed by server |
|----------------------------------------------|---------------------------------------------------------------------------------------|-------------------|
| `./env/projectIDs.json` | List of all the projects and their corresponding ID to be displayed on the front page | no |
| `./env/allProjectIDs.json` | List of all projects in the 42 network (as of march 2022) | no |
| `./env/.env-example` | Example file for api tokens, rename to `.env` to activate | no |
| `./env/campusIDs.json` | List of all campuses and their corresponding ID that are fetched from the 42 API | no |
| `./database/` | All database files, mount this when running in a docker container | yes |
| `./database/sessions/` | All session files currently active | yes |
| `./database/users.json` | Userdata associated with session | yes |
| `./database//lastpull.txt` | Unix timestamp when the project users of that campus were last successfully updated | yes |
| `./database//projectUsers.json` | Status of users for each project | yes |## Running
The 'database' of this project is a folder called 'database' at the root of the project.### Docker and Docker-compose
This is in production
```shell
git clone https://github.com/codam-coding-college/find-peers.git
cd find-peers
docker compose up -d# To get logs
docker logs --tail 10000 -f find-peers
```### Locally
- Install Nodejs >= 18.x
- Install dependencies\
`npm install`
- Start development server\
`npm run dev`