GithubHelp home page GithubHelp logo

petpets's People

Contributors

bransonng avatar chenjiehan318 avatar dingyuchen avatar tysg avatar xiaoyu-nus avatar

Stargazers

 avatar

Watchers

 avatar  avatar

petpets's Issues

Backend - Caretaker

  • set up schedule tracking for full-time and part-time
  • setup constraints for full-time (2 consecutive 150 days of work)

Dangling Docker images

โžœ  ~ docker image ls
REPOSITORY          TAG                 IMAGE ID            CREATED              SIZE
cs2102_app          dev                 e3c59a8fb994        About a minute ago   301MB
cs2102_app          prod                508a3e9dddf0        7 minutes ago        613MB
<none>              <none>              79fde778cc09        12 minutes ago       301MB
<none>              <none>              1b42cd7fbf8e        14 minutes ago       301MB
<none>              <none>              a6d2eb30ea6f        17 minutes ago       251MB

Currently need to periodically run docker image prune to remove these images and free up spaces. Need a better way to remove these images.

UI: House Keeping

Landing Page

  • Inline login on taskbar
  • Link to sign up
  • Replace favicon with Logo

Sign up Page

  • Improve Styling
  • Require valid url for gravatar url
  • Separate component between Login and SignUp

Dashboard Page

  • Blank page
  • Link to logout that clears the session

Configure Heroku Postgres

CI pipeline should recreate all tables and reseed the database, upon creating new review apps or staging deployments.

Consult ER diagram

Does the ER diagram directly translates to the table?

Pets and Pet Owners

  • Pets can have the same name, so we need a id field
    • However, since pets must be owned by a pet owner, there is no point for a pets table and we can add pets to a owner relationship. -> This means that there is no primary key in the pets entity. How do we show this?
    • If its ID dependency, do we still need primary key?

Bids

  • Transaction + credit card + bid: is it
    • a paid for relationship connected to credit card, transaction, bid; or,
    • an aggregation between credit card + transaction, and connected to bid

Leaves

  • Leave is an entity that contains start date and end date during which a full timer cannot work.
    • What is an atomic leave
  • Availability is an entity that contains the start date and end date during which a part timer can work
    • What is an atomic availability

Implement Logout

Backend: expose endpoint GET /api/logout that clears req.user.session

frontend: axios get req to '/api/logout', redirecting to landing page '/' on success

Backend Complex Query

  1. caretaker most jobs per month (maybe fulltime/parttime split)
  2. caretaker that earned the most in the month (maybe fulltime/parttime split)
  3. best caretaker per pet category according to rating to price ratio (but price changes? maybe average pet day price throughout month according to bids)

Backend - Pet Owner

As a pet owner, I would like to be able to search for pet sitters that are specialized for each of my pets

General idea:

Backend:
Given a selected pet (email, petname pair)

  • -> search for part time care takers
  • -> search for full time care takers
    Frontend
  • -> call both endpoints
  • aggregate in frontend, allow for filter between full time or part time

CareTaker - New Profile

Show empty page for CareTaker if user is not a careTaker.

  • Create care taker registration flow

Pets: supports CRUD

  • DB: create the pet and pet_category tables as per the ER diagram
  • Exposes relative server API, and create adequate client pages
  • At the moment, we can hard code the pet_category table?
    • ideally, this is done by the admin

Call for user stories

Implementation detail to manag Pet Owner and Care Taker relationship in sign up flow and database representation.
Overall UI design?

Things we can do now:

CRUD for:

  • pets
  • bids
  • credit card details

Sign in and Authenticated pages

POST api/signin should return:

username,
email,
bearer token,
user role (pet owner, care taker, admin)

These information is then persisted in the client's localStorage. The bearer token will be attached to the header of every subsequent request from the client to the server. This will help server to detect if the logged-in user has the permission to perform the requests.

The client will also use the user role field to determine which pages are shown to the user.

Pet Owner - Create Requests lifecycle

Display cards of Pets.

  • Support all CRUD operations.
  • Allow creating new pet care request from this page directly
    • redirect to new request page with all pet detail prefilled.

Backend - Triggers for Bids

Check that a bid can only be made for a caretaker based on these criteria

  • Full timer has < 5 active bids in the time period of the new bid
  • Part timer has < 5 active bids in the time period of the new bid if he has a rating >= 4
  • Part timer has < 2 active bids in the time period of the new bid if he has a rating < 4

Admin - dashboard

This is where DB query gets interesting; can fulfill the interesting query criteria. We can probably display

  • The caretaker who took care of the most pets in the past month
  • Total transaction amount in the past month
  • Total number of pets/caretakers, etc

Cannot Sign Up

  • update userschema in master (latest in dev)
  • change SignUpRequest definition to include address, phone, etc
  • define error response schema for Login and Signup
  • #14

Credit Card: support CRUD

  • DB: create a credit_card table as per the ER diagram
  • Server: expose api/payment/credit_cards CRUD endpoint,
    • Needs to be authenticated, and each user can only modify their own credit card information
  • Client: create /profile/payment page that handles CRUD operations that, ideally:
    • Displays a list of current credit cards; a placeholder if none

Deployment - Cache seeds

BCrypt hashsync is an expensive operation, which is not neccessary if seed settings are not modified.
Find a way to cache this.

Disconnecting Backend

Bug Description:

After encountering an error, frontend is unable to connect to the backend again.
Debugger shows:

Paused on Exception: 
TypeError: i.default.detectStore(...) is undefined

Steps to reproduce:

  1. From any page, attempt to access invalid url. eg localhost:3000/foo
  2. Return to valid url

Webpage will not be functional as script is paused by debugger.
Resuming then refreshing the page will not resolve the error.

Backend - Monthly Payment Records

Full Time

  • Calculate full time fixed salary of 3000 for first 60 days taking care of any pet (overlaps of many pets on same day count as a sum)
  • FT gets 80% of any additional pet days as bonus/commission

Part Time

  • gets 75% of any earnings

Endpoints

  • Provide get endpoints for fulltimer and parttimer

Backend - Refine Search

Only return caretakers that fit these additional criteria

  • Full timer has < 5 active bids in the time period of the search
  • Part timer has < 5 active bids in the time period of the search if he has a rating >= 4
  • Part timer has < 52active bids in the time period of the search if he has a rating < 4

Suggested to add a new query and subtract these caretakers from those returned by search_caretaker.

Pet Owner - Past Orders

In the Past Orders page for pet owners, display a list of upcoming orders with the current status, and buttons for the next step.

Current status is one of confirmed, paid, reviewed. The corresponding next step for the statuses are Pay(by credit card), Review.

Backend - Feedback and Rating

  • Endpoints for sending feedback and review per BID
  • identified by PK of BID

Should essentially be another update endpoint similar to setting bid status, but now we update these values

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.