/helsa

Main project of Helsa, a healthcare and telemedicine SaaS

Primary LanguageTypeScriptMIT LicenseMIT

Helsa - Healthcare Platform

Table of Contents

Introduction

Welcome to Helsa, a cutting-edge telemedicine platform designed to connect patients and healthcare providers seamlessly. Helsa offers a modern and intuitive interface for virtual consultations, health monitoring, and medical record management.

This repository contains both, backend and frontend web source code, destined to manage all main features of the platform.

Features

  • Virtual Consultations: Secure video conferencing between patients and healthcare providers.
  • Health Monitoring: Track and record vital health metrics.
  • Medical Record Management: Secure storage and easy access to patient medical histories.
  • User Authentication: Secure login and user management system.
  • Responsive Design: Optimized for both desktop and mobile devices.
  • Modern UI/UX: Based on the color scheme with hexadecimal code #8167EC.

Tech Stack

Getting Started

Prerequisites

Before you begin, ensure you have the following installed:

  • Node.js (v16.x or later)
  • npm or yarn
  • MongoDB (for local development)
  • Docker (optional, for containerized setup)

Installation

  1. Clone the repository:

    git clone https://github.com/Duccem/ducen-hospital.git
    cd ducen-hospital
  2. Install dependencies:

    npm install
    # or
    yarn install
  3. Set up environment variables:

    Create a .env.local file in the root directory and add the following variables:

     DATABASE_URL=postgresql://postgres:A12345678@postgres
     NEXT_PUBLIC_BASE_URL=http://localhost:3000
     STRIPE_SECRET_KEY=your-stripe-secret-key
     SECRET=your-secret-key
     TRIGGER_SECRET_KEY=your-trigger-api-key
     MONGO_URI=mongodb://mongo:1427/helsa
     BETTER_AUTH_SECRET=random-secret-string
     RESEND_API_KEY=your-resend-api-key
  4. Run the development server:

    npm run dev
    # or
    yarn dev

    Open http://localhost:3000 with your browser to see the result.

Docker Setup (Optional)

You can run the Helsa project using Docker and Docker Compose, which simplifies the setup process and ensures consistency across different environments.

  1. Create a docker-compose.yml file in the root directory with the following content:

    version: '3.8'
    
    services:
      app:
        image: node:16-alpine
        container_name: helsa-app
        working_dir: /app
        volumes:
          - .:/app
        ports:
          - '3000:3000'
        environment:
          - DATABASE_URL=postgresql://postgres:A12345678@postgres
          - NEXT_PUBLIC_BASE_URL=http://localhost:3000
          - STRIPE_SECRET_KEY=your-stripe-secret-key
          - SECRET=your-secret-key
          - TRIGGER_SECRET_KEY=your-trigger-api-key
          - MONGO_URI=mongodb://mongo:1427/helsa
          - BETTER_AUTH_SECRET=random-secret-string
          - RESEND_API_KEY=your-resend-api-key
        command: npm run dev
    
      postgres:
        image: postgres
        container_name: helsa-postgres
        environment:
          POSTGRES_DB: 'support-attachments'
          POSTGRES_USER: 'postgres'
          POSTGRES_PASSWORD: 'A12345678'
  2. Run the application using Docker Compose:

      docker-compose up

    This will start both the Next.js application and a MongoDB instance. The app will be available at http://localhost:3000.

  3. Stopping the containers:

    To stop the containers, press Ctrl+C in the terminal where docker-compose up is running. Alternatively, you can stop them using:

    docker-compose down

    This will stop and remove the containers, but the data in MongoDB will persist in the mongo-data volume.

Deployment

Helsa is designed to be deployed on Vercel, but you can deploy it on any platform that supports Node.js.

  1. Deploy to Vercel:

    • Sign in to your Vercel account.
    • Link your repository and import your project.
    • Set up the environment variables in the Vercel dashboard.
    • Deploy your project.

Folder Structure

helsa/
├── etc/                             # Everything that is relevant information to the project
├── public/                          
├── src/                             # Project main folder
│   ├── app/                         # Next.js App router, code for backend and frontend apps
│   │   ├── (app)/                   # Frontend application
│   │   │   ├── (pages)/             # NextJS pages of app router
│   │   │   └── components/          # Project section components
│   │   └── api/                     # Backend api application
│   │       ├── events/              # Message Q Asynchronous events
│   │       ├── graphql/             # GraphQL API
│   │       └── webhooks/            # Webhooks to third party services
│   ├── libs/                        # Aux libraries
│   │   ├── ducen-ui/                # Custom own ui library
│   │   └── shadcn-ui/               # shadcn ui components
│   ├── modules/                     # Modules of DDD source code
│   │   ├── shared/                  # Shared modules across all apps
│   │   ├── doctor/                  
│   │   └── user/                    
│   ├── assets/                      
│   └── middleware.ts                # Function that its executed in all routes
├── .env.local                       
├── .eslintrc.json
├── .gitignore     
├── .prettierrc     
├── .components.json     
├── globals.d.ts     
├── next-env.d.ts     
├── postcss.config.mjs     
├── tailwind.config.ts     
├── tsconfig.ts     
├── next.config.js    
├── package.json     
└── README.md

Other links

Contributing

License

This project is licensed under the MIT License.

License

Contact

For any questions or inquiries, please contact us at support@helsa.com.