Skip to content

taherkamal/Reprotech

Repository files navigation

Reprotech - Veterinary Biotechnology Platform

πŸš€ GitHub Codespace Quick Start

This repository is fully configured for GitHub Codespaces with automated setup and development tools.

One-Click Setup

  1. Open in Codespace: Click the "Code" button β†’ "Codespaces" β†’ "Create codespace on main"
  2. Wait for Setup: The devcontainer will automatically:
    • Install Python 3.11 and Node.js 18
    • Set up virtual environments
    • Install all dependencies
    • Configure the database with sample data
    • Set up VS Code extensions and tasks

🎯 Development URLs

Once the Codespace is running:

  • Frontend: http://localhost:5174 (React + Vite + TypeScript)
  • Backend: http://localhost:8002 (FastAPI + SQLAlchemy)
  • API Documentation: http://localhost:8002/docs (Swagger UI)

πŸ› οΈ Available VS Code Tasks

Press Ctrl+Shift+P (or Cmd+Shift+P on Mac) and type "Tasks: Run Task":

  • Start Both Servers: Starts both frontend and backend simultaneously
  • Start Backend Server: FastAPI server on port 8002
  • Start Frontend Server: React/Vite server on port 5174
  • Setup Database: Initialize SQLite database with sample data
  • Test API: Validate API functionality

πŸ“ Project Structure

reprotech/
β”œβ”€β”€ .devcontainer/          # Codespace configuration
β”‚   β”œβ”€β”€ devcontainer.json   # Container settings
β”‚   └── setup.sh           # Automated setup script
β”œβ”€β”€ .vscode/               # VS Code configuration
β”‚   β”œβ”€β”€ tasks.json         # Development tasks
β”‚   β”œβ”€β”€ launch.json        # Debug configurations
β”‚   └── settings.json      # Editor settings
β”œβ”€β”€ scripts/               # Helper scripts
β”‚   β”œβ”€β”€ start-dev.sh       # Start development environment
β”‚   β”œβ”€β”€ test-env.sh        # Run environment tests
β”‚   └── cleanup.sh         # Clean up processes and cache
β”œβ”€β”€ reprotech-backend/     # FastAPI Backend
β”‚   β”œβ”€β”€ app/              # Application code
β”‚   β”‚   β”œβ”€β”€ api/          # API routes and endpoints
β”‚   β”‚   β”œβ”€β”€ core/         # Core functionality (database, config)
β”‚   β”‚   β”œβ”€β”€ models/       # SQLAlchemy models
β”‚   β”‚   β”œβ”€β”€ schemas/      # Pydantic schemas
β”‚   β”‚   └── services/     # Business logic
β”‚   β”œβ”€β”€ .env              # Environment variables
β”‚   β”œβ”€β”€ requirements.txt  # Python dependencies
β”‚   └── sample_data.db    # SQLite database
└── reprotech-frontend/    # React Frontend
    β”œβ”€β”€ src/              # Source code
    β”‚   β”œβ”€β”€ components/   # Reusable UI components
    β”‚   β”œβ”€β”€ modules/      # Feature modules (45+ vet biotech modules)
    β”‚   β”œβ”€β”€ hooks/        # Custom React hooks
    β”‚   └── utils/        # Utility functions
    β”œβ”€β”€ package.json      # Node.js dependencies
    └── vite.config.ts    # Vite configuration

οΏ½ 45+ Veterinary Biotechnology Modules

The platform includes comprehensive modules for:

Animal Management

  • Animal registration and profiles
  • Health records and monitoring
  • Breeding management
  • Performance tracking

Laboratory Services

  • Sample collection and tracking
  • Laboratory test management
  • Results processing and reporting
  • Quality control

Genomic Analysis

  • DNA sequencing workflows
  • Genetic testing and analysis
  • Breeding optimization
  • Disease susceptibility screening

Biobanking

  • Sample storage and inventory
  • Chain of custody tracking
  • Storage condition monitoring
  • Sample retrieval systems

Research & Development

  • Experimental design tools
  • Data collection and analysis
  • Research project management
  • Collaboration tools

And many more...

πŸ”§ Manual Commands

If you prefer manual control:

# Start development environment
./scripts/start-dev.sh

# Test the environment
./scripts/test-env.sh

# Clean up processes
./scripts/cleanup.sh

# Start backend only
cd reprotech-backend
source .venv/bin/activate
uvicorn app.main:app --reload --host 0.0.0.0 --port 8002

# Start frontend only
cd reprotech-frontend
npm run dev

πŸ—„οΈ Database Information

  • Type: SQLite (development) with PostgreSQL production support
  • Sample Data: 2 customers, 4 animals with full veterinary profiles
  • Authentication: Removed for development (all endpoints are public)

πŸ”‘ API Endpoints (No Auth Required for Development)

GET /api/v1/dev/customers/              # List all customers
GET /api/v1/dev/customers/{id}          # Get customer by ID
GET /api/v1/dev/customers/{id}/animals  # Get customer's animals
GET /api/v1/dev/animals/                # List all animals
GET /api/v1/dev/status                  # API status check

πŸ› Debugging

  • VS Code Debugger: Pre-configured for FastAPI debugging
  • API Testing: Built-in test scripts validate environment
  • Hot Reload: Both frontend and backend support hot reloading

🚧 Development Notes

  • Authentication has been temporarily removed for development
  • All API endpoints are publicly accessible
  • Database uses SQLite for simplicity
  • Frontend proxy configured to connect to backend automatically

πŸ“‹ Next Steps

  1. The environment will auto-start when you open the Codespace
  2. Visit http://localhost:5174 to see the frontend
  3. Visit http://localhost:8002/docs to explore the API
  4. Start developing your veterinary biotechnology features!

πŸ†˜ Troubleshooting

If servers don't start automatically:

  1. Open terminal in VS Code
  2. Run ./scripts/test-env.sh to check setup
  3. Run ./scripts/start-dev.sh to start servers
  4. Check the VS Code terminal outputs for any errors

For any issues, check the terminal outputs or run the test script to diagnose problems.


Happy Coding! 🧬🐾 - Veterinary Biotechnology Platform

A comprehensive veterinary biotechnology management system for advanced reproduction, genomic intelligence, and farm operations.

πŸš€ Quick Start

Prerequisites

  • Node.js 18+ (for frontend)
  • Python 3.11+ (for backend)
  • Git (for version control)

Installation & Setup

  1. Clone the repository

    git clone <repository-url>
    cd reprotech
  2. Start the Backend

    cd reprotech-backend
    # Activate virtual environment
    .venv\Scripts\activate  # Windows
    # Install dependencies
    pip install -r requirements.txt
    # Start the server
    python -m uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
  3. Start the Frontend

    cd reprotech-frontend
    # Install dependencies
    npm install
    # Start development server
    npm run dev
  4. Access the Application

Test Users

  • Admin: admin@reprotech.com / admin123
  • Veterinarian: dr.smith@reprotech.com / vet123
  • Lab Technician: tech@reprotech.com / tech123
  • Customer: user@reprotech.com / user123

πŸ—οΈ Architecture

Frontend (React + TypeScript)

  • Framework: React 19.1.0 with TypeScript
  • Build Tool: Vite 7.0.0
  • UI Library: Tailwind CSS + Radix UI
  • State Management: React Context + Custom hooks
  • Routing: React Router DOM 7.6.3
  • Internationalization: i18next (Arabic/English)

Backend (FastAPI + Python)

  • Framework: FastAPI 0.109.0
  • Server: Uvicorn 0.27.0
  • Authentication: JWT-based with role-based access control
  • API Documentation: OpenAPI/Swagger
  • Database: PostgreSQL (ready for integration)

πŸ“Š Module Overview

🧬 Reproduction & Genetics (15 modules)

  • Advanced Reproduction: Session management and embryo tracking
  • Fertilization: IVF/ICSI procedures and outcomes
  • Genomic Intelligence: SNP analysis and breeding optimization
  • Sample Management: Biological sample tracking with QR codes
  • Semen Management: Collection, analysis, and storage
  • Biobank: LNβ‚‚ tank management and cryopreservation
  • OPU: Ovum Pick-Up procedures
  • Breeding: Natural and artificial insemination
  • Embryo Transfer: Transfer procedures and pregnancy monitoring
  • Phenotype: Physical characteristics tracking
  • SNP Analysis: Genetic marker analysis
  • BeadChip Mappings: Genomic data management

πŸ₯ Clinical & Laboratory (8 modules)

  • Clinical Hub: Centralized clinical workflow management
  • Ultrasound: Reproductive ultrasound examinations
  • Laboratory: Lab procedures and equipment management
  • Internal Medicine: Medical treatments and diagnostics
  • Vaccinations: Vaccination schedules and records
  • Lab Results: Test results and reporting
  • Media Preparation: Culture media management
  • Realtime Monitoring: Live system monitoring

πŸ’Ό Business Operations (12 modules)

  • Customers: CRM and customer relationship management
  • Finance: Financial tracking and cost analysis
  • Human Resources: Employee management and payroll
  • Procurement: Supply chain and purchasing
  • Inventory: Stock management and tracking
  • Tender Management: Bid and contract management
  • Data Integration: Cross-module data synchronization
  • Settings: System configuration
  • Admin: User and system administration
  • Analytics Dashboard: Business intelligence
  • AI Analytics: Machine learning insights
  • Calendar: Scheduling and event management

πŸ„ Farm Management (6 modules)

  • Animal Management: Comprehensive animal database
  • Farm Management: Farm operations and planning
  • Fattening Management: Growth tracking and optimization
  • Milking Management: Dairy production tracking
  • Farm Analytics: Farm performance metrics
  • Farm Compliance: Regulatory compliance tracking

πŸ”¬ Analytics & Intelligence (4 modules)

  • Integration Hub: Cross-module data integration
  • Research: Research project management
  • Inventory Analytics: Supply chain optimization
  • Predictive Analytics: AI-powered forecasting

πŸ” Authentication & Security

Role-Based Access Control

  • Admin: Full system access and administration
  • Veterinarian: Clinical and animal management operations
  • Lab Technician: Laboratory and technical procedures
  • Customer: Limited access to assigned animals and data

Security Features

  • JWT-based authentication with refresh tokens
  • Password hashing with bcrypt
  • CORS configuration for secure cross-origin requests
  • Input validation and sanitization
  • Structured error handling

🌐 API Endpoints

Core Endpoints

  • GET /health - System health check
  • GET /api/v1/health - API health check
  • POST /api/v1/auth/login - User authentication
  • GET /api/v1/auth/me - Current user information
  • GET /api/v1/customers - Customer management
  • GET /api/v1/animals - Animal management

Module-Specific Endpoints

  • Reproduction: /api/v1/reproduction/*
  • Genomics: /api/v1/genomics/*
  • Finance: /api/v1/finance/*
  • HR: /api/v1/hr/*
  • Laboratory: /api/v1/lab-results/*

🎨 User Interface Features

Modern Design

  • Responsive Design: Mobile and tablet optimized
  • Dark/Light Theme: Theme switching capability
  • Internationalization: Arabic and English support
  • Toast Notifications: Real-time user feedback
  • Loading States: Professional loading indicators
  • Error Boundaries: Graceful error handling

Navigation

  • Smart Navigation: Auto-prioritizes current module group
  • Role-Based Menu: Dynamic menu based on user role
  • Breadcrumb Navigation: Clear navigation path
  • Quick Actions: Context-sensitive action buttons

πŸš€ Development

Frontend Development

cd reprotech-frontend
npm install
npm run dev

Backend Development

cd reprotech-backend
# Activate virtual environment
.venv\Scripts\activate
pip install -r requirements.txt
python -m uvicorn app.main:app --reload

Testing

# Frontend tests
npm run test

# Backend tests
pytest

πŸ“¦ Deployment

Docker Deployment

# Build and run with Docker Compose
docker-compose up -d

Manual Deployment

  1. Build frontend: npm run build
  2. Start backend: python -m uvicorn app.main:app --host 0.0.0.0 --port 8000
  3. Serve frontend build files

πŸ“š Documentation

  • API Documentation: http://localhost:8000/docs
  • Development Guide: REPROTECH_DEVELOPMENT_GUIDE.md
  • Startup Guide: REPROTECH_STARTUP_GUIDE.md
  • Backend Architecture: BACKEND_STRUCTURE_PLAN.md

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Make your changes
  4. Commit your changes: git commit -m 'Add feature'
  5. Push to the branch: git push origin feature-name
  6. Submit a pull request

πŸ“„ License

This project is proprietary software developed for veterinary biotechnology applications.

πŸ†˜ Support

For technical support or questions:

  • Email: dev@reprotech.com
  • Documentation: Check the documentation files in the repository
  • Issues: Create an issue in the repository

🎯 Roadmap

Phase 1: Core Infrastructure βœ…

  • Authentication system
  • Basic CRUD operations
  • Role-based access control

Phase 2: Advanced Features 🚧

  • Database integration
  • Real-time notifications
  • Advanced analytics
  • Mobile app development

Phase 3: AI Integration πŸ“‹

  • Machine learning models
  • Predictive analytics
  • Automated workflows
  • Genomic intelligence

Reprotech - Advancing veterinary biotechnology through intelligent software solutions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published