Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
OPENAI_API_KEY=
OPENAI_API_KEY=
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Optional: upgrade the Russian → Ukrainian bridge after quality evaluation.
UKRAINIAN_TRANSLATION_MODEL=gpt-5.6-luna
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ coverage
out
build
dist
*.tsbuildinfo

# misc
.DS_Store
Expand All @@ -33,4 +34,4 @@ yarn-error.log*

# bun
bun.lockb
bun.lock
bun.lock
63 changes: 27 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,40 @@
# Create Rubric App
# Lilac

This project is bootstrapped with [`create-rubric-app`](https://github.com/RubricLab/create-rubric-app).
Live speech translation with one setting and no conversational machinery.

## Getting Started
Lilac streams microphone audio over WebRTC to OpenAI's dedicated
`gpt-realtime-translate` endpoint. The translated transcript is the primary UI; the
source-language transcript sits quietly underneath it.

### 1. Install dependencies
Ukrainian text uses a specialized path because it is not a native output of the realtime
translation model. Lilac requests Russian from the realtime session, then converts a small
rolling draft into Ukrainian with `gpt-5.6-luna`. Draft text may refine while it streams and
commits at punctuation or after a short pause.

```sh
npm i
```

```sh
bun i
```

### 2. Set up the DB
## Run locally

```sh
npm run db:push
```

```sh
bun db:push
```

### 3. Run the development server

```sh
```bash
cp .env.example .env.local
npm install
npm run dev
```

```sh
bun dev
```

Open [localhost:3000](http://localhost:3000) in your browser to see the result.

You can start modifying the UI by editing [src/app/page.tsx](./src/app/(app)/page.tsx). The page auto-updates as you edit the file.
Add an OpenAI API key to `.env.local`, then open [localhost:3000](http://localhost:3000).
Microphone access and WebRTC require a secure context outside localhost.

### Deployment
## Commands

To serve your app to users, simply deploy the Next.js app eg. on [Railway](https://railway.app/new) or [Vercel](https://deploy.new/).
```bash
npm run check
npm run build
```

To persist data, you'll need a database. Both [Railway](https://docs.railway.app/databases/postgresql) and [Vercel](https://vercel.com/docs/storage/vercel-postgres) provide Postgres DBs.
## Stack

## Learn More
- Next.js 16
- React 19
- TypeScript
- OpenAI Realtime Translation over WebRTC
- OpenAI Responses streaming for the Ukrainian bridge

To learn more about this project, take a look at this [blog post](https://rubriclabs.com/blog/create-rubric-app).
No database, client SDK, state library, animation runtime, or UI kit.
36 changes: 35 additions & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,37 @@
{
"extends": ["@rubriclab/config/biome"]
"$schema": "https://biomejs.dev/schemas/2.5.6/schema.json",
"assist": {
"actions": {
"source": {
"organizeImports": "on"
}
}
},
"files": {
"includes": [
"**",
"!!node_modules",
"!!.next",
"!!.vercel",
"!!next-env.d.ts",
"!!public/sw.js"
]
},
"formatter": {
"enabled": true,
"indentStyle": "tab",
"lineWidth": 100
},
"linter": {
"enabled": true,
"rules": {
"preset": "recommended"
}
},
"javascript": {
"formatter": {
"quoteStyle": "single",
"semicolons": "asNeeded"
}
}
}
10 changes: 0 additions & 10 deletions next.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,4 @@ import type { NextConfig } from 'next'

export default {
reactStrictMode: true,
transpilePackages: [
'@rubriclab/actions',
'@rubriclab/agents',
'@rubriclab/auth',
'@rubriclab/blocks',
'@rubriclab/chains',
'@rubriclab/events',
'@rubriclab/shapes',
'@rubriclab/webhooks'
]
} satisfies NextConfig
Loading