GithubHelp home page GithubHelp logo

animalshelter-prima's Introduction

Mongoose Pet Shelter

Introduction

Note: This can be a pair programming activity or done independently.

Imagine you work for a pet shelter, and you've been asked to create an MVP for a web application that will allow you to keep track of adoptions, abandonments, and drop-offs. Using Node, Express, MongoDB, and Mongoose, build a small app that will allow a user to manipulate pet records.

Exercise

Requirements

  • The application will represent an animal shelter and the user will have options to:

    • Adopt a pet
    • Abandon a pet
    • Leave a new pet in the shelter
  • The root page, ‘/animals’, will show a list of animals

  • For each animal on the index, a link will be displayed

    • If the animal is "orphaned", the link will be to "adopt" the animal
    • If the animal is "adopted", the link will be to "abandon" the animal
  • You will also need to create a form on the index where a user can input a new animal with the following data points:

    • Breed
    • Family
    • Name
    • Gender
    • DOB
  • Create a model Animal with these fields:

    • name(String)
    • breed(String)
    • DOB(Date)
    • gender(String)
    • family(String)
    • status(String)

Note: The “status” should default to “abandoned” when a user creates the animal, so after the pet was “created” or dropped off at the shelter, a user could click the link to adopt the pet.

Bonus:

  • Add some style
  • Add a field image to link pictures from the web
  • Add validations with Mongoose
  • Add a member_since field to your model that is defined by a custom model method. A user should never have to update this field explicitly, but rather it should be defined automatically on the click of the "Add an animal" button
  • Create a "success" view that shows all animals that have been adopted

Starter code

In the starter code folder, you'll find a Node app containing all the packages you need to get started - run npm install to set the packages and create a Mongo database named animalshelter.

Deliverable

Example Image

Additional Resources

animalshelter-prima's People

Contributors

primaulia avatar

Watchers

James Cloos avatar

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.