Skip to content

Code-N-Collab Server is the Backend for the Code-N-Collab for real-time exchange of data between users

License

Notifications You must be signed in to change notification settings

atharmohammad/Code-N-Collab-Server

Repository files navigation


Contributors Forks Stargazers MIT License Issues LinkedIn

Table of Contents
  1. About
  2. Getting Started
  3. Contributing
  4. Contact
  5. Resources
  6. License
Collaboration

πŸ”– About

Code-N-Collab server is backend for Code-N-Collab , It make Code-N-Collab real-time collaborative using sockets and also serves as backend for blogs

Website

Code-N-Collab

πŸš€ Features

It provides users with :-

  • Real-time code editor : Users can collaborate with their team on issues and solve CP problems using a real-time code-editor(like Google Docs)

  • Lockout Championship : For Cp lovers, they can compete in a lockout championships with their friends to and challenge your friends for championship,filter problems with preferred difficulty and improve you CP skills

  • Blogs : To find new people and share your knowledge , platform provides users blogs to write learn and share

πŸ”₯ Getting Started

Prerequisites

Setup your free GCP account for google Oauth

  • https://support.google.com/cloud/answer/6158849?hl=en

  • Setup API&Credentials for Web Application

  • Provide a Redirect URI in the Credentials(The redirect_URI will be used to redirect to the page after login with google,in below environment variable example we have setup redirect_URI=http://localhost:3000/homepage/ , using port 3000 you can use any port but make sure to add /homepage after that to redirect to correct route)

  • copy <YOUR_GOOGLE_CLIENT_ID> and <YOUR_GOOGLE_CLIENT_SECRET>

Setup your MONGO_DB atlas

  • Atlas Docs
  • get the <MONGO_DB_URL> from your cluster , you have to use it in env vars

Setup Environment variables

  • you can declare your env vars using dotenv like below :
     CORS_ORIGIN=*
     GOOGLE_CLIENT_ID=<YOUR_GOOGLE_CLIENT_ID>
     GOOGLE_CLIENT_SECRET=<YOUR_GOOGLE_CLIENT_SECRET>
     redirect_URI=http://localhost:3000/homepage/
     BaseURI=http://localhost:8080/
     MONGO_DB_URL=<YOUR_MONGO_DB_URL>
     COMPILE_CLIENT_ID1=<COMPILE_CLIENT_ID1>
     COMPILE_CLIENT_SECRET1=<COMPILER_CLIENT_SECRET1>
     COMPILE_CLIENT_ID2=<COMPILE_CLIENT_ID1>
     COMPILE_CLIENT_SECRET2=<COMPILER_CLIENT_SECRET1>
     COMPILE_CLIENT_ID3=<COMPILE_CLIENT_ID1>
     COMPILE_CLIENT_SECRET3=<COMPILER_CLIENT_SECRET1>
     COMPILE_CLIENT_ID4=<COMPILE_CLIENT_ID1>
     COMPILE_CLIENT_SECRET4=<COMPILER_CLIENT_SECRET1>

  • or you can declare your env vars in nodemon.json if you are using nodemon for development like below:
{
    "env":{
        "CORS_ORIGIN":"*",
        "GOOGLE_CLIENT_ID": "<YOUR_GOOGLE_CLIENT_ID>",
        "GOOGLE_CLIENT_SECRET": "<YOUR_GOOGLE_CLIENT_SECRET>",
        "redirect_URI" : "http://localhost:3000/homepage/",
        "BaseURI":"http://localhost:8080/",
        "MONGO_DB_URL":"<YOUR_MONGO_DB_URL>",
        "COMPILE_CLIENT_ID1":"<COMPILE_CLIENT_ID1>",
        "COMPILE_CLIENT_SECRET1":"<COMPILER_CLIENT_SECRET1>",
        "COMPILE_CLIENT_ID2":"<COMPILE_CLIENT_ID1>",
        "COMPILE_CLIENT_SECRET2":"<COMPILER_CLIENT_SECRET1>",
        "COMPILE_CLIENT_ID3":"<COMPILE_CLIENT_ID1>",
        "COMPILE_CLIENT_SECRET3":"<COMPILER_CLIENT_SECRET1>",
        "COMPILE_CLIENT_ID4":"<COMPILE_CLIENT_ID1>",
        "COMPILE_CLIENT_SECRET4":"<COMPILER_CLIENT_SECRET1>"
      }
}

Installation

   $ git clone https://github.com/<your-username>/Code-N-Collab-Server.git
   $ cd Code-N-Collab-Server
   $ git remote add upstream https://github.com/atharmohammad/Code-N-Collab-Server.git
   $ npm install
   
   $ npm start // if you are using dotenv
   
   //or
   
   $ npm run dev // if you are using nodemon.json 
   

πŸ’ Contribution guidelines

we encourage organizations and individuals to contribute requirements, documentation, issues, new templates, and code. For code contributions, read :

πŸ“² Contact

Mohd Athar - mohd.rule123@gmail.com
Adnan Shamsi - adnanshamsi023@gmail.com

πŸ“š Resources

License

Apache License 2.0

About

Code-N-Collab Server is the Backend for the Code-N-Collab for real-time exchange of data between users

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages