
Welcome to the SymptomPulse backend repository! This Node.js/Express API (powered by TypeScript, Prisma, and MySQL) is the backbone of the SymptomPulse mobile application, which empowers users to check symptoms, receive potential condition insights via the OpenFDA API, manage medications with reminders, and securely track their health history.
Explore the project »
·
Report Bug
·
Request Feature
Table of Contents
SymptomPulse is a mobile application designed to assist users in monitoring their health by checking symptoms and managing medications effectively. With an intuitive interface and robust backend support, users can easily:
- Select Symptoms: Choose from a comprehensive list (e.g., "headache," "fever") to check for potential medical conditions.
- Receive Condition Insights: Leverage the OpenFDA API to get possible medical condition suggestions based on the symptoms selected.
- Manage Medications: Add and schedule medications with reminders including dosage and timing.
- Track History: Securely view and analyze their symptom and medication history.
The backend handles all data processing, API integrations, and user authentication, ensuring a secure and reliable experience.
-
Symptom Selection & Analysis
Users can select symptoms from a predefined list and get possible medical conditions based on data from the OpenFDA API. -
Medication Management
Add medications with detailed reminders (time, dosage) to ensure users never miss a dose. -
Secure History Tracking
All user data is stored securely, allowing users to view their symptom and medication history at any time. -
Robust Authentication
JSON Web Tokens (JWT) and Bcrypt are utilized to ensure secure user authentication and authorization. -
Efficient Data Handling
Built with MySQL and Prisma ORM, the backend provides robust data modeling and management capabilities.
This backend is powered by a modern, scalable stack ensuring robust performance and maintainability:
Follow these instructions to set up the SymptomPulse BACKEND on your local machine.
- Node.js (v22+ recommended)
Download & Install Node.js - MySQL
Download & Install MySQL - npm or yarn (npm comes bundled with Node.js)
Install Yarn - Postman (optional, for API testing)
Download Postman
-
Clone the repository
git clone https://github.com/gayanukabulegoda/SymptomPulse-BACKEND.git
Navigate into the project directory:
cd SymptomPulse-BACKEND
-
Install dependencies
npm install
or
yarn install
-
Configure Environment Variables
Create a.env
file in the root directory and add the following configuration:DATABASE_URL="mysql://<username>:<password>@localhost:3306/symptompulse_db" JWT_SECRET="your_jwt_secret_key" JWT_EXPIRES_IN="7d" # adjust as necessary PORT=5000 NODE_ENV=development CURRENT_API_VERSION = "v1" CLIENT_URL = "http://localhost:8081" OPENFDA_API_URL="https://api.fda.gov/drug/event.json"
Adjust the values based on your local or production environment.
-
Database Setup with Prisma
Run the Prisma migrations to set up your database schema:npx prisma migrate dev
This will synchronize your MySQL database with the schema defined in
prisma/schema.prisma
.
-
Start the Development Server
npm run dev
or
yarn dev
The server should now be running at http://localhost:5000.
-
Build & Run for Production
npm run build npm start
or
yarn build yarn start
This compiles the TypeScript code to JavaScript and starts the production server.
-
Testing (if applicable)
To run tests:npm run test
or
yarn test
Detailed API documentation—including endpoints, request/response formats, and sample payloads—is available via our Postman Collection.
- Ensure the server is running before making requests.
- The Postman documentation provides all necessary information to integrate and test the API effectively.
The frontend for SymptomPulse is built with modern web technologies. For more information, please visit the SymptomPulse FRONTEND repository:
Distributed under the MIT License. See LICENSE
for more details.
© 2025 Gayanuka Bulegoda