Complete patient management system developed for the Development Challenge Nine from MedCloud.
This system was developed as a solution for MedCloud's technical challenge, implementing a modern full-stack application for patient record management with complete CRUD functionality, interactive dashboard, and scalable architecture.
- Complete Patient CRUD: Create, view, edit, and delete patient records
- Interactive Dashboard: Real-time statistics and demographic analysis
- Advanced Search & Filters: Search by name, email, age, and age groups
- Smart Pagination: Efficient navigation through records
- Robust Validation: Validation on both frontend and backend
- Data Export: Export functionality in JSON and CSV formats
- Responsive Design: Works perfectly on desktop and mobile
- Smart Caching: Caching system for performance optimization
- Real Persistence: Data stored in PostgreSQL with Redis backup
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Frontend β β Backend β β Database β
β React + MUI βββββΊβ Node.js + Express βββββΊβ PostgreSQL β
β Context API β β REST API β β + Redis β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
- React 18 - Main framework
- Material-UI (MUI) - Component library
- React Router - SPA routing
- React Query - State management and caching
- Axios - HTTP client
- React Toastify - Notifications
- Node.js - JavaScript runtime
- Express.js - Web framework
- PostgreSQL - Primary database
- Redis - Caching and sessions
- bcryptjs - Password hashing
- JWT - Authentication
- Joi - Data validation
- Winston - Logging
- Docker & Docker Compose - Containerization
- Nginx - Reverse proxy (production)
- GitHub Actions - CI/CD (configured)
- Docker and Docker Compose
- Node.js 18+ (for local development)
- Git
git clone https://github.com/Pasblinn/MedCloud-Challenge.git
cd MedCloud-Challenge# Start all services (backend, frontend, PostgreSQL, Redis)
docker-compose up -d
# Wait a few seconds for all services to start- Frontend: http://localhost:3000
- Backend API: http://localhost:3001/api
- API Documentation: http://localhost:3001/api/docs
The system comes with pre-loaded sample data for demonstration purposes.
medcloud/
βββ frontend/ # React Application
β βββ public/
β βββ src/
β β βββ components/ # Reusable components
β β βββ contexts/ # Context API (global state)
β β βββ hooks/ # Custom hooks
β β βββ pages/ # Application pages
β β βββ services/ # Services and API calls
β β βββ styles/ # Global styles
β β βββ utils/ # Utilities and helpers
β βββ Dockerfile
β βββ package.json
βββ backend/ # Node.js API
β βββ src/
β β βββ config/ # Configuration
β β βββ controllers/ # Controllers
β β βββ middleware/ # Middlewares
β β βββ models/ # Data models
β β βββ repositories/ # Data layer
β β βββ routes/ # API routes
β β βββ services/ # Business logic
β β βββ utils/ # Utilities
β βββ Dockerfile
β βββ package.json
βββ database/ # Database scripts
β βββ init.sql
βββ docker-compose.yml # Service orchestration
βββ README.md
cd frontend
npm install
npm start # Development: http://localhost:3000
npm run build # Production build
npm test # Run testscd backend
npm install
npm run dev # Development with nodemon
npm start # Production
npm test # Run tests# Copy the example file and edit as needed
cp backend/.env.example backend/.envNODE_ENV=development
PORT=3001
DB_HOST=postgres
DB_PORT=5432
DB_NAME=patient_management
DB_USER=postgres
DB_PASSWORD=postgres123
REDIS_HOST=redis
REDIS_PORT=6379
JWT_SECRET=your-super-secret-jwt-key
CORS_ORIGIN=http://localhost:3000REACT_APP_API_URL=http://localhost:3001/api
REACT_APP_ENV=development| Method | Endpoint | Description |
|---|---|---|
GET |
/api/patients |
List all patients |
GET |
/api/patients/:id |
Get patient by ID |
POST |
/api/patients |
Create new patient |
PUT |
/api/patients/:id |
Update patient |
DELETE |
/api/patients/:id |
Delete patient |
GET |
/api/patients/search |
Search patients |
GET |
/api/patients/stats |
Patient statistics |
GET |
/api/patients/export |
Export data |
{
"name": "John Doe",
"email": "john.doe@email.com",
"birthDate": "1985-03-15",
"address": "123 Main Street, Downtown, New York - NY, 10001"
}cd frontend
npm test # Jest + React Testing Library
npm run test:coverage # Test coveragecd backend
npm test # Jest + Supertest
npm run test:integration # Integration testsdocker-compose up -d # All services
docker-compose logs -f # View logs in real-time
docker-compose down # Stop all servicesdocker-compose -f docker-compose.prod.yml up -d- Structured logging with Winston
- Performance metrics in backend
- Smart caching with Redis
- Query optimization in PostgreSQL
- Lazy loading in frontend
- Gzip compression enabled
- Robust validation with Joi
- Password hashing with bcryptjs
- JWT for authentication
- Rate limiting implemented
- CORS configured
- Helmet.js for security headers
- SQL injection protection
# Build images
docker-compose build
# Production deployment
docker-compose -f docker-compose.prod.yml up -d- Configure PostgreSQL and Redis
- Set environment variables
- Run
npm run buildin frontend - Run
npm startin backend - Configure reverse proxy (Nginx)
- Fork the project
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Complete authentication with roles
- Real-time notifications
- Advanced dashboard
- GraphQL API
- E2E tests with Cypress
- PWA (Progressive Web App)
- Internationalization (i18n)
- Data auditing
- Browser cache may cause stale data (solution: hard refresh)
- ZIP code validation not implemented (accepts any format)
This project is licensed under the MIT License - see the LICENSE file for details.
Pablo Tadini
- Email: pablosotomaior@live.com
- GitHub: @Pasblinn
- Project: MedCloud Challenge
Developed as a solution for the MedCloud Development Challenge Nine.
This project meets all challenge requirements:
- β Complete CRUD for patients
- β Robust data validation
- β Responsive and modern interface
- β PostgreSQL database persistence
- β Documented RESTful API
- β Docker containerization
- β Automated testing
- β Complete documentation
- β Scalable architecture
- β Development best practices
Developed with β€οΈ by Pablo Tadini for the MedCloud Challenge