Surgical Operation Reference and Interface Network Animal Clinic System
by Aja Magdaleno, Tommy Dang, James Rodgick, Eddie Kader, and Armando Pensado
This project is a prototype for an animal clinic system, created to demonstrate the use of Mongo DB, Express, React, and Node JS. This is an exercise that embodies a MERN single page application with React.
The application provides functionality to add basic elements like Doctors and Patients into the system, which are then used to create Appointments. Additionally, the system allows users to enter Medicines, that are used to compute the Dosages for Patients.
The application offers a restricted login functionality implemented by using ‘passport’ and the capability to send emails for Appointments and user accounts.
The application starts with a login view. Different than other applications that allow a user to sign up, only authorized users can log into the system, as this is an internal application for the Animal clinic. Authorized users are defined by the system administrator.
Once the proper credentials are provided, the application will present the home view, which has the main menu. This is a nontraditional menu, as the menu is represented by cards. By selecting the cards the system changes view revealing more functionality.
The navbar offers two options on the right, the option to return to the home view and logout. On the left, a burger menu opens a left-drawer as an optional way to navigate through the application.
The one single navigation option that is not represented by a card is the “Admin” menu option. This hidden in the drawer on purpose. It is within the admin view that the user can add or remove user, expect the built-in Admin account.
A system user profile will have an “admin” checkbox to identify who has administrative powers. Only administrators can navigate to all options offered by the system.
A regular user cannot add doctors, patients, and medicines, but will be able to set appointments, view medicine information, and use the dosage calculator.
Adding a new user, modifying or deleting a user will trigger an email to the user’s declared email account, informing them about the activity to their account.
The functionality to add Doctors and Patient is similar, but with differences in the views. The individual views show a card with the that component’s information for each element. In these screens, the user can create, update, or delete them. These views offer simple CRUD functionality.
For creating an appointment, it is required to define the title, description, date and time, and a doctor and patient. Creating, modifying, and deleting an appointment will trigger an email to both doctor and patient owner to inform them about this appointment.
The Dosage calculator functionality will use a patient, doctor, and medicine. The dosage will be determined base on the patient weight.
This application is beneficial for a NodeJS/React developer, providing sample programming structures using JavaScript, Express, Mongo DB, mongoose (ODM), and API routes that encapsulate the logic to access the database.
To start, the developer must have NodeJS and Mongo DB installed in the computer. After, that the project can be cloned and initialized. Here are the steps for getting started:
Install NodeJS into the computer (https://nodejs.org/en/). Download button and run through the installation file.
Install Mongo DB (https://www.mongodb.com/)
Clone or Fork the project into the computer.
Bring all external module dependencies using VS Code terminal and type the command:
npm i
After, the initialization, and using Microsoft Visual Code, the project folder should resemble as depicted below, and should be ready for execution.
npm start
The application will have no data, but should looks as depicted below.
This is a project for our personal learning process.
Implementing security with passport
https://github.com/pensadotech/SecureSite