Giter Site home page Giter Site logo

codam-coding-college / find-peers Goto Github PK

View Code? Open in Web Editor NEW
27.0 2.0 5.0 299 KB

This website is meant to help students find peers that are working on the same project

Home Page: https://find-peers.codam.nl

TypeScript 74.45% EJS 18.76% Dockerfile 0.97% Shell 1.56% JavaScript 4.27%
42born2code

find-peers's Introduction

Find peers --> 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
  • Copy the file ./env/.env-example to ./env/.env and fill out the (secret) data

Also 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

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/<campus_name>/lastpull.txt Unix timestamp when the project users of that campus were last successfully updated yes
./database/<campus_name>/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

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

find-peers's People

Contributors

sirmorfield avatar freekbes avatar mariusmivw avatar grotegnoom avatar alpha1337k avatar demostanis avatar jgyy avatar

Stargazers

Daniel Bruno avatar Anas TABITI avatar Alireza Sohrabizadeh avatar Filippo Corvaro avatar Adrian Skar avatar Magi avatar  avatar Beirão avatar Sarah avatar Ali Kanıberk avatar Sergio Sánchez avatar Nacho Mota avatar  avatar rvela-ca avatar Huy Duong avatar Sue avatar Ruben avatar  avatar Ayoub Eddaoudi avatar Yuske Fukuyama avatar fgata-va avatar nfukada avatar Pedro avatar W2Wizard avatar Dustin A. Krecisz avatar Peer de Bakker avatar

Watchers

 avatar  avatar

find-peers's Issues

Add support for 42 Singapore

As per title, kindly help to add support for 42 Singapore as we have already started common core. To be clear i am only asking for the website support for it, not yet on the api level. thanks!

Authentication failure

i had an issue today accessing the application.

Output

TokenError: Client authentication failed due to unknown client, no client authentication included, or unsupported authentication method.
    at OAuth2Strategy.parseErrorResponse (/app/node_modules/passport-oauth2/lib/strategy.js:373:12)
    at OAuth2Strategy._createOAuthError (/app/node_modules/passport-oauth2/lib/strategy.js:420:16)
    at /app/node_modules/passport-oauth2/lib/strategy.js:177:45
    at /app/node_modules/oauth/lib/oauth2.js:191:18
    at passBackControl (/app/node_modules/oauth/lib/oauth2.js:132:9)
    at IncomingMessage.<anonymous> (/app/node_modules/oauth/lib/oauth2.js:157:7)
    at IncomingMessage.emit (node:events:539:35)
    at endReadableNT (node:internal/streams/readable:1345:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.