Skip to content

2006coder/HES

Repository files navigation

🏥 HES - Health for every student

GitHub React Firebase

A modern web application that helps users find the right medical facilities based on their symptoms and location.

Notification: A super big update in code will be released soon.

  • I am working hard in merging current back end with a different front end made by other members of the team.

✨ Features

  • 🔍 Search for medical facilities using natural language descriptions of symptoms
  • 📍 Automatic location detection or manual location input
  • 🏥 View detailed information about nearby medical facilities
  • ⭐ Sort facilities by rating
  • 🔬 Filter by medical specialties
  • 📱 Responsive design for all devices

🛠️ Technology Stack

  • Frontend: React.js
  • Backend: Firebase/Firestore
  • NLP Processing: Custom keyword mapping (with planned GPT integration - I'm working on it)

🗂️ Project Structure

HES/
├── public/
│   └── index.html
├── src/
│   ├── components/
│   │   ├── Header.js
│   │   ├── LocationInput.js
│   │   ├── ResultCard.js
│   │   ├── ResultsList.js
│   │   ├── SearchBar.js
│   │   └── SortOptions.js
│   ├── services/
│   │   └── nlpService.js
│   ├── styles/
│   │   ├── App.css
│   │   ├── Header.css
│   │   ├── index.css
│   │   ├── LocationInput.css
│   │   ├── ResultCard.css
│   │   ├── ResultList.css
│   │   ├── SearchBar.css
│   │   ├── SortOptions.css
│   │   └── others(may add in future).css
│   ├── utils/
│   │   └── timeUtils.js
│   ├── App.js
│   ├── firebase_integration.js
│   └── index.js
├── facilities-data.json
├── upload-data.js
└── package.json

🚀 Installation & Setup

Prerequisites

  • Node.js
  • npm
  • Firebase account

Firebase Setup

  1. Create a Firebase Project:

    • Go to Firebase Console
    • Click "Add project" and follow the steps
    • Enable Firestore database in your project
  2. Get Firebase Config:

    • In your project settings, find the Firebase SDK configuration
    • Copy the configuration object for web apps
    • Replace the placeholder in src/firebase_integration.js with your config
  3. Get Service Account Key:

    • Go to Project Settings > Service Accounts
    • Click "Generate new private key"
    • Save the JSON file as project-name-firebase-adminsdk-fbsvc-theid.json in your project root
    • This file is needed for the data upload script

Installation Steps

  1. Clone the repository:

    git clone https://github.com/2006coder/HES.git
    cd HES
  2. Install dependencies:

    npm install
  3. Add new data to the json data file.

  4. Upload that data to Firebase:

    node upload-data.js
  5. Start the development server:

    npm start

📋 Using the App

  1. Allow location access or manually enter your location
  2. Enter your symptoms in natural language (e.g., "my back hurts")
  3. View the list of nearby medical facilities that match your needs
  4. Get directions or call the facility directly from the app

💾 Database Structure

The application uses Firestore with the following structure:

facilities/
  |- facilityId/
      |- name: string
      |- type: string
      |- address: string
      |- phoneNumber: string
      |- hours: object
      |- appointmentStyle: string
      |- price: string
      |- specialties: array
      |- rating: number
      |- openNow: boolean

⚠️ Important Notes

  • The project-name-firebase-adminsdk-fbsvc-theid.json service account file contains sensitive credentials. Never commit this file to your repository!
  • Make sure to replace the Firebase configuration in firebase_integration.js with your own Firebase project details.
  • The application currently uses a simple keyword matching for symptom analysis. Future versions will integrate with GPT for more accurate results.

🔧 Customizing the Data

You can customize the medical facilities in your database by editing the facilities-data.json file before running the upload script. The file follows this structure:

{
  "facilities": [
    {
      "name": "Facility Name",
      "type": "facility type",
      "address": "Full address",
      "phoneNumber": "Phone number",
      "specialties": ["specialty1", "specialty2"],
      "rating": 4.5,
      "Hours": {
        "Monday": "8am - 8pm",
        "Tuesday": "8am - 8pm",
        "Wednesday": "8am - 8pm",
        "Thursday": "8am - 8pm",
        "Friday": "8am - 8pm",
        "Saturday": "Closed",
        "Sunday": "Closed"
      }
      ...
    }
  ]
}

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

Group members

  • Bach Pham
  • Sora Owada
  • Arata Michael Katayama
  • Saki Takizawa
  • Noah

Made with ❤️ by 2006coder (Bach Pham)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •