Giter Site home page Giter Site logo

sinfulhymn / therapist-finder-frontend Goto Github PK

View Code? Open in Web Editor NEW

This project forked from germanokuerten/therapist-finder-frontend

1.0 0.0 0.0 3.73 MB

Therapist Finder A Cloud Directory of therapists! A cloud based web application that displays a directory of therapists where users can view and leave comments on individual therapists.

JavaScript 11.90% CSS 87.18% HTML 0.92%

therapist-finder-frontend's Introduction


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)

therapist-finder-frontend's People

Contributors

briannag31 avatar germanokuerten avatar jpcoding23 avatar sinfulhymn avatar

Stargazers

 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.