Medical Tracker is a full-stack mobile application designed to help users track their health, manage medications, and perform symptom checks. It features a React Native frontend built with Expo and a Node.js/Express backend with a PostgreSQL database.
- User Authentication: Secure login and registration system.
- Health Checks: Perform symptom checks and receive predictions.
- Medication Reminders: Track medications and set reminders.
- User Profiles: Manage medical history and allergies.
- Full-Stack Architecture: Robust backend API handling data persistence.
- Frontend: React Native, Expo, TypeScript
- Backend: Node.js, Express, TypeScript
- Database: PostgreSQL
- Authentication: JWT (JSON Web Tokens)
- Node.js (v18 or later recommended)
- Docker Desktop (for local PostgreSQL database)
- Expo Go app (for testing on mobile device)
-
Clone the repository:
git clone <repository-url> cd medical-tracker
-
Install dependencies:
npm install
Create a .env file in the root directory:
DATABASE_URL=postgresql://postgres:password@localhost:5432/medicaltracker
SESSION_SECRET=your-secret-keyCreate a .env.local file in the root directory:
REACT_APP_API_URL=http://localhost:3000Ensure Docker Desktop is running, then start the PostgreSQL container:
docker-compose up -dRun the backend server in a separate terminal:
npm run server
# or
npx ts-node server.tsThe server will start on http://localhost:3000.
Run the Expo development server in another terminal:
npm run dev
# or
npx expo startScan the QR code with the Expo Go app on your mobile device or press w to run in the web browser.
The backend provides the following API endpoints:
POST /api/auth/login: Login or register a user.
GET /api/health-checks: Get all health checks.POST /api/health-checks: Save a new health check.GET /api/health-checks/:id: Get a specific health check.
GET /api/medications: Get all medication reminders.POST /api/medications: Create a new medication reminder.PUT /api/medications/:id: Update a medication reminder.DELETE /api/medications/:id: Delete a medication reminder.
GET /api/profile: Get user profile.PUT /api/profile: Update user profile.
App.tsx: Main entry point of the React Native app.server.ts: Entry point of the Express backend server.screens/: Contains React Native screens.components/: Reusable UI components.navigation/: Navigation configuration.hooks/: Custom React hooks.utils/: Utility functions.constants/: App constants.contexts/: React Contexts for state management.assets/: Images and other static assets.
Piyush Chandrakar 🎓 B.Tech in ECE @ IIIT Naya Raipur 📧 www.linkedin.com/in/piyushchandrakar13