- Node.js 18+
- pnpm 8+
-
Clone the repository
-
Install dependencies:
pnpm install- Set up environment variables:
Create
.env.local&.envfiles in the root directory with:
# .env
VITE_APP_URL=http://localhost:3000- Run
npx convex devand use local deployment. It will create.env.localfile for you.
# .env.local
CONVEX_DEPLOYMENT=your-deployment-id
CONVEX_URL=your-convex-url-
Run the Convex Auth CLI (
npx @convex-dev/auth) to configure authentication:- When prompted for SITE_URL, enter
http://localhost:3000 - For all other prompts, select 'Yes' to continue
- When prompted for SITE_URL, enter
-
Set up Convex environment variables, either through the dashboard or the CLI.
This is used for free models. Alternatively, you can set up keys using BYOK dialog from app's sidebar.
npx convex env set OPENROUTER_API_KEY <your-openrouter-api-key>If you'd like to use Google login:
npx convex env set AUTH_GOOGLE_SECRET <your-google-secret>
npx convex env set AUTH_GOOGLE_ID <your-google-client-id>- Start the development server:
pnpm devThe application will be available at http://localhost:3000
src/- Source codecomponents/- React componentsroutes/- TanStack Router routeslib/- Utility functions
convex/- Convex backend functions and schema
- TanStack Start - Framework
- TanStack Router - Routing
- TanStack Query - Data fetching
- Convex - Backend
- Convex Auth - Authentication
- React - UI library
- Tailwind CSS - Styling
- Lucide - Icons
- Shadcn UI - UI components
- Prompt kit - Chat UI
- OpenRouter - AI API
- Vercel AI SDK - AI SDK