Find a local Therapist today!
A Cloud Database of Therapists Around the Country!Live Website (Frontend) - Therapist Finder
GitHub Link (Frontend) - Therapist Finder
Live Website (Backend) - Therapist Finder
GitHub Link (Backend) - Therapist Finder
CRUD Web Application built on
Node.js · Express · MongoDB · React · React Google Login
- 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
- 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
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'
}]
})
-
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
-
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
-
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
- HTML
- CSS
- JavaScript
- Google Fonts
- Heroku
- Express
- Netlify
- React
- MongoDB
- Mongoose
- Bootstrap
- Node
- React Google Login