Skip to content

germanokuerten/therapist-finder-frontend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


About

Description Screenshot

- A cloud based web application that displays a directory of therapists where users can view and leave comments on individual therapists.
- Users will be able to explore therapists and view details regarding their specialties, location, background, and reviews from previous patients!
- Users can leave a review o therapists they have worked with previously!

(back to top)

Functionality

  • In this app we will access a database of therapists and display them on the index page
  • User will Be able to view a directory of therapists and browse any for full information
  • User will be able to sign in and leave comments on any therapist
  • if user is logged in they can - add reviews to any therapist - edit any of their reviews on a therapist - delete any of their reviews on a therapist

Routes

- get '/user/:googleId' --> allows user to sign in with their google account to acess features on page

- post '/user' --> adds new user to db

- get '/' --> renders home page

- get '/seed' -->  deletes all entries in mongodb and creates a news entries with seed data

- get '/therapists' --> renders index page ofall therapists

- get '/therapists/:id' --> renders show page and passes through users, event, and currently logged, as well as reference to other schemas in user variables, allow user to see db entry in full allow

- post '/therapists' --> will push new data to db and redirect back to index page

- delete '/therapists/:id' --> will delete db entry based on id of the db entry

- put '/therapists/:id' --> will update db entry based on id  of the db entry

- post '/therapists/review/:therapistId/user/:userId' --> pushes review schema into therapist and user redirects to show page 

- delete '/therapists/review/:therapistId/:reviewId/' --> deletes review from user and therapist

Models/Schema

Therapist/Review Schema:

const reviewSchema = new Schema({
    rreview: { type: String, require: true },
rating: { type: Number, min: 1, max: 5, default: 5, require: true },
    reviewedBy: { 
        type: mongoose.Schema.Types.ObjectId,
        ref: 'User',
        required: false }
    },
    {timestamps: true}
)

const therapistSchema = new mongoose.Schema({
    name:{ type: String, unique: true, required: true },
    description:{ type: String, required: true },
    portrait:{ type: String, required: true  },
    address:{ type: String, required: true
    },
    phoneNumber:{ type: String, match: /^(\()?\d{3}(\))?(-|\s)?\d{3}(-|\s)\d{4}$/, required: true },
    tags:[String],
    latlng:[String],
    reviews: [reviewSchema]
})

User Schema:

const userSchema = new mongoose.Schema({
    name:{ type: String, required: true },
    email:{ type: String, required: true, unique: true },
    password:{ type: String, required: false },
    phone:{ type: String, match: /^(\()?\d{3}(\))?(-|\s)?\d{3}(-|\s)\d{4}$/, required: false },
    avatar:{ type: String, required: false },
    googleId:{ type: String, required: true },
    reviewedTherapists: [{
        type: mongoose.Schema.Types.ObjectId,
        ref: 'Therapist'
    }]
})

Current State

  • User is currently able to visit the site and see a directory of therapists

  • User is able to log in through React Google Login

  • User is able to click on any of the therapists displayed to view their full information

  • If user is logged in thier comment will reflect their Google user information

  • User will be able to see all comments on each therapist

(back to top)

Roadmap and Future Implementations

  • Allow users to only edit and delete only their comments

  • Allow users to view a list of their comments and the therapists they have reviews in one centralized page

  • Allow users to sort therapists by tags

  • Allow user to create their own profile

-Allow users to leave a star rating that creates an average rating for the therapist

(back to top)

User Story

  • As a user, I should be able to see directory of Therapists on Index

  • As a user, I should be able to click any of the therapists for their full description/data on index page

  • As a user, On the show page I should be able to see all of the therapist's data

  • As a user, On the show page I should be able add a review for the therpaist

  • As a user, I should be able to log in on the header and view and edit my reviews

(back to top)

Technologies used

  • HTML
  • CSS
  • JavaScript
  • Google Fonts
  • Heroku
  • Express
  • Netlify
  • React
  • MongoDB
  • Mongoose
  • Bootstrap
  • Node
  • React Google Login

(back to top)

Therapist Finder WireFrame and ERD

ERD

Model

Wireframes

Index Page Show Page

(back to top)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •