This guide will help you set up the Convo Coach project locally.
- Node.js (v18 or later)
- pnpm
- OpenAI API key
- Docker (for local Supabase)
- Clone the repository:
git clone https://github.com/poteris/ocpb.git
cd ocpb-
Create environment configuration:
Create a
.envfile in the root directory with:
SUPABASE_URL=
SUPABASE_ANON_KEY=
OPENAI_API_KEY=your_openai_key_here- Install the project dependencies:
pnpm install- Start the local Supabase instance:
pnpm db:startImportant notes:
- If Supabase is already running locally, stop it first:
pnpm db:stop - To completely reset the database:
pnpm db:reset:all(⚠️ This will erase all data)
- Launch the application:
- This command starts the Next.js development server which offers hot reloading
pnpm dev- Smoke test the application with Playwright E2E tests:
- Before first run, install playwright browsers and set the host and port of your dev server:
pnpm exec playwright install --with-deps
echo E2E_TEST_BASE_URL=http://localhost:3000 >> ./.env
echo USE_MOCK_OPENAI=true >> ./.env- Then to execute the E2E smoke test suite:
pnpm dev && pnpm test:ui- There is also a github action that invokes the Playwright E2E smoke test suite for a given branch, when the associated PR is marked as Ready for Review
- Supabase: Database and authentication
- Supabase.js: For Supabase client and database operations
- AI Integration: OpenAI's API for language model capabilities
- Frontend and Backend Framework: Next.js for server-side rendering and API routes
- State Management: Jotai for global React state management
- Zod: For data validation and schema definition
- UI Components: TailwindCSS with Shadcn for consistent styling
- Home
- Scenarios
- Chat
- Admin
- Organiser Admin
Immediate focus areas include:
-
Enhanced Error Handling
- Implementing comprehensive error boundaries
- Improving error reporting and recovery
- Implementing robust error handling in the UI
- Implement loggers and monitoring
-
Testing
- More test coverage
-
Backend Architecture
- Transitioning to tRPC for type-safe API calls
-
UI Enhancement
- Implementing Figma designs
- Ensuring consistent user experience
-
Authentication
- Implementing user authentication
- Ensuring secure access to the application
-
Database
- Implementing database migrations
- Remove hardcoded data which is pushed to db on startup
- Implementing RLS (with auth)
-
AI
- Add more LLM models
We welcome contributions! Before submitting changes, please:
- Ensure your code follows our styling conventions
- Write tests for new features
- Update documentation as needed
For major changes, please open an issue first to discuss your proposed modifications.
pnpm db:start- Launch Supabase locallypnpm db:stop- Stop Supabase instancepnpm db:reset:all- Reset database (⚠️ destructive)pnpm start- Start development serverpnpm test- Run test suitepnpm test:ui- Run Playwright E2E smoke test suite
For additional assistance or questions, please check our issue tracker or reach out to the development team.