Skip to content

Carex AI is a cutting-edge medical consultation platform that leverages artificial intelligence to provide real-time voice conversations with specialized medical AI agents. Built with modern web technologies, it offers an intuitive interface for users to discuss health concerns and receive AI-powered medical guidance.

License

Notifications You must be signed in to change notification settings

Precise-Goals/Carex-AI---Healthcare-Ecosystem

Repository files navigation

πŸ₯ Carex AI - Medical Assistant

Next.js React TypeScript Tailwind CSS Prisma Clerk License: MIT

AI-powered medical assistant with real-time voice conversation capabilities

Carex AI is a cutting-edge medical consultation platform that leverages artificial intelligence to provide real-time voice conversations with specialized medical AI agents. Built with modern web technologies, it offers an intuitive interface for users to discuss health concerns and receive AI-powered medical guidance.

✨ Features

🎀 Real-time Voice Conversation

  • Advanced speech recognition using AssemblyAI
  • Natural turn-taking conversation flow
  • High-accuracy voice-to-text conversion
  • Seamless audio processing

πŸ€– AI Medical Specialists

  • Multiple AI doctor agents with different specializations
  • Comprehensive medical knowledge base
  • Context-aware responses
  • Personalized consultation experience

🎨 Interactive 3D Experience

  • Immersive 3D scenes using Spline
  • Visual medical consultations
  • Engaging user interface
  • Modern design aesthetics

πŸ” Secure Authentication

  • Clerk-powered user authentication
  • Secure session management
  • User profile management
  • Privacy-focused design

πŸ“Š Session Management

  • Complete consultation history
  • Session tracking and analytics
  • Progress monitoring
  • Data persistence

πŸ› οΈ Tech Stack

Frontend

  • Next.js 15.3.4 - React framework with App Router
  • React 19.0.0 - UI library
  • TypeScript 5.0 - Type safety
  • Tailwind CSS 4.0 - Utility-first CSS framework
  • Framer Motion - Animation library
  • Radix UI - Accessible component primitives

Backend & APIs

  • OpenAI/OpenRouter - AI conversation engine
  • AssemblyAI - Speech-to-text processing
  • Murf AI - Text-to-speech synthesis
  • Socket.IO - Real-time communication

Database & ORM

  • Prisma 6.10.1 - Database toolkit
  • PostgreSQL - Primary database
  • SQLite - Development database

Authentication & Security

  • Clerk - User authentication
  • Next.js Middleware - Route protection
  • JWT - Session management

Development Tools

  • ESLint - Code linting
  • Prettier - Code formatting
  • Bun - Package manager & runtime
  • Turbopack - Fast bundler

πŸ“ Project Structure

carex-ai/
β”œβ”€β”€ πŸ“ app/                          # Next.js App Router
β”‚   β”œβ”€β”€ πŸ“ (auth)/                   # Authentication routes
β”‚   β”‚   β”œβ”€β”€ sign-in/                 # Sign in pages
β”‚   β”‚   └── sign-up/                 # Sign up pages
β”‚   β”œβ”€β”€ πŸ“ (routes)/                 # Protected routes
β”‚   β”‚   └── dashboard/               # Main dashboard
β”‚   β”‚       β”œβ”€β”€ πŸ“ _components/      # Dashboard components
β”‚   β”‚       β”‚   β”œβ”€β”€ AppHeader.tsx    # Dashboard header
β”‚   β”‚       β”‚   β”œβ”€β”€ AddNewSession.tsx # Session creation
β”‚   β”‚       β”‚   β”œβ”€β”€ DoctorsList.tsx  # AI doctors list
β”‚   β”‚       β”‚   β”œβ”€β”€ HistoryList.tsx  # Session history
β”‚   β”‚       β”‚   └── drawer.tsx       # Mobile navigation
β”‚   β”‚       └── πŸ“ medical-agent/    # Voice conversation
β”‚   β”‚           β”œβ”€β”€ πŸ“ [sessionId]/  # Dynamic session pages
β”‚   β”‚           β”œβ”€β”€ πŸ“ components/   # Voice components
β”‚   β”‚           β”‚   β”œβ”€β”€ AudioProcessor.tsx
β”‚   β”‚           β”‚   β”œβ”€β”€ ConversationManager.tsx
β”‚   β”‚           β”‚   β”œβ”€β”€ TextToSpeech.tsx
β”‚   β”‚           β”‚   └── VoiceRecordButton.tsx
β”‚   β”‚           └── πŸ“ services/     # API services
β”‚   β”œβ”€β”€ πŸ“ api/                      # API routes
β”‚   β”‚   β”œβ”€β”€ chat/                    # Chat endpoints
β”‚   β”‚   β”œβ”€β”€ session-chat/            # Session management
β”‚   β”‚   β”œβ”€β”€ suggest-doctors/         # Doctor suggestions
β”‚   β”‚   β”œβ”€β”€ transcribe/              # Speech transcription
β”‚   β”‚   β”œβ”€β”€ tts/                     # Text-to-speech
β”‚   β”‚   └── users/                   # User management
β”‚   β”œβ”€β”€ globals.css                  # Global styles
β”‚   β”œβ”€β”€ layout.tsx                   # Root layout
β”‚   β”œβ”€β”€ page.tsx                     # Home page
β”‚   └── provider.tsx                 # Context providers
β”œβ”€β”€ πŸ“ components/                   # Shared components
β”‚   β”œβ”€β”€ πŸ“ ui/                       # UI components
β”‚   β”‚   β”œβ”€β”€ button.tsx
β”‚   β”‚   β”œβ”€β”€ dialog.tsx
β”‚   β”‚   β”œβ”€β”€ input.tsx
β”‚   β”‚   └── ...
β”‚   β”œβ”€β”€ πŸ“ sections/                 # Page sections
β”‚   β”‚   β”œβ”€β”€ header.tsx
β”‚   β”‚   β”œβ”€β”€ hero.tsx
β”‚   β”‚   β”œβ”€β”€ features.tsx
β”‚   β”‚   β”œβ”€β”€ pricing.tsx
β”‚   β”‚   └── ...
β”‚   └── πŸ“ magicui/                  # Advanced UI components
β”œβ”€β”€ πŸ“ lib/                          # Utility libraries
β”‚   β”œβ”€β”€ πŸ“ hooks/                    # Custom hooks
β”‚   β”œβ”€β”€ πŸ“ generated/                # Generated files
β”‚   β”œβ”€β”€ config.tsx                   # App configuration
β”‚   └── utils.ts                     # Utility functions
β”œβ”€β”€ πŸ“ prisma/                       # Database schema
β”‚   β”œβ”€β”€ schema.prisma               # Database schema
β”‚   └── πŸ“ migrations/              # Database migrations
β”œβ”€β”€ πŸ“ public/                       # Static assets
β”‚   β”œβ”€β”€ πŸ“ fonts/                   # Custom fonts
β”‚   β”œβ”€β”€ carex.splinecode            # 3D scene file
β”‚   └── ...                         # Images and icons
β”œβ”€β”€ πŸ“ context/                      # React contexts
β”œβ”€β”€ πŸ“ shared/                       # Shared utilities
β”œβ”€β”€ middleware.ts                    # Next.js middleware
β”œβ”€β”€ next.config.ts                   # Next.js configuration
β”œβ”€β”€ tailwind.config.ts              # Tailwind configuration
β”œβ”€β”€ tsconfig.json                   # TypeScript configuration
└── package.json                    # Dependencies

πŸš€ Getting Started

Prerequisites

  • Node.js 18+ or Bun
  • PostgreSQL database
  • API keys for external services

Installation

  1. Clone the repository

    git clone https://github.com/your-username/carex-ai.git
    cd carex-ai
  2. Install dependencies

    # Using Bun (recommended)
    bun install
    
    # Or using npm
    npm install
  3. Set up environment variables

    cp .env.example .env.local

    Fill in your environment variables:

    # Database
    DATABASE_URL="postgresql://username:password@localhost:5432/carex_ai"
    
    # Authentication (Clerk)
    NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key
    CLERK_SECRET_KEY=your_clerk_secret_key
    
    # AI Services
    GOOGLE_API_KEY=your_google_api_key_here
    OPEN_ROUTER_API_KEY=your_openrouter_api_key
    NEXT_PUBLIC_ASSEMBLYAI_API_KEY=your_assemblyai_api_key
    MURF_API_KEY=your_murf_api_key
    
    # App Configuration
    NEXT_PUBLIC_APP_URL=http://localhost:3000
  4. Set up the database

    # Generate Prisma client
    bun run prisma generate
    
    # Run migrations
    bun run prisma migrate dev
  5. Start the development server

    bun run dev
  6. Open your browser Navigate to http://localhost:3000

πŸ”§ Usage

For Users

  1. Sign up/Login - Create an account or sign in
  2. Choose a Doctor - Select from available AI medical specialists
  3. Start Consultation - Begin a voice conversation
  4. Speak Naturally - Discuss your health concerns
  5. Review History - Access past consultations

For Developers

  1. API Integration - Use the provided API endpoints
  2. Custom Components - Extend the UI components
  3. Database Schema - Modify Prisma schema as needed
  4. AI Models - Integrate different AI providers

🌟 Key Features Explained

Voice Conversation Flow

User Speech β†’ AssemblyAI β†’ Text β†’ OpenAI β†’ Response β†’ Murf AI β†’ Audio

Session Management

  • Real-time tracking of conversation progress
  • Automatic session creation and management
  • Persistent storage of consultation data
  • User-specific history and analytics

AI Doctor Specialization

  • Cardiology - Heart and cardiovascular health
  • Neurology - Brain and nervous system
  • Dermatology - Skin conditions
  • Pediatrics - Child health
  • General Medicine - General health concerns

πŸ”’ Security & Privacy

  • End-to-end encryption for voice conversations
  • Secure API endpoints with authentication
  • Data privacy compliance (GDPR, HIPAA-ready)
  • Regular security audits and updates
  • User data protection and anonymization

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Development Workflow

  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.

πŸ™ Acknowledgments

  • Team Falcons - Development team
  • OpenAI - AI conversation capabilities
  • AssemblyAI - Speech recognition technology
  • Clerk - Authentication services
  • Spline - 3D design tools

πŸ“ž Support

πŸš€ Deployment

Vercel (Recommended)

# Install Vercel CLI
npm i -g vercel

# Deploy
vercel

Docker

# Build image
docker build -t carex-ai .

# Run container
docker run -p 3000:3000 carex-ai

Made with ❀️ by Team Falcons

GitHub stars GitHub forks GitHub issues GitHub pull requests

About

Carex AI is a cutting-edge medical consultation platform that leverages artificial intelligence to provide real-time voice conversations with specialized medical AI agents. Built with modern web technologies, it offers an intuitive interface for users to discuss health concerns and receive AI-powered medical guidance.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •