Skip to content

Cipher-Text/open-care-frontend

Repository files navigation

OpenCare - Healthcare Made Simple

A comprehensive healthcare management platform built with Next.js that connects patients with certified doctors, hospitals, ambulance services, and blood banks across Bangladesh.

🌟 Features

Patient Services

  • Doctor Consultation: Find and consult with verified doctors across various specialties
  • Hospital Directory: Browse hospitals with detailed information and services
  • Ambulance Booking: 24/7 emergency ambulance services with GPS tracking
  • Blood Bank Network: Connect with blood donors and blood banks for emergencies
  • Telemedicine: Video consultations with healthcare professionals

Admin Dashboard

  • Doctor Management: Add, edit, and manage doctor profiles and specializations
  • Hospital Administration: Comprehensive hospital data management
  • Blood Management: Track blood donors, donations, and requisitions
  • Medical Specialties: Manage medical specializations and departments
  • Medical Tests: Catalog and manage available medical tests
  • Geolocation Management: Administrative divisions, districts, and upazilas
  • Analytics & Reports: Healthcare facility performance insights

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • npm/yarn/pnpm
  • Git

Installation

  1. Clone the repository
git clone https://github.com/your-username/open-care-frontend.git
cd open-care-frontend
  1. Install dependencies
npm install
# or
yarn install
# or
pnpm install
  1. Environment Setup
# Copy environment files
cp .env.dev .env.local
  1. Start the development server
npm run dev
# or
yarn dev
# or
pnpm dev
  1. Open your browser Navigate to http://localhost:3000 to see the application.

πŸ—οΈ Project Structure

open-care-frontend/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/                    # Next.js App Router pages
β”‚   β”‚   β”œβ”€β”€ (admin)/           # Admin dashboard routes
β”‚   β”‚   └── (main)/            # Public pages
β”‚   β”œβ”€β”€ components/            # Reusable components
β”‚   β”‚   β”œβ”€β”€ admin/             # Admin-specific components
β”‚   β”‚   β”œβ”€β”€ common/            # Shared components
β”‚   β”‚   β”œβ”€β”€ home/              # Homepage components
β”‚   β”‚   └── ui/                # UI component library
β”‚   β”œβ”€β”€ api/                   # API integration functions
β”‚   β”œβ”€β”€ types/                 # TypeScript type definitions
β”‚   β”œβ”€β”€ config/                # Configuration files
β”‚   └── lib/                   # Utility functions
β”œβ”€β”€ docs/                      # Documentation
β”œβ”€β”€ public/                    # Static assets
└── ...config files

πŸ› οΈ Technology Stack

Frontend

  • Framework: Next.js 14 (App Router)
  • Language: TypeScript
  • Styling: Tailwind CSS
  • UI Components: Radix UI + Custom components
  • State Management: React Query (TanStack Query)
  • Forms: React Hook Form + Zod validation
  • Icons: Lucide React

Backend Integration

  • API Base: https://api.opencarebd.com/api
  • Authentication: Keycloak integration ready
  • HTTP Client: Fetch API

πŸ“± Key Pages

Public Pages

  • Homepage (/) - Hero, services, testimonials
  • Doctors (/doctors) - Browse and search doctors
  • Hospitals (/hospitals) - Hospital directory
  • Login/Signup - User authentication

Admin Dashboard (/admin)

  • Dashboard - Analytics and overview
  • Doctors - Doctor management
  • Hospitals - Hospital administration
  • Blood Management - Blood donation system
  • Medical Specialties - Specialty management
  • Medical Tests - Test catalog
  • Geolocation - Location data management
  • Analytics - Reports and insights

πŸ”§ Configuration

Environment Variables

# API Configuration
NEXT_PUBLIC_API_BASE_URL=https://api.opencarebd.com/api

# Development
NODE_ENV=development

Build Commands

# Development
npm run dev

# Production build
npm run build

# Start production server
npm run start

# Linting
npm run lint

πŸ“Š Admin Features

Blood Management System

  • Donors: Track blood donors with contact information
  • Requisitions: Manage blood requests from hospitals
  • Donations: Monitor blood donation records
  • Search & Filter: Advanced filtering across all blood data

Geolocation Management

  • Divisions: Administrative divisions of Bangladesh
  • Districts: District-level location data
  • Upazilas: Sub-district administrative units
  • Hierarchical Data: Parent-child location relationships

Doctor Administration

  • Profile Management: Complete doctor profiles
  • Specialization: Medical specialty assignments
  • Verification Status: Doctor verification workflow
  • Location Mapping: Geographic distribution

🎯 Key Features

Responsive Design

  • Mobile-first approach
  • Tablet and desktop optimized
  • Touch-friendly interfaces

Performance

  • Server-side rendering (SSR)
  • Image optimization
  • Code splitting
  • Caching strategies

Accessibility

  • WCAG compliance
  • Keyboard navigation
  • Screen reader support
  • High contrast mode

πŸ§ͺ Development

Code Quality

  • ESLint: Code linting
  • TypeScript: Type safety
  • Prettier: Code formatting
  • Husky: Git hooks (if configured)

Testing

# Run tests (when configured)
npm run test

# Type checking
npm run type-check

πŸ“– Documentation

Detailed documentation is available in the /docs directory:

πŸš€ Deployment

Production Build

npm run build
npm run start

Docker Deployment

# Development
docker build -f Dockerfile.dev -t opencare-frontend:dev .

# Production
docker build -f Dockerfile.prod -t opencare-frontend:prod .

Vercel Deployment

The easiest way to deploy is using Vercel Platform:

  1. Connect your GitHub repository
  2. Configure environment variables
  3. Deploy automatically on commits

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ†˜ Support

For support and questions:

  • Email: support@opencare.com.bd
  • Emergency Hotline: +880-1777-999888
  • Documentation: See /docs directory
  • Issues: GitHub Issues

πŸ₯ About OpenCare

OpenCare is a healthcare platform designed to make quality healthcare accessible to everyone in Bangladesh. We connect patients with verified healthcare professionals and provide essential services like emergency ambulance, blood bank networks, and telemedicine consultations.


Made with ❀️ for healthcare accessibility in Bangladesh

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages