Skip to content

codse/chat

Repository files navigation

Getting Started

Prerequisites

  • Node.js 18+
  • pnpm 8+

Installation

  1. Clone the repository

  2. Install dependencies:

pnpm install
  1. Set up environment variables: Create .env.local & .env files in the root directory with:
# .env
VITE_APP_URL=http://localhost:3000
  1. Run npx convex dev and use local deployment. It will create .env.local file for you.
# .env.local
CONVEX_DEPLOYMENT=your-deployment-id
CONVEX_URL=your-convex-url
  1. 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
  2. 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>
  1. Start the development server:
pnpm dev

The application will be available at http://localhost:3000

Project Structure

  • src/ - Source code
    • components/ - React components
    • routes/ - TanStack Router routes
    • lib/ - Utility functions
  • convex/ - Convex backend functions and schema

Tech Stack

About

What will it take to be the best AI chat app ever?

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •