Coder Social home page Coder Social logo

code-dabblers / magicreads_be Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 6.0 227 KB

MagicReads is a web app for those who love to read and write and share their stories with the world. This repo is for the Backend of the app.

License: MIT License

JavaScript 100.00%
backend expressjs hacktoberfest hacktoberfest2020 mongodb mongoose nodejs passport stories webapp

magicreads_be's People

Contributors

czechyoungcoder avatar fabcodingzest avatar najimali avatar sonali-sawlani avatar sphoorthigaddam avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

magicreads_be's Issues

Get the story data and update the vote counter of a story.

  • Work in routes/story.js to get the story data from the database and send it. Make sure to use the .lean() method for returning plain JavaScript objects instead of Mongoose documents and .populate() for populating a particular field (only those field can be populated that have ref key in their Data Model so do checkout models for reference).
  • Also, handle the route to update the vote counter for a particular story.

If possible do not change other code without co-ordination as others might be working on it too.

All the best ๐Ÿ˜„ ๐Ÿ‘

Get public stories data

  • Work in routes/index.js to get the public stories from the database and send it as a response along with a message. Make sure to use the .lean() method for returning plain JavaScript objects instead of Mongoose documents and .populate() for populating a particular field (only those field can be populated that have ref key in their Data Model so do checkout models for reference).

If possible do not change other code without co-ordination as others might be working on it too.

All the best ๐Ÿ˜„ ๐Ÿ‘

Edit Story details of a story created by the user.

  • Work in routes/edit.js to get the story details from the database and send it. Make sure to use the .lean() method for returning plain JavaScript objects instead of Mongoose documents and .populate() for populating a particular field (only those field can be populated that have ref key in their Data Model so do checkout models for reference).

  • Update the story details as well.

If possible do not change other code without co-ordination as others might be working on it too.

All the best ๐Ÿ˜„ ๐Ÿ‘

Add the feature to Create a story.

Work in routes/create.js to create a story and connect it with the corresponding user creating it. Created Stories Id is to be pushed inside myStories array in User Model while creating a story.

Story Model is already specified so refer to know the required variables in the database.

If possible do not change other code without co-ordination as others might be working on it too.

All the best ๐Ÿ˜„ ๐Ÿ‘

Add Swagger docs for the routes in different files.

Add js docs for all the present routes to be documented using swagger. I have already documented a couple of routes like /dashboard and /story/{storyId} so you can refer to them whenever needed.

To see the docs result in the browser, run the server and go to the route / which will redirect you to api docs.

Refer to Swagger Editor to know more.

Multiple people can work on this issue so whoever wants to take it can specify the file they wanna work on in routes/ directory.

Get stories in users reading list and library.

  • Work in routes/user.js to get the reading list and user library of the user from the database and send it as a response along with a message. Make sure to use the .lean() method for returning plain JavaScript objects instead of Mongoose documents and .populate() for populating a particular field (only those field can be populated that have ref key in their Data Model so do checkout models for reference).

If possible do not change other code without co-ordination as others might be working on it too.

All the best ๐Ÿ˜„ ๐Ÿ‘

Edit User settings for the user.

  • Work in routes/user.js to get the user details from the database except for credentials like password and send it. Make sure to use the .lean() method for returning plain JavaScript objects instead of Mongoose documents and .populate() for populating a particular field (only those field can be populated that have ref key in their Data Model so do checkout models for reference).

  • Update the user settings as well.

If possible do not change other code without co-ordination as others might be working on it too.

All the best ๐Ÿ˜„ ๐Ÿ‘

Get the chapter data along with adding and deleting comments on a particular chapter.

  • Work in routes/story.js to get the chapter data from the database and send it. Make sure to use the .lean() method for returning plain JavaScript objects instead of Mongoose documents and .populate() for populating a particular field (only those field can be populated that have ref key in their Data Model so do checkout models for reference).
  • Also, handle the route to add and delete a comment for a particular chapter.

If possible do not change other code without co-ordination as others might be working on it too.

All the best ๐Ÿ˜„ ๐Ÿ‘

Implement user register and login system

Implement the user login and register system

Use Passport-jwt to implement a custom User Registration and Login system for the project. The models are already in config directory so work accordingly. Some strategy for jwt is already written in config/passport.js so check it out as well.

Add story to reading list and library for respective routes.

  • Work in routes/user.js to add a story to the reading list and user library of the user from the database and send it as a response along with a message. Make sure to use the .lean() method for returning plain JavaScript objects instead of Mongoose documents and .populate() for populating a particular field (only those field can be populated that have ref key in their Data Model so do checkout models for reference).
  • update reading list and library in respective routes by pushing the story Id in those lists of the user

If possible do not change other code without co-ordination as others might be working on it too.

All the best ๐Ÿ˜„ ๐Ÿ‘

Get the stories search results according to query and tags.

  • Work in routes/search.js to get the stories data from the database and send it. Make sure to use the .lean() method for returning plain JavaScript objects instead of Mongoose documents and .populate() for populating a particular field (only those field can be populated that have ref key in their Data Model so do checkout models for reference).

  • Right now we have two routes, one to search data according to the query and the other to search according to the tag(s). Manage the routes so both parameters can be optional and send the resulting stories from search.

If possible do not change other code without co-ordination as others might be working on it too.

All the best ๐Ÿ˜„ ๐Ÿ‘

Edit the chapter created by a user.

  • Work in routes/edit.js to get the chapter details from the database and send it. Make sure to use the .lean() method for returning plain JavaScript objects instead of Mongoose documents and .populate() for populating a particular field (only those field can be populated that have ref key in their Data Model so do checkout models for reference).

  • Update the chapter details as well.

If possible do not change other code without co-ordination as others might be working on it too.

All the best ๐Ÿ˜„ ๐Ÿ‘

Add the feature to create a chapter.

Work in routes/create.js to create a chapter and connect it with the corresponding story. Created Chapter Id is to be pushed inside chapters array in Story Model while creating a chapter.

Chapter Model is already specified so refer to know the required variables in the database.

If possible do not change other code without co-ordination as others might be working on it too.

All the best ๐Ÿ˜„ ๐Ÿ‘

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.