Online resource for children of aging parents.
Ric Mershon
After three years of experience managing the care of my elderly parents I've been unable to find a single resource for the caregivers of elderly that addresses all the issues for caregivers.
'Yelp' for caregivers.
See the project markdown for more information.
Got to https://rmersh-express-mongo-example.herokuapp.com/.
- Built with Node.js backend tools.
- Uses a central server file, server.js, as an entry point for the applications. Defines all the dependencies, configuration, middleware, database opertaions and controllers needed for the app to run. Defines the root route and sets up the listener for the html port.
- Relational model between caregivers and reviews.
- Uses public folder for css and images.
- Uses partials for head, nav and footer elements.
- Incorporates a mobile first and responsive design using Bootstrap.
- Sticky menu bar.
There are schemas for caregivers
, users
and reviews
.
const careGiverSchema = mongoose.Schema(
{
name: { type: String, required: true },
location: { type: String, required: false },
email: { type: String, required: false },
phone: { type: String, required: false },
webSite: String,
contact: {
firstName: String,
lastName: String,
},
description: { type: String, required: true },
takingNewClients: { type: Boolean, default: false },
services: Array,
rating: { type: Number, max: 5 },
reviews : [ Review.schema ]
},
{ timestamps: true }
);
const reviewSchema = new mongoose.Schema(
{
text: String,
postedBy: String,
rating: { type: Number, max: 5 }
}
)
const userSchema = new Schema({
username: { type: String, unique: true, required: true },
password: String
})
There are routes for caregivers
, reviews
, sessions
and users
.
Action | URL | HTTP Verb | Description |
---|---|---|---|
Index | /caregivers | GET | Displays all caregivers |
New | /caregivers/new | GET | Displays new caregiver form |
Create | /caregivers | POST | Creates new caregiver |
Show | /caregivers/:id | GET | Shows an individual caregiver's information |
Edit | /caregivers/:id/edit | GET | Displays the edit caregiver form |
Update | /caregivers/:id | PUT | Changes caregiver with info from Edit action |
Destroy | /caregivers/:id | DELETE | Deletes a caregiver |
Action | URL | HTTP Verb | Description |
---|---|---|---|
Seed | /caregivers/seed | GET | Seeds database |
Remove | /caregivers/remove | GET | Resets database |
Action | URL | HTTP Verb | Description |
---|---|---|---|
New | /caregivers/:id/reviews/new | GET | Display review form |
Create | /caregivers/:id/reviews | POST | Creates new review |
Action | URL | HTTP Verb | Description |
---|---|---|---|
New | /users/new | GET | Displays new user form |
Create | /users | POST | Creates new user |
Action | URL | HTTP Verb | Description |
---|---|---|---|
New | /sessions/new | GET | Displays login form |
Create | /sessions | POST | Creates new session after successful login |
Destroy | /sessions | DELETE | Logs user out and deletes session |
Layout done with Bootstrap.
Several partials are used:
head.ejs
- for the head of all ejs/html files.nav.ejs
- for the dynamic navigation bar. Changes based on session state.footer.ejs
- for the footer, which still needs work.
- Express - backend framework for Node.js.
- method-override - to use HTTP verbs PUT and DELETE where not otherwise supported by the client.
- MongoDB - a general purpose, document-based, distributed database.
- Mongoose - MongoDB object modeling for Node.js.
- express-session - middleware for creating sessions.
- dotenv - for loading environment variables from a .env file into process.env.
- Bootstrap - for a responsive, mobile-first layout.
- Proper handling of failed logins.
- .env issues.
- Review routes in a separate file.
- User
- Care manager
- Care provider
- Events
- Blog entries
- living communities
- Law issues
- Financial issues
- Moving services
- News related to seniors
- Doctors
- Newsletter
- Message board
- Clean up footer.
- General navigation.
- A lot of additional functionality.
- Would like to understand better how to incorporate code into objects.
Thanks Brendan!