Skip to content

FirePrometheus0109/patient-dashboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

patient-dashboard

This is a patient management dashboard application with a React frontend and a Node.js (Express) backend.

Project Structure

patient-dashboard/
├── backend/
└── frontend/

Prerequisites

  • Node.js (v18 or later recommended)
  • npm or yarn

Backend Setup

  1. Navigate to the backend directory:

    cd backend
  2. Install dependencies:

    npm install
  3. Set up environment variables: Create a .env file in the backend directory and add the following Firebase configuration variables. You can get these from your Firebase project settings.

    FIREBASE_API_KEY=your_firebase_api_key
    FIREBASE_AUTH_DOMAIN=your_project_id.firebaseapp.com
    FIREBASE_PROJECT_ID=your_project_id
    FIREBASE_STORAGE_BUCKET=your_project_id.appspot.com
    FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id
    FIREBASE_APP_ID=your_app_id
    FIREBASE_MEASUREMENT_ID=your_measurement_id
    
  4. Run the backend server:

    npm run dev

    The server will start on the default port (usually 3000 or specified in your environment).

Frontend Setup

  1. Navigate to the frontend directory:

    cd ../frontend
  2. Install dependencies:

    npm install
  3. Set up environment variables: Create a .env.local file in the frontend directory and add the URL of your backend server.

    VITE_API_URL=http://localhost:3001
    

    Note: Make sure the port matches the one your backend server is running on.

  4. Run the frontend development server:

    npm run dev

    The application will be available at http://localhost:5173 (or another port if 5173 is busy).

API Endpoints

All endpoints are prefixed with /api. The main resource is /patients.

Method Endpoint Description
POST /patients Creates a new patient.
GET /patients Retrieves all patients.
GET /patients/:id Retrieves a single patient.
PUT /patients/:id Updates a patient.
DELETE /patients/:id Deletes a patient.

Database Schema

The application uses Firestore. The patients collection has documents with the following structure:

Field Type Description
id string (auto-generated by Firestore)
firstName string Patient's first name.
middleName string (Optional) Patient's middle name.
lastName string Patient's last name.
dob string Patient's date of birth (YYYY-MM-DD).
status string "Inquiry", "Onboarding", "Active", "Churned"
city string Patient's city.
state string Patient's state or province.
zipCode string Patient's zip or postal code.

About

This is patient-dashboard

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages