Skip to main content
This guide covers setting up a complete OneRun development environment for contributing to the platform. For just running OneRun, see the Quick Start Guide.

Prerequisites

  • Node.js LTS v22+ and pnpm for the frontend
  • Python 3.11+ and uv for the backend and workflows
  • Docker and Docker Compose for services
  • Git for version control

Repository Structure

Development Environment Setup

1. Clone the Repository

2. Start Core Services

Start the Temporal server (required for workflow orchestration):
For PostgreSQL, you can either install it locally or use a Docker container for development.

Frontend Development

The OneRun web application is built with Next.js, React, and TypeScript.

Setup

Configuration

Create environment file:
Update .env.local with the following configuration:
Better Auth Variables:
  • BETTER_AUTH_SECRET: Must be at least 32 characters long for security
  • BETTER_AUTH_URL: The auth endpoint URL for your Next.js app
  • BETTER_AUTH_TRUSTED_ORIGINS: Comma-separated list of allowed origins
  • BETTER_AUTH_JWT_*: JWT configuration for token handling
  • BETTER_AUTH_DISABLE_SIGNUP: Set to true to disable new user registration

Development Server

The app will be available at http://localhost:5173 with hot reload enabled.

Key Technologies

  • Next.js - React framework with built-in routing and server-side rendering
  • React 18 - UI framework with hooks and context
  • TypeScript - Type safety and better developer experience
  • Tailwind CSS - Utility-first styling
  • shadcn/ui - UI component library built on Radix UI
  • Better Auth - Authentication and session management
  • React Query - Data fetching and caching
  • Biome - Fast linting and formatting tool

Development Commands

Project Structure

Backend Development

The OneRun API is built with Python, FastAPI, and SQLAlchemy.

Setup

Configuration

Create environment file:
Update .env with the following configuration:
Key Variables:
  • HOST/PORT: Server binding configuration
  • DATABASE_URL: PostgreSQL connection string
  • AUTH_API_KEY: API authentication secret (must be 32+ characters)
  • AUTH_JWKS_URL: JWT key endpoint from Next.js app
  • TEMPORAL_ADDRESS: Temporal server connection
  • ANTHROPIC_API_KEY: AI model API key

Development Server

The API will be available at http://localhost:3001.

Key Technologies

  • FastAPI - Modern Python web framework with automatic OpenAPI docs
  • SQLAlchemy - ORM for database operations and migrations
  • Pydantic - Data validation and serialization
  • Better-Auth - Authentication integration
  • Temporal - Workflow orchestration client
  • Uvicorn - ASGI server for development and production

Development Commands

Project Structure

Next Steps

After setting up both frontend and backend:
  1. Run both services - Start the Next.js frontend and FastAPI backend simultaneously
  2. Set up your first project - Follow the Quick Start Guide to create a project and agent
  3. Explore the codebase - Review the Architecture to understand system design
  4. Create a worker - See Worker Examples to implement your AI agent
Make sure both PostgreSQL and Temporal services are running before starting the frontend and backend applications.
The frontend development server will proxy API requests to the backend, so CORS is handled automatically during development.