Skip to content

Final Submission

Tarun K. Singhal edited this page Aug 23, 2017 · 15 revisions

Google Summer of Code 2017

The goal of the project was to create the "Sugarizer Server Dashboard" for teachers and deployment admin. This dashboard can be used to control and manage the work of learners and manage and analyze all activity on a Sugarizer Server.The final Sugarizer Dashboard have following features:

  • Users: how many users have been registered on the server, recent users, top users on the server, create/edit/remove a user.
  • Journal: how many Journals and how many entries in Journal on the server, last Journal, and last entries, edit a journal (see/update/remove) entries.
  • Application: how many applications are available on the server, change application visibility from Client, update order and way to appear in the favorite view.
  • Graphic and request: display graphics and report on previous data.

API

To implement the above functionalities, the sugarizer backend API was updated and the code base was restructured so that it is according to REST API standards, and can deal a large amount of data with features like filtering and pagination. After few iterations, the routes look as follows:

ACTIVITIES ROUTES

    [GET]  /api/v1/activities/org.olpcfrance.Abecedarium
    [GET]  /api/v1/activities/org.olpcfrance.Abecedarium?fields=id,name,icon
    [GET]  /api/v1/activities/
    [GET]  /api/v1/activities?q=Abece
    [GET]  /api/v1/activities?favorite=true
    [GET]  /api/v1/activities?version=2
    [GET]  /api/v1/activities?name=Gears
    [GET]  /api/v1/activities?favorite=true&version=2 
    [GET]  /api/v1/activities?fields=id,name,icon
    [GET]  /api/v1/activities?fields=id,name,icon&sort=-name
    [GET]  /api/v1/activities?fields=id,name,icon&favorite=true&sort=name

USERS ROUTES

    [POST]  /auth/login
    [POST]  /auth/signup
    [GET]   /api/v1/users
    [GET]   /api/v1/users/:uid
    [POST]  /api/v1/users
    [PUT]   /api/v1/users/:uid
    [GET]   /api/v1/adminusers
    [GET]   /api/v1/adminusers/:uid
    [POST]  /api/v1/adminusers
    [PUT]   /api/v1/adminusers/:uid
    [GET]   /api/v1/users?q=tarun&language=fr&page=3&limit=20

JOURNAL ROUTES

    [GET]    api/v1/journal/
    [GET]    api/v1/journal/type=shared
    [GET]    api/v1/journal/:jid
    [GET]    api/v1/journal/:jid?fields=metadata,text
    [GET]    api/v1/journal/:jid?aid=:aid
    [GET]    api/v1/journal/:jid?aid=:aid&fields=metadata,text
    [GET]    api/v1/journal/:jid?aid=:aid&fields=metadata,text&page=3&limit=20&sort=-timestamp
    [GET]    api/v1/journal/:jid?uid=:uid
    [GET]    api/v1/journal/:jid?uid=:uid&fields=metadata,text
    [GET]    api/v1/journal/:jid?uid=:uid&fields=metadata,text&page=3&limit=20
    [GET]    api/v1/journal/:jid?uid=:uid&aid=:aid&fields=metadata,text&page=3&limit=20&sort=-timestamp
    [GET]    api/v1/journal/:jid?oid=:oid
    [POST]   api/v1/journal/:jid
    [GET]    api/v1/journal/:jid?oid=:oid
    [PUT]    api/v1/journal/:jid?oid=:oid
    [DELETE] api/v1/journal/:jid?oid=:oid

STATS ROUTES

    [GET]    api/v1/stats?user_id=592d4445cc8be9187abb284f
    [GET]    api/v1/stats?event_object=home_view
    [GET]    api/v1/stats?user_id=592d4445cc8be9187abb284f&sort=-timestamp
    [POST]   api/v1/stats/
    [DELETE] api/v1/stats/

DASHBOARD

The main aim was to create a dashboard with the above-defined features. It supports multiple languages and currently has been defined for English, French, Spanish and Hindi which it can be even extended further. Following are the screenshots of the final version of the dashboard.

Relevant URLs

Blog Url

https://github.com/tarunsinghal92/sugarizer-backend/wiki/

Forked Repository

https://github.com/tarunsinghal92/sugarizer-server/

Parent Github Repository

https://github.com/llaske/sugarizer-server/

Commit History

https://github.com/llaske/sugarizer-server/commits/master

Clone this wiki locally