Skip to content

Efekahya/sakaiExpressServer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repo is no longer maintained!!

Feel free to open issues and create pull requests. I will do my best to keep track of them.

convenientSakai

A full-stack project that I'm currently working on. This project currently only runs for the Dokuz Eylül University's online education system. You can "change" the domain and start using it for your desired education system that is based on Sakai

FEATURES

--> Add your Sakai information to the system to view your announcements, assignments, and meetings
--> See available meetings and join them with one click
--> See the meal of the day on the homepage (It's not a built-in SAKAI feature. I'm scraping the Dokuz Eylül university's website for it)

TODO

--> Add a reminder on meetings, homework
--> Get a notification on new announcements
--> Filter and search through announcements and assignments
--> Create an admin panel to easily change some parameters so that the software can be implemented to all Sakai systems

HOW TO INSTALL

--> This script scrapes all the available data of your favorite sites on SAKAI.

Step 1 : System Dependencies!

  • Node.js have to be installed on your system if you don't have node.js you can refer to this website Install Node.js

Step 2 : Setting up!

  • Create a .env file in the backend folder. Using the .envreference file you can add necessary environment variables.
  • Edit main.js to make backend work on an available port currently hardcoded to port 3000

Step 2 : Installing Dependencies!

  • Open two terminals, one of them needs to be navigated to the "backend" folder and the other one needs to be navigated to the "frontend" folder.
  • If you use npm you can run the "npm i %% sudo npm i nodemon -g" command on both of the terminals
  • If you use yarn you can run the "yarn %% sudo yarn nodemon -g" command on both of the terminals

Step 3 : Running the Program!!

  • For backend and frontend terminals run this command

  • For "npm": npm run start

  • For "yarn": yarn start

HOW TO USE

You can always use the GUI to interact with the system but if you want to develop and contribute there are some "key points" below.

  • Proper system workflow requires you to register to the system, log in and add your Sakai credentials
  • After all the info is registered to the database by using endpoints you have to send a request to the /user/getSakai to get the Sakai session token. Thus allowing the backend to store the token to the session.sakai by itself you do not have to do anything further
  • The session token that the backend gets from the Sakai system may be expired within 15 minutes so it is a good idea to resend a request to /getSakai within that period

"Do not forget" that this software is still under development, for development reasons backend still responds with all the credentials about the user!!!!

You can refer to my postman collection for what API endpoints available at this link

Announcements

  • Get all announcements (GET)

    --> Request : /user/announcements -- x-www-form-urlencoded or json
    --> Request body :
    --< Response : every title, id, status, create date, and announcement

  • Get announcement details (GET)

    --> Request : /user/announcement/:id -- x-www-form-urlencoded or json
    --> Request body :
    --< Response : spesific title, id, status, create date, and announcement

Assignments

  • Get all assignments (GET)

    --> Request : /user/assignment -- x-www-form-urlencoded or json
    --> Request body :
    --< Response : every title, id, status, due date, instructions

  • Get assignment details (GET)

    --> Request : /user/assignments/:id -- x-www-form-urlencoded or json
    --> Request body :
    --< Response : spesific title, id, status, due date, instructions

Meetings

  • Get all meetings (GET)

    --> Request : /user/meeting -- x-www-form-urlencoded or json
    --> Request body :
    --< Response : every id, status, start time, join url, tutor name, title

User

  • Register to system (POST)

    --> Request : /user/register -- x-www-form-urlencoded or json
    --> Request body : name, email, password
    --< Response : status, name, email, id

  • Login to system (POST)

    --> Request : /user/login -- x-www-form-urlencoded or json
    --> Request body : email, password
    --< Response : status, name, email

  • Logout (GET)

    --< Response : status, message -- /user/logout

  • Login to sakai (GET)

    --< Response : status, message that contains sakai cookie string

  • Add sakai credentials (POST)

    --> Request body : sakaiEmail, sakaiPassword -- x-www-form-urlencoded or json -- /user/addSakai
    --< Response : status,message

Utils

  • Get food list (GET)

    --> Request : /utils/foodList -- x-www-form-urlencoded or json
    --> Request body :
    --< Response : status, [{date,food,imgUrl}]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published