Complete medical equipment rental management system with advanced SEO optimization, modern responsive design, and comprehensive backend API. Built for healthcare providers and patients seeking quality medical equipment rental services in Mumbai and across India.
- π Quick Start
- π Live Demo
- β¨ Features
- π― SEO & Performance
- π Database Overview
- ποΈ Project Architecture
- π‘ API Endpoints
- π§ Technical Stack
- π Deployment
- π§Ή Project Maintenance
- π Troubleshooting
- π API Usage Examples
- π€ Contributing
- π License
- π Support
- Python 3.9+ with pip
- Node.js 18+ with npm
- Git for cloning
Follow these steps to zip your project, move it, and ensure all data is seeded properly in PostgreSQL on another computer:
- Right-click your
CareSpace-Enterprisefolder and select βSend to > Compressed (zipped) folder.β - Or, run this in PowerShell:
Compress-Archive -Path "d:\meet\CareSpace-Enterprise" -DestinationPath "d:\meet\CareSpace-Enterprise.zip"
- Copy the ZIP file to the new computer and extract it.
- Install Python (same version as before).
- Open a terminal in the backend folder.
- Create a virtual environment:
python -m venv ../venv
- Activate the virtual environment:
../venv/Scripts/activate
- Install dependencies:
pip install -r requirements.txt
- Install Node.js (same version as before).
- Open a terminal in the Frontend folder.
- Run:
npm install
- Install PostgreSQL and create a database (same name as before).
- Update your
.envfile with the correct database credentials if needed. - Run your seed or migration scripts to populate the database:
python seed_data.py # or python backend/migrate_add_key_features.py
- Backend: Run the backend server (e.g., using uvicorn).
- Frontend: Run the frontend dev server (e.g., npm run dev).
This will ensure your code, dependencies, and database are all set up and seeded properly on the new computer.
# Clone repository
git clone https://github.com/yourusername/CareSpace-Enterprise.git
cd CareSpace-Enterprise
# Setup backend
cd backend
python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt
# Setup database
cd ..
python seed_data.py
# Setup frontend
cd Frontend
npm install
npm run build
# Start both servers
# Terminal 1 - Backend (Port 8001)
cd backend
../venv/Scripts/uvicorn.exe app.main:app --host 127.0.0.1 --port 8001
# Terminal 2 - Frontend (Port 5174)
cd Frontend
npm run devThe backend uses SQLite by default. For PostgreSQL in production:
# Set environment variable
DATABASE_URL=postgresql://username:password@host:5432/carespace_dbCreate/update Frontend/.env:
# For local development
VITE_API_URL=http://127.0.0.1:8001
# For production
# VITE_API_URL=https://your-deployed-backend-url.vercel.appThe app uses SQLite by default for easy development setup. No additional configuration needed.
- Install PostgreSQL locally or use a cloud service (Vercel Postgres, AWS RDS, etc.)
- Create a database named
carespace_db - Set environment variable:
# Copy the example file cp .env.example .env # Edit .env with your PostgreSQL connection string DATABASE_URL=postgresql://username:password@localhost:5432/carespace_db
- Run migrations (if needed):
cd backend python -c "from app.core.database import Base, engine; Base.metadata.create_all(bind=engine)"
- Vercel Postgres: Integrated with Vercel deployments
- AWS RDS: Managed PostgreSQL service
- Google Cloud SQL: Enterprise-grade PostgreSQL
- Supabase: Open-source Firebase alternative
- π Homepage: http://localhost:5174
- π§ Backend API: http://127.0.0.1:8001
- π API Documentation: http://127.0.0.1:8001/docs
- β€οΈ Health Check: http://127.0.0.1:8001/health
- πΊοΈ Sitemap: http://localhost:5174/sitemap.xml
- π€ Robots.txt: http://localhost:5174/robots.txt
- π¦ Equipment Inventory - 41 medical equipment products across 10 categories
- π° Dynamic Pricing - Flexible 1-month, 2-month, and 3-month rental plans
- π·οΈ Category Management - Organized equipment categories (Hospital Beds, CPAP/BiPAP, Oxygen, etc.)
- π Advanced Search - Real-time product search with filtering
- π Lead Management - Customer inquiry capture and management system
- π± WhatsApp Integration - Direct customer communication
- π§ Contact Forms - Professional inquiry handling
- Login Page Slideshow: The login page now features a slideshow of local images for enhanced visual appeal.
- Branding Update: The logo and branding have been removed from the login page for a cleaner look.
- Performance Improvements: Login page animations and image loading have been optimized for faster interaction and reduced lag.
- Social Login Update: Only the Google login button remains, now using the official Google logo.
- UI Isolation: The login page is fully isolated from the UI directory and does not depend on shared UI components.
- Promotional Text Removal: Product pages no longer display promotional text (e.g., "Flexible rental plans available β’ Free delivery").
- Image Cropping Fix: Slideshow images are now properly cropped and displayed using object-fit for consistent appearance.
- Git Workflow: All recent changes have been committed and pushed to the repository.
- π± Responsive Design - Mobile-first approach (320px to 4K displays)
- π Modern UI/UX - Glassmorphism effects with Tailwind CSS
- π¬ Smooth Animations - Framer Motion powered transitions
- βΏ Accessibility - WCAG compliant with ARIA labels
- π Dark/Light Modes - Theme switching capability
- β‘ Performance - Vite-powered fast loading (<2s first contentful paint)
- π RESTful API - Clean FastAPI endpoints with automatic OpenAPI docs
- ποΈ Database Integration - SQLAlchemy ORM with PostgreSQL/SQLite support (enterprise-ready)
- β Data Validation - Pydantic schemas with comprehensive error handling
- π Security - CORS enabled, input sanitization, SQL injection protection
- π Analytics Ready - Structured data for business intelligence
- π Dynamic Meta Tags - Product-specific titles, descriptions, and Open Graph
- πΊοΈ Auto-Generated Sitemap - XML sitemap with 57+ URLs for search engines
- π€ Robots.txt - Search engine crawling instructions
- π Canonical URLs - Duplicate content prevention
- π± Social Media - Open Graph and Twitter Card optimization
- β‘ Core Web Vitals - Optimized for Google's performance metrics
- Schema Markup - JSON-LD structured data for rich snippets
- Meta Descriptions - Compelling 155-character descriptions
- Image Optimization - Alt texts and lazy loading
- Mobile SEO - Responsive design with mobile-first indexing
- Page Speed - Vite build optimization (<100KB gzipped JS)
- Search Visibility: Optimized for "medical equipment rental Mumbai"
- Social Sharing: Rich previews on Facebook, WhatsApp, LinkedIn
- Local SEO: Mumbai-focused content and contact information
- Rich Snippets: Potential for star ratings and price displays
- π₯ 10 Categories: Air Mattress, Auto CPAP, BiPAP, DVT/Lymph Pump, Feeding, Hospital Bed, Oxygen, Monitor, Suction, Ventilator
- π¦ 41 Products: Complete medical equipment inventory
- π° Price Range: βΉ3,000 - βΉ81,000 (duration-based pricing)
- π Coverage: Mumbai + Pan-India delivery
π₯ Hospital Beds (6 products)
β’ ICU Beds, Semi-Fowler Beds, Fowler Beds
β’ βΉ12,000 - βΉ45,000/month
π« Respiratory Equipment (16 products)
β’ CPAP, BiPAP, Oxygen Concentrators, Ventilators
β’ βΉ8,000 - βΉ81,000/month
ποΈ Support Surfaces (3 products)
β’ Air Mattresses for pressure relief
β’ βΉ3,000 - βΉ15,000/month
π Patient Monitoring (2 products)
β’ Multi-parameter monitors
β’ βΉ15,000 - βΉ25,000/month
Carespace-India/
βββ οΏ½ .env.example # Environment variables template
βββ ποΈ carespace.db # SQLite database (development)
βββ π backend/ # FastAPI Backend
β βββ app/
β β βββ core/ # Core functionality
β β β βββ database.py # SQLAlchemy setup
β β β βββ deps.py # FastAPI dependencies
β β β βββ errors.py # Error handlers
β β β βββ config.py # App configuration
β β βββ models/ # Database models
β β β βββ category.py # Equipment categories
β β β βββ product.py # Medical equipment + SEO fields
β β β βββ lead.py # Customer inquiries
β β β βββ user.py # User management
β β βββ routes/ # API endpoints
β β β βββ categories.py # Category CRUD
β β β βββ products.py # Product CRUD & search
β β β βββ leads.py # Lead management
β β β βββ auth.py # Authentication
β β β βββ contacts.py # Contact form handling
β β βββ schemas/ # Pydantic validation
β β βββ category.py
β β βββ product.py
β β βββ lead.py
β β βββ user.py
β βββ generate_sitemap.py # SEO sitemap generator
β βββ requirements.txt # Python dependencies
β
βββ βοΈ Frontend/ # React + TypeScript
β βββ dist/ # Production build (8MB)
β βββ node_modules/ # Dependencies (150MB)
β βββ public/ # Static assets
β β βββ images/ # Product images
β β βββ sitemap.xml # Auto-generated sitemap
β β βββ robots.txt # SEO crawling rules
β β βββ favicon.ico # Site favicon
β β βββ _redirects # SPA routing
β βββ src/
β β βββ app/
β β β βββ components/ # Reusable UI components
β β β β βββ ui/ # Shadcn/ui library
β β β β βββ Navbar.tsx # Responsive navigation
β β β β βββ Footer.tsx # Site footer
β β β β βββ ProductCard.tsx # Product display
β β β β βββ EnquiryPopup.tsx # Contact forms
β β β βββ pages/ # Page components
β β β βββ HomePage.tsx # Landing page
β β β βββ ProductPage.tsx # Product details
β β β βββ CategoryPage.tsx # Category listings
β β β βββ SearchPage.tsx # Search results
β β β βββ AboutPage.tsx # Company info
β β βββ services/ # API integration
β β β βββ api.ts # Axios client
β β βββ hooks/ # Custom React hooks
β β βββ types/ # TypeScript definitions
β β βββ utils/ # Helper functions
β βββ index.html # HTML template with SEO
β βββ package.json # Node dependencies
β βββ vite.config.ts # Build configuration
β βββ tsconfig.json # TypeScript config
β
βββ π Product info/ # Data source files
β βββ Product 1-40.txt # Product specifications
βββ π οΈ generate_sitemap.py # Sitemap runner script
βββ π± seed_data.py # Database initialization
βββ πΌοΈ update_images.py # Image management
βββ π README.md # This documentation
GET /api/categories # List all categories
GET /api/categories/{slug} # Get category by slug
POST /api/categories # Create new category (admin)GET /api/products # List products (paginated)
GET /api/products/{slug} # Get product details + SEO
GET /api/products/category/{slug} # Products by category
GET /api/products/{slug}/related # Related products
GET /api/products/search?q=query # Search products
POST /api/products # Create product (admin)GET /api/leads # List all leads
GET /api/leads/{id} # Get lead by ID
POST /api/leads # Create new lead
POST /api/contacts # Contact form submissionGET / # API information
GET /health # Health check
GET /docs # Swagger UI documentation
GET /redoc # Alternative API docs- π Framework: FastAPI with async support
- ποΈ Database: PostgreSQL/SQLite + SQLAlchemy ORM
- β Validation: Pydantic v2 schemas
- π Documentation: Auto-generated Swagger/ReDoc
- π Security: CORS, input validation, SQL injection protection
- β‘ Performance: Async endpoints, connection pooling
- βοΈ Framework: React 18 with hooks
- π± Language: TypeScript for type safety
- ποΈ Build: Vite for lightning-fast development
- π¨ Styling: Tailwind CSS v4 + custom utilities
- π¬ Animation: Framer Motion for smooth UX
- π SEO: React Helmet Async for dynamic meta tags
- π¦ Package Management: pip (backend), npm (frontend)
- ποΈ Version Control: Git with conventional commits
- π³ Container Ready: Dockerfile included
- π Monitoring: Health checks and error logging
- π§ͺ Testing: API testing with automated scripts
cd backend
pip install -r requirements.txt
python -m uvicorn app.main:app --host 0.0.0.0 --port 8000 --workers 4cd Frontend
npm install
npm run build
# Deploy the 'dist' folder to your web serverThe backend is configured for Vercel deployment with CORS headers:
-
Backend Deployment:
cd backend vercel --prod -
Frontend Deployment:
cd Frontend vercel --prod -
Update Frontend Environment: After backend deployment, update
Frontend/.env:VITE_API_URL=https://your-vercel-backend-url.vercel.app
# Build and run with Docker
docker build -t carespace-india .
docker run -p 8000:8000 -p 5173:5173 carespace-india# Reset database
python seed_data.py
# Update product data
python update_products_from_files.py
# Generate SEO sitemap
python generate_sitemap.pycd Frontend
npm audit # Security audit
npm update # Update dependencies
npm run build # Production build- β Clean Structure: Removed 111MB of unnecessary files
- π Security: No sensitive data exposed
- π¦ Optimized: Dependencies properly managed
- ποΈ Organized: Clear separation of concerns
Backend won't start:
# Check Python version
python --version # Should be 3.9+
# Reinstall dependencies
cd backend
pip install -r requirements.txtFrontend build fails:
# Clear cache and reinstall
cd Frontend
rm -rf node_modules package-lock.json
npm installDatabase connection issues:
# For SQLite (development)
python seed_data.py
# For PostgreSQL (production)
# Ensure DATABASE_URL is set in .env
python -c "from app.core.database import engine; print('DB OK' if engine else 'DB Error')"SEO sitemap not generating:
# Check database connection
python -c "from app.core.database import engine; print('DB OK' if engine else 'DB Error')"
# Run sitemap generator
python generate_sitemap.pycurl "http://127.0.0.1:8000/api/products/search?q=cpap"curl "http://127.0.0.1:8000/api/products/auto-cpap-machine-rent"curl -X POST http://127.0.0.1:8000/api/contacts \
-H "Content-Type: application/json" \
-d '{
"name": "Rajesh Kumar",
"email": "rajesh@example.com",
"phone": "+91-9876543210",
"subject": "Hospital Bed Rental Inquiry",
"message": "Need to rent ICU bed for 2 months"
}'curl -X POST http://127.0.0.1:8000/api/leads \
-H "Content-Type: application/json" \
-d '{
"name": "Priya Sharma",
"phone": "+91-9123456789",
"email": "priya.sharma@email.com",
"product_id": "icu-bed-uuid",
"message": "Interested in renting ICU bed for home care"
}'We welcome contributions! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/medical-equipment-search) - Commit changes (
git commit -m 'Add advanced search filters') - Push to branch (
git push origin feature/medical-equipment-search) - Open a Pull Request
- Follow PEP 8 for Python code
- Use TypeScript strict mode
- Write descriptive commit messages
- Test API endpoints thoroughly
- Ensure mobile responsiveness
MIT License - Open source and free to use commercially.
- π₯ Website: https://carespace.in
- π§ Email: Info.carespaceindia@gmail.com
- π± WhatsApp: +91 8922069800
- π API Docs: http://127.0.0.1:8000/docs
- π Issues: GitHub Issues for bug reports
- π‘ Features: GitHub Discussions for suggestions
- π₯ Medical Equipment: 24/7 rental support
- π Delivery: Pan-India doorstep delivery
- π§ Maintenance: Equipment servicing available
- π Emergency: Priority support for urgent needs
π₯ Carespace India - Making Quality Healthcare Accessible Through Technology β¨
Trusted medical equipment rental partner serving Mumbai and across India since 2024.