Giter Site home page Giter Site logo

skill-board-api's Introduction

skill-board-api

API for Skill Board data handling

GitHub Maintenance GitHub last commit GitHub contributors

Contribution Guidelines

First off, thanks for taking the time to contribute! ๐ŸŽ‰

The guidelines for contributing to this repository can be found in the CONTRIBUTING.md file.

These guidelines are a way to communicate how people should contribute. These guidelines will help you verify that you're submitting well-formed pull requests and opening useful issues. For both contributors and us, contribution guidelines will save time and hassle caused by improperly created pull requests or issues that have to be rejected and re-submitted.

Code of Conduct

We have adopted a code of conduct to define community standards, signal a welcoming and inclusive project, and outline procedures for handling abuse. Please go through the Code of Conduct file so that you understand the community standards.

License

This project is freely available for free non-commercial/ commercial use, and may be redistributed under these conditions. Please, see the license for further details.

Development Halt

This project is under a development halt currently due to lack of contributors. If you wish to work on this repo, please contact before doing so. Thank you!

skill-board-api's People

Contributors

aditya-dawadikar avatar atharv-deshmukh avatar bhavansh avatar erin-sparkbox avatar jennypoon avatar khushi2912 avatar megabyte98 avatar ruddha2001 avatar suyashsonawane avatar tejasmorkar avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

skill-board-api's Issues

Login for student and superuser

This logic goes into the app/controllers/login.js file.
test definition is already written in there, replace it with user registration logic.

logic :

  1. take the required data from req.body
  2. validate the data
  3. fetch docs with matching email.
  4. if email is present in db, then compare password. if password match ,then send success response and redirect to dashboard else send failure response with error message.
  5. else redirect to signup page
    image

Database Schema

Create database schema in the skill-board-api/app/models/ folder, for Studentuser and Superuser
Note: I'll share the connection string and database access shortly
Required fields for SuperUser
----------------------Login
Email: str
password: str
phone: Number/str
Name: str
linkedIn: str
github: str
--------------------------Optionals
introduction - str
gender - str
age - number
mother tongue - str
languages known - str
-------------------------Meta Data
timestamp - str
hasAdminAccess - boolean
github metadata object - object

Required fields for StudentUser
----------------------Personal
Name - str
College - str
Department - str
Year - str
Division - str
Roll Number - str
----------------------Social
phone number - number validated for mobile no
is whatsapp available - boolean
email - str validated for emal
github profile url - str validated for url
linkedin profile url - str validated for url
personal website - str validated for url
resume - str validated for url
---------------------------Skills
skills - array of str
projects for every skill - array of str validated for url
top-skill - number (index of the top skill from skills array)
cgpa till date - number float
--------------------------Optionals
introduction - str
gender - str
age - number
mother tongue - str
languages known - str
-------------------------Meta Data
timestamp - str
hasAdminAccess - boolean
github metadata object - object

JWT

Integrate JWT using Jsonwebtoken library.
This code goes inside the login function in app/controllers/login.js

Forgot password mechanism needs to be modified

The forgot password mechanism is only working if the profile is present in the Student collection or Superuser collection.
No logic is written to reset passwords for unverified profiles.

Sort Api

Sort Api for ascending or descending students listing based on student rating

note: needs further discussion

Registration for Student , superuser

This logic goes into the app/controllers/register.js file.
test definition is already written in there, replace it with user registration logic.

logic :

  1. take the required data from req.body
  2. validate the data
  3. if data is invalid, send a bad request response with status code 401.
    else save the data in database and send success response with status code 2000

image

Sending user id upon successful login

The success login response contains,
image
we must include a key called user id that can make use of the getUserDataById API to fetch logged in user's data directly. This user id must be stored in the local storage/session storage. when logged out, it must be cleared from local storage/session storage similar to token.

SMTP

Create email handlers for

  1. Successful registration message
  2. Application approved
  3. Application rejected

Place this file as email.js inside the app/controllers folder. export these functions so that they can be used whenever required

Add attribute to Schema

The registration form has a new field called "preferred pronoun", this attribute is not yet mapped with the Database Schema.

File Path - app -> models -> files to edit

Files To Change Attribute Name To Add
student.js pronoun
superuser.js pronoun
unverifiedProfiles.js pronoun

Accept a key "pronoun" from the request body for registration API

Add a new key called "pronoun" in the "optionals" object inside the registration request handlers.

path of file function name line number for insertion code to insert
app/controllers/register.js registerStudent 63 pronoun : req.body.optionals.pronoun,
app/controllers/register.js registerSuperuser 139 pronoun : req.body.optionals.pronoun,
app/controllers/profileVerification.js approve 78 pronoun : doc[0].optionals.pronoun

Update and delete logic

This logic goes into the app/controllers/student.js file and app/controllers/superuser.js.
test definition is already written in there, replace it with user registration logic.

logic :

  1. take the required data from req.body
  2. find required data from DB and perform the operation , send success response code 201
  3. if any error occurs, then send error message with status code 500(internal server error)

image

Forgot password mechanism

  1. Create a new collection that stores OTP.
  2. Generate a 5 digit random number every time a forgot password request is sent.
  3. Send it to the user via email and store it in the collection as well
  4. When the user sends the OTP to the server, call update request for the user, and clear that otp from the collection

Rating API

This API be a POST method that will rate individual student using a background process

note: needs further discussion

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.