Healthcare API with medication management, pharmacy locator, and AI-powered multilingual assistance for South African languages.
# MediTrek API
A comprehensive medication management and multilingual health assistant API built with Node.js, Express, and MongoDB. This API provides medication tracking, pharmacy location services, and AI-powered language assistance supporting all 11 official South African languages.
## Features
### 🔐 User Authentication
- Secure user registration and login with JWT tokens
- Password hashing with bcrypt
- Profile management
### 💊 Medication Management
- Add and track medications with dosage and frequency
- Set custom medication reminders
- View medication history
### 🏥 Pharmacy Services
- Add pharmacy locations with geospatial data
- Manage pharmacy medication stock
- Search for medications at nearby pharmacies using location-based queries
### 🌍 Multilingual Assistant
- **Language Detection**: Automatically detects user's language
- **Translation**: Supports all 11 South African official languages (English, Afrikaans, Zulu, Xhosa, Sesotho, Setswana, Sepedi, siSwati, Tshivenda, isiNdebele, Xitsonga)
- **Text-to-Speech**: Azure-powered TTS in supported languages
- Three response modes:
- Text-only responses
- Text with base64 audio
- Downloadable audio files
## Tech Stack
- **Backend**: Node.js, Express.js
- **Database**: MongoDB with Mongoose ODM
- **Authentication**: JWT, bcrypt
- **AI Services**: Azure Cognitive Services (Translator & Text-to-Speech)
- **Geospatial**: MongoDB 2dsphere indexing
## Quick Setup
### Prerequisites
- Node.js (v14+)
- MongoDB instance
- Azure Cognitive Services account (for translation & TTS features)
### Installation
1. **Clone the repository**
```bash
git clone
github.com
cd server
```
2. **Install dependencies**
```bash
npm install
```
3. **Configure environment variables**
Create a `.env` file in the root directory:
```env
# Server
PORT=8000
# Database
MONGO_URL=mongodb://localhost:27017/
# Authentication
JWT_SECRET=your_secure_jwt_secret_key
# CORS
CORS …