An open API service indexing awesome lists of open source software.

https://github.com/besidka/besidka

Your digital besidka for all AI chats. Connect to any LLM using your API key. Open-source, private, and community-driven. Self-hosted solution.
https://github.com/besidka/besidka

ai besidka better-auth chat cloudflare daisyui drizzle-orm nuxt resend vercel-ai-sdk workers

Last synced: about 1 month ago
JSON representation

Your digital besidka for all AI chats. Connect to any LLM using your API key. Open-source, private, and community-driven. Self-hosted solution.

Awesome Lists containing this project

README

          

# Besidka — AI Chat

Bring Your API Keys and Pay for What You Use.

og-image

My detailed post in Twitter about the process of development:

https://x.com/besidka_ai/status/1946685763183133001

## Project

Project board is available [here](https://github.com/orgs/besidka/projects/2).

## How to try?

1. You are welcome to visit the production site [www.besidka.com](https://www.besidka.com).
2. Please choose any option of authentication such as Google sign in, GitHub sign in or more common way of the Email + Password flow.
3. When you are authorized, please put your API keys there: [www.besidka.com/profile/keys](https://www.besidka.com/profile/keys).
4. You are welcome to start a new chat: [https://www.besidka.com/chats/new](https://www.besidka.com/chats/new)

## Tech stack

- [Nuxt (Vue + Nitro + Cloudflare workers)](https://nuxt.com/)
- [Drizzle ORM](https://orm.drizzle.team/)
- [Better Auth](https://www.better-auth.com/)
- [Resend](https://resend.com/)
- [Daisy UI](https://daisyui.com/)
- [Vercel AI SDK](https://ai-sdk.dev/docs)

## Features

- **PINK** — Dark and light themes, both unapologetically pink
- **BYOK — Bring Your Own API Key** — Use your OpenAI or Google AI Studio keys and only pay for what you use. No subscriptions, no markup
- **Multiple AI Models** — Switch between GPT-4o, Gemini and other LLMs in one place
- **Web Search** — Ground AI answers with real-time web context
- **Reasoning Mode** — Step-by-step thinking for complex questions
- **File Attachments & File Manager** — Send images and PDFs, reuse files across chats
- **Chat Branching** — Fork a conversation mid-thread to explore a different direction
- **Projects** — Organize chats with shared instructions and memory
- **Resumable Streams** — Refresh the page and pick up right where you left off
- **Chat History** — Search, pin and rename past conversations
- **Syntax Highlighting** — Clean, readable code blocks out of the box
- **No Install Required** — Works in any browser, sign in and go
- **Better Auth** — Email/password, Google or GitHub sign-in

## OAuth troubleshooting

### Social OAuth in in-app browsers

- **Symptom:** Google or GitHub social sign-in is unavailable, or Google shows
`403: disallowed_useragent`.
- **Cause:** The app is opened in an embedded/in-app browser
(for example Threads, Instagram, Facebook, TikTok), and OAuth providers
may block these user agents.
- **Resolution:** Open the same page in your system browser
(Chrome/Safari/Firefox) and try again with social sign-in.
- **Config sanity check:** Ensure your Google OAuth app has this redirect URI:
`https:///api/auth/callback/google`

## Local installation

Pay your attention that the project is designed to run on Cloudflare Workers. It requires additional steps to run it via Cloudflare Workers preview or deploy to the production environment.

The steps below are for local development only for the quick start and check.

### Prerequisites

- [PNPM](https://pnpm.io/)

### Steps

Clone the repository.

```bash
git clone git@github.com:besidka/besidka.git
```

Go to the project directory. Install the dependencies.

```bash
cd besidka
pnpm install
```

Copy ENV related files.
```bash
cp .dev.vars.example .dev.vars
```

Generate environment types for the project.
```bash
pnpm run cf-typegen
```

Prepare drizzle migrations.
```bash
# Expected output is .drizzle/migrations/*.sql
pnpm run db:generate
```

Apply the migrations to the D1 database.
```bash
# Expected output is .wrangler/state/v3/d1/*.sqlite
pnpx wrangler d1 migrations apply DB
```

Start the development server.
```bash
pnpm run dev
```

or to start Cloudflare Workers preview server
```bash
pnpm run preview
```

1. Open [http://localhost:3000](http://localhost:3000) in your browser.
2. Sign up [http://localhost:3000/signup](http://localhost:3000/signup). Please use the Email + Password flow because you don't have prepared API keys for Google and GitHub OAuth yet. In development mode you don't need to wait for email confirmation. You have to be automatically redirected to the home page as a customer already.
3. Put your own API keys here: [http://localhost:3000/profile/keys](http://localhost:3000/profile/keys)
4. You are welcome to start a new chat: [http://localhost:3000/chats/new](http://localhost:3000/chats/new)

## Security

### Snyk code checking repository

- [Snyk](https://snyk.io/) is a tool for finding and fixing vulnerabilities in your code.

```bash
# Total issues: 0
snyk code test
```

image

## Preview




Light theme






image


image






Dark theme






image


image