A professional, enterprise-grade full-stack application for tracking patient health records. Built with modern technologies and best practices, this platform enables healthcare providers to securely manage patient information and medical records.
Health-Records-Tracker-App/
├── .github/
│ └── workflows/
│ └── ci.yml # CI/CD pipeline
├── backend/
│ ├── __tests__/ # Backend tests
│ ├── config/
│ │ ├── db.js # Database configuration
│ │ └── swagger.js # API documentation config
│ ├── controllers/ # Route controllers
│ │ ├── patientController.js
│ │ └── recordController.js
│ ├── middleware/ # Custom middleware
│ │ ├── errorHandler.js
│ │ └── validation.js
│ ├── models/ # Mongoose models
│ │ ├── Patient.js
│ │ └── Record.js
│ ├── routes/ # API routes
│ │ ├── patients.js
│ │ └── records.js
│ ├── utils/ # Utility functions
│ │ └── logger.js
│ ├── validators/ # Input validators
│ │ ├── patientValidator.js
│ │ └── recordValidator.js
│ ├── .env.example # Environment variables template
│ ├── Dockerfile # Backend container
│ ├── jest.config.js # Jest configuration
│ ├── package.json
│ └── server.js # Application entry point
├── frontend/
│ ├── public/
│ │ └── index.html
│ ├── src/
│ │ ├── components/ # React components
│ │ │ ├── Header.js
│ │ │ ├── Footer.js
│ │ │ ├── PatientForm.js
│ │ │ ├── PatientList.js
│ │ │ ├── RecordForm.js
│ │ │ └── RecordList.js
│ │ ├── App.js # Main application component
│ │ ├── config.js # Frontend configuration
│ │ └── index.js # React entry point
│ ├── .env.example # Environment variables template
│ ├── Dockerfile # Frontend container
│ ├── nginx.conf # Nginx configuration
│ └── package.json
├── .dockerignore
├── .eslintrc.json # ESLint configuration
├── .gitignore
├── .prettierrc.json # Prettier configuration
├── .prettierignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── docker-compose.yml # Multi-container orchestration
├── LICENSE
└── README.md
git clone https://github.com/UNC-GDSC/Health-Records-Tracker-App.git
cd Health-Records-Tracker-App
docker-compose up -d
cd backend
npm install
cp .env.example .env
.env file:
PORT=5000
NODE_ENV=development
MONGO_URI=mongodb://localhost:27017/health_records_db
APP_NAME=HealthRecordsTracker
ALLOWED_ORIGINS=http://localhost:3000
RATE_LIMIT_WINDOW_MS=900000
RATE_LIMIT_MAX_REQUESTS=100
LOG_LEVEL=info
# Using Docker
docker run -d -p 27017:27017 --name mongodb mongo:7
# Or use local MongoDB installation
mongod
npm run dev
cd frontend
npm install
cp .env.example .env
.env file:
REACT_APP_BACKEND_URL=http://localhost:5000
REACT_APP_NAME=HealthRecordsTracker
npm start
cd backend
npm test # Run tests once
npm run test:watch # Run tests in watch mode
npm run test:coverage # Generate coverage report
cd frontend
npm test # Run tests in interactive mode
npm run test:coverage # Generate coverage report
# Backend
cd backend
npm run lint # Check for issues
npm run lint:fix # Fix auto-fixable issues
# Frontend
cd frontend
npm run lint
npm run lint:fix
# From root directory
npm run format # Format all code with Prettier
The backend includes comprehensive API documentation using Swagger/OpenAPI.
Access API Documentation:
API Endpoints:
Patients:
GET /api/patients - List all patientsGET /api/patients/:id - Get patient by IDPOST /api/patients - Create new patientPUT /api/patients/:id - Update patientDELETE /api/patients/:id - Delete patientRecords:
GET /api/records - List all records (supports ?patientId filter)GET /api/records/:id - Get record by IDPOST /api/records - Create new recordPUT /api/records/:id - Update recordDELETE /api/records/:id - Delete recordHealth:
GET /api/health - Health check endpointdocker-compose up -d
docker-compose logs -f
docker-compose down
cd backend
NODE_ENV=production npm start
cd frontend
npm run build
# Serve the build/ directory with your web server
Refer to .env.example files in both backend and frontend directories for all available configuration options.
Interactive API documentation is available at /api-docs when running the backend server.
Features:
Backend:
backend/__tests__/Frontend:
.test.js extensionWe welcome contributions! Please see our Contributing Guidelines for details on:
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)This project is licensed under the MIT License - see the LICENSE file for details.
UNC-Chapel Hill Google Developer Student Club (GDSC) Team
Made with ❤️ by UNC-GDSC