A comprehensive diabetes management system with family tree visualization and medical document OCR capabilities.
- 👥 Interactive Family Tree Visualization
- 🔒 Hierarchical Access Control
- 📄 Medical Document Management
- 🔍 OCR Text Extraction
- 💊 Medicine Name Detection
- 📊 Real-time Updates
- 🎯 Profile Management
- Node.js (v18.19.0 or higher)
- npm (v10.2.3 or higher)
- MySQL (v8.0+)
- Git
- React 18.3.1
- TypeScript 5.6.3
- Vite 6.0.11
- React Query 5.64.2
- React Flow 11.11.4
- Tailwind CSS 3.4.1
- Shadcn/ui Components
- Node.js 18.19.0
- Express 4.21.2
- MySQL 3.12.0
- JWT Authentication
- Tesseract.js 6.0.0
- Sharp 0.33.5
git clone https://github.com/your-username/SMART_MED_2.0.git
cd SMART_MED_2.0
Install all dependencies for client, server, and root project:
npm run install-all
Or install separately:
# Root dependencies
npm install
# Client dependencies
cd client
npm install
# Server dependencies
cd ../server
npm install
Create client/.env
:
VITE_API_URL=http://localhost:5000
VITE_JWT_SECRET=your_jwt_secret
Create server/.env
:
PORT=5000
DB_HOST=localhost
DB_USER=your_db_user
DB_PASSWORD=your_db_password
DB_NAME=SMART_MED_2
JWT_SECRET=your_jwt_secret
UPLOAD_DIR=uploads
- Create MySQL database:
CREATE DATABASE SMART_MED_2;
- Run database schema:
cd database
mysql -u your_username -p SMART_MED_2 < schema.sql
- Import medicine reference data:
cd seeds
node medicines.js
Run both frontend and backend in development mode:
npm run dev
Or run separately:
# Frontend only
npm run client
# Backend only
npm run server
The application will be available at:
- Frontend: http://localhost:3000
- Backend: http://localhost:5000
SMART_MED_2.0/
├── client/ # Frontend React application
│ ├── public/ # Public assets
│ └── src/ # Source files
│ ├── assets/ # Static assets
│ ├── components/ # React components
│ ├── contexts/ # React contexts
│ ├── hooks/ # Custom hooks
│ ├── interfaces/ # TypeScript interfaces
│ ├── pages/ # Page components
│ ├── services/ # API services
│ └── utils/ # Utility functions
├── server/ # Backend Node.js application
│ ├── config/ # Configuration files
│ ├── controllers/ # Route controllers
│ ├── middleware/ # Express middleware
│ ├── models/ # Database models
│ ├── routes/ # API routes
│ └── services/ # Business logic
└── database/ # Database related files
├── migrations/ # Database migrations
└── seeds/ # Seed data
POST /api/auth/register - Register new user
POST /api/auth/login - User login
POST /api/auth/logout - User logout
GET /api/profiles - Get all profiles
POST /api/profiles - Create new profile
GET /api/profiles/:id - Get specific profile
PUT /api/profiles/:id - Update profile
DELETE /api/profiles/:id - Delete profile
GET /api/family/tree - Get family tree
POST /api/family/relation - Create relation
DELETE /api/family/relation/:id - Delete relation
POST /api/documents/upload - Upload document
GET /api/documents/:id - Get document
GET /api/documents/extract/:id - Extract text from document
- Interactive D3-based visualization
- Drag and drop interface
- Real-time updates
- Relationship validation
- Context menu for quick actions
- Secure file upload
- OCR text extraction
- Medicine name detection
- Version control
- Access permissions
- Hierarchical access control
- Parent-child relationships
- Profile linking
- Activity tracking
- JWT authentication
- Password hashing (bcrypt)
- Input validation
- File type validation
- Access control
- Rate limiting
- XSS protection
- CSRF protection
- Image optimization
- Caching strategies
- Database indexing
- Lazy loading
- Efficient state management
- Optimized queries
- Fork the repository
- Create your 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