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.0Install all dependencies for client, server, and root project:
npm run install-allOr install separately:
# Root dependencies
npm install
# Client dependencies
cd client
npm install
# Server dependencies
cd ../server
npm installCreate client/.env:
VITE_API_URL=http://localhost:5000
VITE_JWT_SECRET=your_jwt_secretCreate 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.jsRun both frontend and backend in development mode:
npm run devOr run separately:
# Frontend only
npm run client
# Backend only
npm run serverThe 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