Git Product home page Git Product logo

geek-editor-backend's Introduction

Geek Editor Backend

This repo is the backend of the geek editor project. It provides various APIs to the client.

Tech Stack

Getting Started

Set up in Your local system

  1. You must have git, nodejs and mongoDB installed in your local system.
  2. Run MongoDB on PORT 27017.
    mongod
  3. Fork this repo and then clone the forked repo.
    git clone 'YOUR REPO LINK'
  4. install dependencies and run the server
    npm install
    node app.js
    This will make the server run at http://localhost:8000/

Database Schema

User Schema

Field Data Type Required
fname String true
lname String true
username String true
email String true
hash String true
salt String true
Codes Array false

Code Schema

Field Data Type Required
userID string true
code string true

APIs

Get Method

  • Home Page ("/")
  • Get Profile ("/getprofile") Fetches the profile of a user.

Post Method

  • Register ("/register") : Registers the user and adds the data to mongoDB.
  • Login ("/login") : logins the user after verifying username and password.

Generation of Salt and Hash

A salt is generated using crypto library already present in nodejs. A Hash is generated using pbkdf2 function and passing password, salt, 10000(iterations), 64(no. of Characters) and "sha521"(a hashing function) as parameters. This salt and hash is stored in user database as passwords

More About sha512 More about pbkdf2

Verify Password

Salt, hash, and password are passed as parameters in verifypassword(). A hash is generated using password and salt and is matched with the hash already present in the database. If they are same, user is authenticated.

Claim an Issue

Comment on the issue. In case of no activity on the issue even after 2 days, the issue will be reassigned. If you have difficulty approaching the issue, feel free to ask on our slack channel.

Communication

If you have any queries or suggestions, please use the discord channel of Geek Editor FrontEnd.

Guidelines

Please help us follow the best practice to make it easy for the reviewer as well as the contributor. We want to focus on the code quality more than on managing pull request ethics.

  1. People before code: If any of the following rules are violated, the pull-requests must not be rejected. This is to create an easy and joyful onboarding process for new programmers and first-time contributors.
  2. Single commit per pull request and name the commit as something meaningful, example: Adding <-your-name-> in students/mentors section.
  3. Reference the issue numbers in the commit message if it resolves an open issue. Follow the pattern Fixes #
  4. Make a note to add relevent Screen Shots when you make a PR.
  5. Pull Request older than 3 days with no response from the contributor shall be marked closed.
  6. Do not make PR which is not related to any issues.
  7. You can create an issue but you can only solve that particular issue if we approve it.
  8. Avoid duplicate PRs, if need be comment on the older PR with the PR number of the follow-up (new PR) and close the obsolete PR yourself.
  9. Be polite: Be polite to other community members.
  10. PR template should be strictly followed, else the points won’t be reflected on the leaderboard.

happy coding.

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.