Skip to content

Waterkyuu/refract

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

314 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Refract - 24/7 Agent Helper

English | 中文

Fire Wave Agent Logo

License: MIT

Deploy on Vercel Deploy on Railway Deploy on Zeabur

Multi-agent orchestration supports data analysis and resume generation, with other features under development. The goal is to create intelligent agents that work 24/7.

Getting Started

Prerequisites

  • Node.js 20+
  • pnpm 9+

Installation

git clone https://github.com/Waterkyuu/refract.git
cd refract
pnpm install

Environment Variables

Create a .env.local file in the root directory:

# Zhipu AI (Required)
ZHIPU_API_KEY=your_zhipu_api_key

# E2B Sandbox (Required)
E2B_API_KEY=your_e2b_api_key

# Model (Optional, defaults to glm-4-flash)
GLM_MODLE=glm-4-flash

# Neon Auth (Required for authentication)
NEON_AUTH_BASE_URL=your_neon_auth_url
NEON_AUTH_COOKIE_SECRET=your_cookie_secret

# Cloudflare R2 (Required for file upload)
CLOUDFLARE_ACCOUNT_ID=your_account_id
R2_ACCESS_KEY_ID=your_access_key
R2_SECRET_ACCESS_KEY=your_secret_key

NPM_REGISTRY = "https://registry.npmmirror.com"

Development

pnpm dev

Open http://localhost:3000 to see the app.

Build

pnpm build
pnpm start

Docker

Build and run with Docker Compose:

docker compose up -d --build

If you keep environment variables in a local file, you can pass them in when starting Compose:

docker compose --env-file .env.local up -d --build

Or build and run the image directly:

docker build -t refract .
docker run -d -p 3000:3000 --env-file .env.local --name refract refract

Authentication on Vercel

If authentication works locally but fails on your deployed Vercel domain with an error like {"code":"INVALID_ORIGIN","message":"Invalid origin"}, your Neon Auth project is rejecting the site origin.

Add every deployed app origin to your Neon Auth / Better Auth trusted origins configuration, for example:

http://localhost:3000
https://fire-wave-agent.vercel.app

You should also make sure the same production domain is allowed in any OAuth provider callback or redirect settings you use.

Scripts

Command Description
pnpm dev Start dev server with Turbopack
pnpm build Production build
pnpm start Start production server
pnpm check:write Lint & format code
pnpm test Run unit tests
pnpm test:e2e Run E2E tests

Architecture

Refract agent orchestration architecture

License

MIT

About

Refract, data analysis, paper writing, report writing, resume generation, Canvas generation and more – your best partner, working 24/7.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors