Coder Social home page Coder Social logo

ittocean / petbook Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 19 KB

The Petbook project attempts to create a web app for people and voluntary groups to bring forth our furry friends who are looking for adoption.

License: MIT License

JavaScript 99.41% HTML 0.59%

petbook's People

Contributors

malulmiri avatar

Watchers

 avatar  avatar

petbook's Issues

Schema Planning

Agent,

One on the first steps of developing a MEAN stack web application, is to define and build its DB schema. To do so you are required to :

  • Think about the user cases in the application, what do you expect a user to do? who are the acting entities. (users, posts, comments ...?)
  • May as well write down an ERD. Keep in mind that we are using a no-SQL DB, so no pressure with subjects such as one-to-few relations.
  • Once you have a general idea of how you what things to be, you are almost ready to enter some code.

Take a look at models/dao.js which when required builds and returns a DAO instance.
The DAO instance is an object that contains a mongoose connection and instance of each mongoose model we created. The DAO instance allows us to query and change our DB.
You may notice that I've created two more modules (user.js, token.js) that the dao.js requires. The modules are invocable with the DAO instance as parameters.
Invoking these functions will inject the user mongoose model and token mongoose model as properties of the DAO instance.

Your assignment is to implement the rest of the model injecting modules according to the schema you devised.
Furthermore, you ought to backup all said modules with their own unit tests. You can see the existing tests in /test as examples.

Good luck!

Authentication Controller Module

Agent,

Your second task is to build a controller module that handles the third-party authenticated login requests.
To do so you will first edit the passport builder to include google OAuth2 strategy.
Once the strategy configuration is done you will be able to prefer the controller. The controller module creates and returns an express router to which you shall add the /google and /google/callback paths.
The function handling the login request who will be provided the user instance that is injected by the passport strategy, will use the provided user instance to return the logged in user's token in response.
You will also be required to create a new application via google developers to be provided with a client ID and secret and to be able to test that it all works.

Good luck!

API Controller Module

Agent,

Your mission is to build a controller module that handles the token authenticated API requests.
To do so you will be required to implement the unimplemented methods you already defined at apiController.js.
To test these methods you will have to create an appropriate test suite.

Good luck!

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.