THE CARDIAC NURSE
The Cardiac Nurse website is go-to platform for every nurse that specialise in anything that has to do with the cardiovascular health. It is an educational medium that all nurses can learn from, particularly those with keen interest in cardiology. See link to deployed site
Table of Contents
Ux
Agile Methodology
The plan for this project was carried out using the Agile Methodology in Github. Epics and User Stories were created using issues on git hub. Each user story explicitly explains the purpose of the issues. Each story was assigned a classification of must-have, should-have, could-have or future-have. It was prioritised using GitHub labels with different colors. See link to kanban board here. Various tasks performed were also itemized using the agile methodology in Github.
-
Epics
- Nurse Profile
- Nurse Blog
- Sign in/out
- Messaging
For simplicity in the readme documentation, I have categorized all user stories in to three below; Admin stories, Nurse stories and site visitors stories. However, visit my epics on git hub to see more of the agile methodology arrangement. I have created 4 Epics and 16 user stories and various tasks under each user stories.
Admin stories and Corresponding Acceptance Criteria
As the site administrator (For Nurse Blog app):
-
I can create, read, update and delete post so that I can manage the contents and flow of the site.
- Acceptance Criteria
- Scenario: Create Read and Update post
- Given: The admin navigates to django admin panel
- When: The admin add "/admin" to the site url
- Then: The django admin page loads and the admin can create read and delete post
-
I can create draft posts so that I can finish writing the content later.
- Acceptance Criteria
- Scenario: Create draft
- Given: The admin navigates to django admin panel
- When: The admin add "/admin" to the site url
- Then: The admin can create a draft post to complete and publish later
-
I can approve or disapprove comments so that prevent sharing inappropriate/offensive comments.
- Acceptance Criteria
- Scenario: Manage comments
- Given: The admin navigates to the django admin panel
- When: The admin add "/admin" to the site url
- Then The admin can click on "approve" button to approve comments or leave it unapproved. If approved, the comment can then be seen on the blog post page
As the site administrator (For Nurse Profile app):
-
I can verify and accept new nurses that what to join the platform so that they can be viewed by site visitors.
- Acceptance Criteria
- Scenario: Verify new nurses joining platform
- Given: A new nurse have join platform and admin navigates to admin panel
- When: The admin add "/admin" to the site url
- Then: The admin can click "action" and then choose "verify nurse" option. The new nurse can now be seen on the profile page of the website
-
I can add a new nurse profile, update or delete an existing nurse profile so that i can manage the content and flow of nurses in the site.
-
I can create a user profile and write about my career journey as a cardiac nurse so that I can be found and viewed on the site.
- Acceptance Criteria
- Scenario: Creating user/nurse profile
- Given: A user/nurse is registered
- When: The registered user click "Join our platform" button
- Then: The user/nurse can fill and submit the form to join platform. And then await verification by site administrator
-
I can upload my profile picture so that other site users can see what I look like.
- Acceptance Criteria
- Scenario: Upload user/nurse profile picture
- Given: A user/nurse is registered and filled the registration form
- When: The user/nurse click "Join our platform" button
- Then: The user/nurse can upload his/her picture by clicking "Choose File" on the form. And then await verification by the site administrator
Site visitors' stories and Corresponding Acceptance Criteria
As a visitor of the site:
-
I can view any nurse profile so that see their career journey.
- Acceptance Criteria
- Scenario: View various nurse profiles on the website
- Given: The site visitor navigate to the "our nurses" page
- When: The site visitor click "Our Nurses" button
- Then: The site visitor is now able to see the profile picture and name of nurses that are registered on the site
-
I can signup for an account so that I can like and comment on posts as well as create a profile if I am a cardiac nurse.
- Acceptance Criteria
- Scenario: Signing Up
- Given: The site visitor navigate to the signin page
- When: The site visitor click "Sign In" button
- Then: The site visitor is now able to register and have access to like and comment on post
-
I can view a list of post so that I can select one to read.
- Acceptance Criteria
- Scenario: See Post List
- Given: The site visitor navigate to the "Our Blog" page
- When: The site visitor click "Our Blog" button
- Then: The site visitor is able to various blog post to choose from.
-
I can click to open a post so that read the content of the post.
- Acceptance Criteria
- Scenario: Read Blog Post
- Given: The site visitor navigate to the "Our Blog" page
- When: The site visitor click one of the post in the post list
- Then: The site visitor is able read the content of the particular post
-
1 can view a paginated list of post so that I can select a post to view.
- Acceptance Criteria
- Scenario: See more post list
- Given: The site visitor is post list page and there are more than 6 posts
- When: The site visitor click on "next" button
- Then: The site visitor is able to see all the post on the next page
-
I can be able to like or unlike post so that I can interact with the content.
- Acceptance Criteria
- Scenario: Liking Posts
- Given: The site visitor registered and navigate to the our blog page
- When: The site visitor click "Our Blog" button
- Then: The site visitor is now able to like or unlike post
-
I can view the number of likes on individual post so that know the most popular post.
- Acceptance Criteria
- Scenario: View Number of Likes
- Given: The site visitor is registered or is sign in and have navigated to the blog post list
- When: The site visitor click on "Our blog" button
- Then: The site visitor is able to see the number of likes that a post have
-
I can be able to comment on post so that I can be able to leave feedback and engage further.
- Acceptance Criteria
- Scenario: Comment on Post
- Given: The site visitor is registered or is sign in and have navigated to a particular blog post
- When: The site visitor click on the hyperlink text on the blog post
- Then: The site visitor is has access to write comments on the post
-
I can view comments on each post so that know the most engaging post.
- Acceptance Criteria
- Scenario: View Comments
- Given: The site visitor is registered or is sign in and have navigated to a particular blog post
- When: The site visitor click on "Our blog" button
- Then: The site visitor is able to see and read the comment writen about the post.
Design
-
Wireframe
- Nurse Profile Detail Page
-
Database Structure
- Three models were created to produce the required database structure.
- NurseBlog model: represents the database for submitting a blog post. It has several fields, including "title", "slug", "author", "featured_image", "excerpt", "updated_on", "content", "created_on", "status", and "likes". The "author" field is a foreign key that links to the "User" model, which is part of Django's built-in authentication system. The "likes" field is a ManyToManyField that links to the "User" model as well, allowing multiple users to like a single blog post.
- Comment model: represents the database models for creating comments for the "NurseBlog". It has fields for the "post" it is commenting on, the "name" and "email" of the comment author, the "body" of the comment, the "created_on" date, and whether the comment has been "approved" or not. The "post" field is a foreign key that links to the "NurseBlog" model. The blog and comment model was an inspiration from code institute django walkthrough project "I think therefore I blog".
- Nurse profile model: represents the database model for a nurse's profile page. It has several fields, including "specialty", "nurse_name", "slug", "description", "nurse_image", "status", "created_on", and "profile_creator". The "profile_creator" field is a foreign key that links to the "User" model. It also has a "get_absolute_url" method that returns the URL for the nurse's profile page and a "save" method that generates a slug for the nurse's name if one is not already provided. The "ordering" Meta option is set to "-created_on" so that the most recently created nurse profiles are displayed first.
- The entitiy relationship diagram drawn using drawsql app and can be found in this link
-
- The flow chart of the website below:
-
Features
- Nurse profile detail page
- Site advert section: This section is beneath the profile of each nurse and it has an external link to the british cardiovascular society. Details of this advert is hidden on small devices
- Sign up, Log in and log out pages
-
CRUD Fuctionality
-
CREATE:
-
By clicking the button 'Join our platform' in the website, authenticated users/nurses are able to create a profile
-
This button is only visible to users that have signed in or registered.
-
READ:
-
Users (registered or not registered) are able to see various nurse profiles and blog posts available on the website
-
UPDATE & DELETE:
-
Users who are signed in/registered and have gone further to create a profile are able to edit/update as well as delete their profile should they wish to. This can be done using the edit and delete button respectively in the profile detail page on the website.
-
On the backend side of thing in django admin panel, the site administrator is able to perform all the CRUD functionality on both the profile app and blog app.
-
Features for Future Implementation
- Vancancies/Job opportunity app
- Research section
- Article archive
- Password reset
Testing
- I have included testing details during and post-development in a separate document called TESTING.md.
Technologies
-
Programming Languages
-
Frameworks and Libraries
-
Installed Packages
- 'django<4' gunicorn
- dj_database_url psycopg2
- dj3-cloudinary-storage
- django-summernote
- django-allauth
- django-cripsy-forms
Deployment
The site was deployed to Heroku. The steps used are as follows:
- Install Django and Gunicorn: pip3 install 'django<4' gunicorn
- Install Django database and psycopg: pip3 install dj_database_url psycopg2
- Install Cloudinary: pip3 install dj3-cloudinary-storage
- Creating the requirements.txt file with the following command: pip3 freeze --local > requirements.txt
- a django project was created using: django-admin startproject thecardiacnurse .
- the blog app was then created with: python3 manage.py startapp cardiacnurseblog
- which was then added to the settings.py file within our project directory.
- the changes were then migrated using: python3 manage.py migrate
- navigated to Heroku & created a new app called cardiacnurseprofile.
- added the Heroku Postgres database to the Resources tab.
- navigated to the Settings Tab, to add my key/value pairs configvars
- added the DATABASE_URL, SECRET_KEY & CLOUDINARY_URL to the settings.py file
- add an import os statement for the env.py file.
- added Heroku to the ALLOWED_HOSTS in settings.py
- created the Procfile
- pushed the project to Github
- connected my github account to Heroku through the Deploy tab
- connected my github project repository, and then clicked on the "Deploy" button
- See link to deployed site
Credits
- My code institute mentor Martina Terlevic for her constant guide and support
- Student care support from Oisin tahak.
- Stackoverflow platform
- The buttons in the site is styled by inspiration from webdeasy.de
Dedication
- This project is dedicated to my wife and son who was born 2 weeks before the submission deadline.
top of page