Skip to content

Bot-Academia/Nebula-Backend

Repository files navigation

Nebula-Backend

All Contributors

CodeQL

Project Description

Nebula is divided into two repositories. This repository contains the Backend codebase of the project. Checkout the frontend codebase over here. This project aims to provide universities and communities with a platform which can be utilised to make the working of various clubs systematic.

Prerequisite:

These are the requirement that should be installed locally on your machine.

  • Node.js
  • MongoDB
  • Postman

How to setup node.js on your machine?

  • Move to: link choose the operating system as per your machine and start downloading and setup by clicking recommended settings in the installation wizard.

How to setup MongoDB on your machine?

  • Move to: link look at the left sidebar and choose the operating system according to your machine. Then follow the steps recommended in the official docs.
Note: You can also use the MongoDB servers like Mlab or MongoDB Cluster server

How to set up this project locally?

    git clone https://github.com/Bot-Academia/Nebula-Backend.git
  • Now move to the project directory on your machine.
    cd nebula-backend
  • Install all the dependencies using:
npm install 
  • Run the development server using:
npm run dev
  • Now the server is running on PORT 5000 or the PORT mentioned in the environment .env.dev variables
Note: Setup the environment variables as mentioned below

Run unit test

Use the given below command to run all the unit test cases.

npm run test

What are the environment variables required to run the project locally on a machine?

  • Follow these steps to set the environment variable for development:
  • Move to the root directory of the project and open .env.dev (for development) or .env.test (for testing)
  • PORT = 5000
  • NODE_ENV = "development"
  • JWT_SECRET=""
  • DATABASE_URL=""

Allowed HTTPs requests:

POST    : To create resource 
PUT   : To Update resource
GET     : Get a resource or list of resources
DELETE  : To delete resource

Description Of Nebula API Server Responses:

Code Name Details
200 OK the request was successful.
201 Created the request was successful and a resource was created.
204 No Content the request was successful but there is no representation to return (i.e. the response is empty).
400 Bad Request the request could not be understood or was missing required parameters.
401 Unauthorized authentication failed or user doesn't have permissions for requested operation.
403 Forbidden access denied.
404 Not Found resource was not found.
405 Method Not Allowed requested method is not supported for resource.
409 Conflict resourse with given id already exist.
429 Too many requests sent too many requests to the server in short span of time


Contributing 💻

We are happy to see you here and we welcome your contributions towards Nebula. Contributions are not limited to coding only, you can help in many other ways which includes leaving constructive feedback to people's Pull Request threads also.

Nebula also provides an extensive list of issues, some of them includes labels like good-first-issue, help-wanted. You can take a look at good-first-issue issues if you are new here but you are free to choose any issue you would like to work on.

If there's no issue available currently, you can setup the project locally and find out the bugs/new features and open issues for that and discuss the bugs or features with the project maintainers or admins.

After choosing an issue and doing changes in the code regarding that, you can open up a Pull Request (PR) to main branch to get your work reviewed and merged!

We also have a public chat room on Slack. Drop by and say hello in case you wish to contribute!

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Hrishikesh Agarwal

💻

Vinayak Sharma

💻

Nihar Sanda

💻

Pritish Samal

💻

Vivekkumar Javiya

📖

This project follows the all-contributors specification. Contributions of any kind welcome!