Skip to content

Repository files navigation

LifePath Wellness Management System

A comprehensive wellness management application built with React, TypeScript, and Supabase. This system provides complete client onboarding, profile management, scan data processing, and form building capabilities.

🌟 Features

πŸ” Authentication & Role Management

  • Multi-role authentication (Admin, Staff, Client)
  • Secure user registration and login
  • Role-based access control

πŸ‘₯ Client Management

  • Comprehensive client onboarding wizard
  • Dynamic form builder for custom onboarding
  • Profile management with step-by-step editing
  • Client search and management tools

πŸ“Š Scan Data Management

  • Automated scan file processing (Excel, CSV, PDF, Images)
  • Path ID extraction and client assignment
  • Dropbox integration for automated uploads
  • Scan comparison and trend analysis

πŸ“ Form Builder System

  • Drag-and-drop form builder
  • Multiple field types (text, select, checkbox, file upload, etc.)
  • Form templates and reusable components
  • Import forms from various file formats

🎨 Beautiful UI/UX

  • Modern, responsive design with Tailwind CSS
  • Luxury pastel wellness color palette
  • Smooth animations and micro-interactions
  • Mobile-first responsive design

πŸš€ Tech Stack

  • Frontend: React 18, TypeScript, Vite
  • Styling: Tailwind CSS with custom wellness design system
  • Backend: Supabase (PostgreSQL, Auth, Storage)
  • Icons: Lucide React
  • Forms: React Hook Form with Zod validation
  • File Processing: XLSX, PDF.js, Mammoth
  • Deployment: Netlify ready

πŸ“¦ Installation

  1. Clone the repository

    git clone https://github.com/yourusername/lifepath-wellness.git
    cd lifepath-wellness
  2. Install dependencies

    npm install
  3. Set up environment variables

    cp .env.example .env

    Update .env with your Supabase credentials:

    VITE_SUPABASE_URL=your-supabase-url
    VITE_SUPABASE_ANON_KEY=your-supabase-anon-key
  4. Set up Supabase database

    • Create a new Supabase project
    • Run the migration files in supabase/migrations/ in order
    • Enable Row Level Security (RLS) on all tables
  5. Start development server

    npm run dev

πŸ—„οΈ Database Schema

The application uses a comprehensive PostgreSQL schema with the following main tables:

  • profiles - User profile information
  • clients - Client-specific data and codes
  • client_onboarding_data - Comprehensive onboarding information
  • form_templates - Dynamic form templates
  • scans - Scan data and processing results
  • bookings - Appointment scheduling
  • payments - Payment processing
  • system_settings - Application configuration

πŸ”§ Configuration

Form Templates

  • Create custom onboarding forms in Settings > Form Templates
  • Set default onboarding form in system settings
  • Import forms from Excel, CSV, PDF, or Word documents

User Roles

  • Admin: Full system access, user management, settings
  • Staff: Client management, scan processing, reports
  • Client: Personal profile, wellness tracking, appointments

Scan Processing

  • Automatic client ID extraction from cell A3
  • Support for multiple file formats
  • Dropbox integration for automated processing
  • Quality scoring and validation

πŸš€ Deployment

Netlify Deployment

npm run build
# Deploy the dist/ folder to Netlify

Environment Variables for Production

VITE_SUPABASE_URL=your-production-supabase-url
VITE_SUPABASE_ANON_KEY=your-production-anon-key
VITE_DEFAULT_CURRENCY=ZAR
VITE_TIMEZONE=Africa/Johannesburg
VITE_VAT_RATE=0.15

πŸ“± Demo Accounts

For testing purposes, you can use these demo accounts:

πŸ› οΈ Development

Project Structure

src/
β”œβ”€β”€ components/          # Reusable UI components
β”‚   β”œβ”€β”€ auth/           # Authentication components
β”‚   β”œβ”€β”€ admin/          # Admin-specific components
β”‚   β”œβ”€β”€ client/         # Client-specific components
β”‚   β”œβ”€β”€ forms/          # Form builder and renderer
β”‚   β”œβ”€β”€ scans/          # Scan management components
β”‚   β”œβ”€β”€ ui/             # Base UI components
β”‚   └── layout/         # Layout components
β”œβ”€β”€ hooks/              # Custom React hooks
β”œβ”€β”€ lib/                # Utility functions and configurations
β”œβ”€β”€ pages/              # Page components
└── types/              # TypeScript type definitions

Key Features Implementation

Form Builder

  • Drag-and-drop interface with react-beautiful-dnd
  • Dynamic field types with validation
  • Real-time preview and editing
  • Export/import functionality

Scan Processing

  • Multi-format file support
  • Automated client matching
  • Quality scoring algorithm
  • Batch processing capabilities

Profile Management

  • Step-by-step editing wizard
  • Auto-save functionality
  • Progress tracking
  • Comprehensive data validation

🀝 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, email support@lifepathwellness.co.za or create an issue in this repository.

πŸ™ Acknowledgments

  • Built with modern React and TypeScript best practices
  • Designed with accessibility and user experience in mind
  • Optimized for South African wellness industry requirements
  • Inspired by leading wellness and healthcare platforms

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages