Installation
This guide will help you install and set up the LyfeAI Provider application.
Prerequisites
- Node.js 18.x or higher
- npm or yarn package manager
- PostgreSQL database (we recommend using Supabase)
- OpenAI API key (for AI features)
Steps
1. Clone the Repository
git clone https://github.com/LyfeAI/LyfeAI-Provider.git
cd LyfeAI-Provider
2. Install Dependencies
npm install
3. Set Up Environment Variables
Create a .env.local file in the root directory:
NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
SUPABASE_SERVICE_ROLE_KEY=your_service_role_key
OPENAI_API_KEY=your_openai_api_key
4. Set Up the Database
Run the SQL scripts in the scripts directory in order:
# Run these in your Supabase SQL editor or psql
1. 01_create_tables.sql
2. 02_create_views.sql
3. 03_create_policies.sql
4. 04_insert_sample_data.sql
5. Start the Development Server
npm run dev
The application will be available at http://localhost:3000.