Giter VIP home page Giter VIP logo

girl-code-it / opportunity-calendar-backend Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 30.0 379 KB

Opportunity Calendar is the one-stop place to refer important opportunities available in tech-space like newly posted jobs, internships, hackathons, tech-conferences, scholarships, etc.

Home Page: https://opportunity-calendar.herokuapp.com/

License: MIT License

Shell 1.01% JavaScript 98.99%

opportunity-calendar-backend's People

Contributors

abdus avatar abhay27chauhan avatar akshatvirmani avatar ashukv avatar ay2306 avatar guptatanisha avatar haneesha123 avatar jnv27 avatar kashish0423 avatar manvityagi avatar nandini040 avatar priyanshu20 avatar ritik307 avatar ritucs avatar rohithmsr avatar samridhi-98 avatar shubham-kumar-2000 avatar subhangini avatar sukriti-sood avatar vishal1003 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

opportunity-calendar-backend's Issues

User Model

I think we should create a User Model for different users , so that they can view various opportunities and apply to them as per their need and requirements , along with this a moderator who can verify if the job posted is genuine or not

Error in installation commands in README.md

Expected Behavior

In the install section of README.md, the command for starting the application is supposed to be npm run start:dev

Current Behavior

By using npm start, we get the error npm ERR! missing script: start

Can I make a PR fixing this issue?

Add 'onlyForFemale' field in createOpportunity API

In controllers/opportunity/index.js , managers/opportunity/index.js , services/opportunity/index.js , update the createOpportunity method to create the Opportunity with one more field onlyForFemale.

Update the marking scheme of GSSOC in README.md

Prerequisites

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed
  • I'm reporting the issue to the correct repository (for multi-repository projects)

Expected Behavior

The marking scheme of GSSOC has been updated and the changes have not been updated in the README file of this project.

User authentication and routes protection using JSON Web Tokens (JWT)

  • I am running the latest version
  • I checked to make sure that this issue has not already been filed
  • I'm reporting the issue to the correct repository (for multi-repository projects)

Expected Behavior

@Manvityagi I guess the User api needs to be integrated. There is no user authentication as of now (while the UI is already ready for this). Since there's no user api hence we are not able to proceed with the (Bookmark/Save and share functionality).
I also checked that the frontend is in React, so probably you guys will be using RESTful APIs. So I wish to contribute to this project by implementing the following features -

  • Authentication using JWT
  • Routes protection middlewares to prevent unauthorized access of certain routes.

Expected end result :

  • User authentication
  • We can secure our APIs with this jwt middleware.
  • userId, admin access can be stored in jwt which can be decoded in frontend to use further.

Current Behavior

No such API exists as of now.

Create the GET Opportunities API

  1. Do the required documentation change here
  2. The GET API should be divided into the controllers, services, and managers as per the convention (can lookup the POST API for reference), Refer Project Structure to know the significance of controllers, managers, services.
  3. The endpoint should be /opportunities?type=JOB
    The entries should be returned as per the query param type
    The 6 possible values if type query param are -
    'HACKATHON',
    'JOB',
    'INTERNSHIP',
    'SCHOLARSHIP',
    'CONFERENCE',
    'CODINGCOMPETITION',

Update .travis.yml

  • Add mongdb in services
  • Add script for running tests
  • Replace npm install by npm ci

Add the PATCH API for opportunities

  1. Add the PATCH API for opportunities
  2. Add corresponding documentation in routes/opportunity.js
  3. Add corresponding documentation in documentation/APIS.md

Separate the logic of Pagination in Managers

  • Make a folder helpers in root dir, and move all the pagination logic in managers/opportunity/index.js to a function in helpers/pagination.js, and use the function after importing in managers/opportunity/index.js.
  • The functionality of pagination should not be affected
  • This is being done to keep the code clean, modular, and maintainable

Oauth

Hello @admin I want to set up other Oauth routes like linkedin and facebook and also Google using Passport.js

Implement Pagination in the GET Opportunities API

  1. Use two additional query params - limit and offset
    Instead of returning all the opportunities return something like: limited_query_set = query_set[offset : offset + limit].
    An Example: if offset = 7 & limit = 20, The opportunities 7th to 27th should be returned.
    PS:
    Use
    "DEFAULT_PAGE_LIMIT" - 20
    "DEFAULT_PAGE_OFFSET", - 0
    The changes will be effectively done in /managers/opportunity/index.js in the getOpportunities function.

  2. Update the API documentation accordingly inside routes/opportunity.js

Update getAPI queryObject

  1. The GET API currently can filter only on the basis of opportunityType, modify it to filter on the basis of onlyForFemale field also, which is a boolean field in `opportunity schema
  2. Tests should be updated
  3. Swagger Documentation should be updated

Add more tests cases to DELETE API

Inside tests/managers/opportunity-test.js - > describe('deleteOpportunity')

  • "Test to check exception when the opportunity with given _id does not exist."
  • Check this to add multiple it inside describe
  • You may think of other test cases and them too

Small Update in readme

Inside this section https://github.com/Girl-Code-It/Opportunity-Calendar-Backend#documentation-,
update Swagger Docs link with https://opportunity-calendar.herokuapp.com/playground/
and put this link as the first value in the documentation list

No need to use body-parser when using express version 4.16+

Prerequisites

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed
  • I'm reporting the issue to the correct repository (for multi-repository projects)

Proposal

body-parser is been deprecated and Express version 4.16+, their own body-parser implementation is now included in the default Express package so there is no need for you to download another dependency.

You have added a line to your code that looks like the following:

  • app.use(bodyparser.json());

If you are using Express 4.16+ you can now replace that line with:

  • app.use(express.json());

You also have the following code in your environment:

  • app.use(bodyParser.urlencoded({extended: true}));

You can replace that with:

  • app.use(express.urlencoded());

Extract Swagger Schema into smaller files

Expected Behavior

As of now, the schema in Swagger documentation blocks (written as JSDoc) contains a response schema. This can be extracted into a separate file, and reference whenever needed using $ref. There are two benefits of doing it. It will reduce the file size so that the file can be maintained easily. Second, It will allow us to reuse certain schema in more than one places.

What needs to be done?

Extract the schema to a new file, preferably in docs/ROUTE_FILE_NAME.json(create if necessary). Then reference this file wherever required. For resources, please check Swagger docs (definitions, refs etc).

Documentation

@Manvityagi I would like to contribute to the project as a gssoc'21 participant ,but the documentation part is not accessible to me on confluence.

Github profile Links in the readme to open in a new tab

Prerequisites

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed
  • I'm reporting the issue to the correct repository (for multi-repository projects)

Expected Behavior

Links in the readme to open in a new tab so that it is easier for the user to navigate to GitHub codebase.

Backend: Discussion

Hello @Manvityagi ,
I would like to contribute on backend part of this project as part of GSSOC'21 programme. Willing to discuss more about this project. Add me to relevant group or discord channel whenever it will be created.

Create DELETE endpoint for opportunities

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed
  • I'm reporting the issue to the correct repository (for multi-repository projects)

Feature Request

I can see that there are apis for creating and fetching the opportunities but no api exists for updating and deleting. @Manvityagi @abdus Kindly look into this issue and assign it to me if it makes sense.

Add more test cases to Tests of PATCH API

Inside tests/managers/opportunity-test.js - > describe('updateOpportunity')

  • "Test to check exception when the opportunity with given _id does not exist."
  • Check this to add multiple it inside describe
  • You may think of other test cases

Update Tests of GET API

GET API Tests are not updated for the pagination feature,
All the tests in controllers, managers, services shall be updated as per the latest version of GET API.

Update README.md

I am a GSSOC'21 participant and would like to add a feature in README.md where the contributors get automatically updated.
Can you please assign this issue to me?

Clustering

Prerequisites

  • I am running the latest version
  • I checked the documentation and found no answer
  • I checked to make sure that this issue has not already been filed

Expected Behavior

Sever should run in cluster mode to run multiple instances of the server in fork mode to make it faster.

Current Behavior

Server is currently running in a non cluster mode.

Context

Reason

Module

I would like to work on this issue as a gssoc 21 participant.

write test-case

Please add test cases to this project. You are free to use any test suite(Mocha, for example). Make sure the tests are written in TypeScript.

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.