To view an example of how our application works, feel free to use the login below:
username: mariasd password: 123
- Run
npm run serve
, which compiles the frontend for hot-reloading with webpack and serves it at port8080
. - Open a new terminal (with the original one still open) and run
npm run dev
to start the backend at port3000
. - To view the website, connect to localhost:8080
Body
name
{string} - The shared account owner's nameusername
{string} - The user's usernamepassword
{string} - The user's password
Returns
- A success message
- The created shared account's details
- The username registered
Throws
403
if there is a user already logged in400
ifname
is empty or missing400
ifusername
orpassword
is not in correct format or missing409
ifusername
is already in use
Body
name
{string} - The new name for the shared account
Returns
- A success message
- The updated shared account details
Throws
401
if the user is not logged in400
ifname
is empty
Returns
- A success message
Throws
401
if the user is not logged in
Body
username
{string} - The user's usernamepassword
{string} - The user's password
Returns
- A success message
- The created shared account's details
Throws
401
if the user is not logged in400
ifusername
orpassword
is not in correct format or missing409
ifusername
is already in use
Body
username
{string} - The user's new username (optional)password
{string} - The user's new password (optional)
Returns
- A success message
- The updated shared account details
- The updated username
Throws
401
if the user is not logged in400
ifusername
orpassword
is not in correct format400
ifusername
andpassword
are both missing
Returns
- A success message
- The updated shared account details
Throws
401
if the user is not logged in404
if no credential with usernameusername
exists403
if the credentialusername
doesn't belong to the user's shared account
Returns
- A success message
- The signed in shared account's details, or null if not signed in
- The username used to authenticate, or null if not signed in
Body
username
{string} - The user's usernamepassword
{string} - The user's password
Returns
- A success message
- The shared account's details
- The username used to authenticate
Throws
403
if the user is already logged in400
if username or password is not in correct format or missing401
if the user login credentials are invalid
Returns
- A success message
Throws
401
if user is not logged in
Returns
- An array of insurance cards created by the user in alphabetical order with respect to their purpose
Throws
401
if user is not logged in
Body
subscriber_name
{string} - The insurance card's subscribermember_id
{string} - The insurance card's member ID (optional)group_number
{string} - The insurance card's group number (optional)plan_number
{string} - The insurance card's plan number (optional)plan_type
{string} - The insurance card's plan type (optional)purpose
{string} - The insurance card's purposenotes
{string} - Notes about the insurance card (optional)
Returns
- A success message
- A object with the created insurance card
Throws
401
if the user is not logged in400
If the subscriber_name or purpose is empty or a stream of empty spaces
Body
subscriber_name
{string} - The insurance card's subscriber (optional)member_id
{string} - The insurance card's member ID (optional)group_number
{string} - The insurance card's group number (optional)plan_number
{string} - The insurance card's plan number (optional)plan_type
{string} - The insurance card's plan type (optional)purpose
{string} - The insurance card's purpose (optional)notes
{string} - Notes about the insurance card (optional)
Returns
- A success message
- A object with the edited insurance card
Throws
401
if the user is not logged in403
if the user is not the owner of the insurance card400
If the subscriber_name or purpose is empty or a stream of empty spaces404
if the insuranceCardId is invalid
Returns
- A success message
Throws
401
if the user is not logged in403
if the user is not the owner of the insurance card404
if the insuranceCardId is invalid
Returns
- An array of medical contacts created by user in alphabetical order with respect to the last name of the contact
Throws
401
if the user is not logged in
Body
active
{string} - Whether the medical contact is in use or nottitle
{string} - The medical contact's titlefirst_name
{string} - The medical contact's first namelast_name
{string} - The medical contact's last namehospital
{string} - The medical contact's associated hospital (optional)specialty
{string} - The medical contact's specialty (optional)phone_number
{string} - The medical contact's phone numbernotes
{string} - Notes about the medical contact (optional)
Returns
- A success message
- A object with the created medical contact
Throws
401
if the user is not logged in400
If the first_name or last_name is empty or a stream of empty spaces400
If the phone_number is not a valid phone number (https://stackoverflow.com/a/16699507)
Body
active
{string} - Whether the medical contact is in use or not (optional)title
{string} - The medical contact's title (optional)first_name
{string} - The medical contact's first name (optional)last_name
{string} - The medical contact's last name (optional)hospital
{string} - The medical contact's associated hospital (optional)specialty
{string} - The medical contact's specialty (optional)phone_number
{string} - The medical contact's phone number (optional)notes
{string} - Notes about the medical contact (optional)
Returns
- A success message
- A object with the edited medical contact
Throws
401
if the user is not logged in403
if the user is not the owner of the medical contact400
If the first_name or last_name is empty or a stream of empty spaces400
If the phone_number is not a valid phone number (https://stackoverflow.com/a/16699507)404
if the medicalContactId is invalid
Returns
- A success message
Throws
401
if the user is not logged in403
if the user is not the owner of the medical contacts404
if the medicalContactId is invalid409
if the medicalContactId is already deactivated
Returns
- An array of medications created by the user in alphabetical order with respect to the name of the medication
Throws
401
if the user is not logged in
Body
name
{string} - The medication's namegeneric_name
{string} - The medication's generic compound namedose
{string} - The medication's dosenotes
{string} - Notes about the medication
Returns
- A success message
- A object with the created medication
Throws
401
if the user is not logged in400
If the name or dose is empty or a stream of empty spaces
Body
name
{string} - The medication's name (optional)generic_name
{string} - The medication's generic compound name (optional)dose
{string} - The medication's dose (optional)notes
{string} - Notes about the medication (optional)
Returns
- A success message
- A object with the edited medication
Throws
401
if the user is not logged in403
if the user is not the owner of the medication400
If the name or dose is empty or a stream of empty spaces404
if the medicationId is invalid
Returns
- A success message
Throws
401
if the user is not logged in403
if the user is not the owner of the medication404
if the medicationId is invalid409
if the medicationId is already deactivated
Returns
- The array of entries by the user sorted in descending order by date
Throws
401
if the user is not logged in
Body
type
{string} - The type of the log entrydetail
{string} - The detail of the log entrycondition
{string} - The condition of the log entryscale
{string} - The scale of the log entrynotes
{string} - The log entry's notes (optional)date
{Date} - The date associated with the log entry
Returns
- A success message
- The newly created entry object
Throws
401
if the user is not logged in400
if thetype
,detail
, orcondition
is empty or a stream of empty spaces400
if giventype
,condition
, orscale
is not in specified set of valid inputs400
ifdate
is empty/an invalid timestamp404
ifdetail
references a record that is doesn't exist403
ifdetail
references a record that is not owned by the user
Body
type
{string} - The type of the log entry (optional)detail
{string} - The detail of the log entry (optional)condition
{string} - The condition of the log entry (optional)scale
{string} - The scale of the log entry (optional)notes
{string} - The log entry's notes (optional)date
{Date} - The date associated with the log entry (optional)
Returns
- A success message
- The updated entry object
Throws
401
if the user is not logged in404
if theentryId
is invalid403
if the user is not the owner of the entry400
if thetype
,detail
, orcondition
is empty or a stream of empty spaces400
if giventype
,condition
, orscale
is not in specified set of valid inputs400
ifdate
is empty/an invalid timestamp404
ifdetail
references a record that is doesn't exist403
ifdetail
references a record that is not owned by the user
Returns
- A success message
Throws
401
if the user is not logged in404
if theentryId
is invalid403
if the user is not the owner of the entry