This repo is the backend of the geek editor project. It provides various APIs to the client.
- You must have git, nodejs and mongoDB installed in your local system.
- Run MongoDB on PORT 27017.
mongod
- Fork this repo and then clone the forked repo.
git clone 'YOUR REPO LINK'
- install dependencies and run the server
This will make the server run at
npm install node app.js
http://localhost:8000/
Field | Data Type | Required |
---|---|---|
fname | String | true |
lname | String | true |
username | String | true |
String | true | |
hash | String | true |
salt | String | true |
Codes | Array | false |
Field | Data Type | Required |
---|---|---|
userID | string | true |
code | string | true |
- Home Page
("/")
- Get Profile
("/getprofile")
Fetches the profile of a user.
- Register
("/register")
: Registers the user and adds the data to mongoDB. - Login
("/login")
: logins the user after verifying username and password.
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
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.
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.
If you have any queries or suggestions, please use the discord channel of Geek Editor FrontEnd.
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.
- 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.
- Single commit per pull request and name the commit as something meaningful, example: Adding <-your-name-> in students/mentors section.
- Reference the issue numbers in the commit message if it resolves an open issue. Follow the pattern Fixes #
- Make a note to add relevent Screen Shots when you make a PR.
- Pull Request older than 3 days with no response from the contributor shall be marked closed.
- Do not make PR which is not related to any issues.
- You can create an issue but you can only solve that particular issue if we approve it.
- 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.
- Be polite: Be polite to other community members.
- PR template should be strictly followed, else the points won’t be reflected on the leaderboard.
happy coding.