Skip to main content
Version: v1.0.0

Designer Frontend

Repository: leia-org/leia-designer-frontend

The web interface used by instructors to create, configure, and test LEIAs. Built with React, TypeScript, and Vite, it connects to the LEIA Designer Backend to manage LEIAs, personas, problems, and experiments.


Tech Stack

TechnologyPurpose
React 19 + TypeScriptUI framework and type safety
ViteBuild tool and dev server
Tailwind CSS 4Utility-first styling
React Router DOM 7Client-side routing
AxiosHTTP client for backend communication
ZodSchema validation
Monaco EditorIn-browser code editing
Radix UIAccessible UI primitives
React ToastifyNotification toasts
ESLintCode quality
DockerContainerization

Prerequisites

  • Node.js >= 18.x
  • npm
  • The Designer Backend running locally (or accessible via URL)

Project Structure

leia-designer-frontend/
├── public/
│ └── logo/ # Static logo assets
├── src/ # Application source code
├── .env.example # Environment variable template
├── index.html # HTML entry point
├── vite.config.ts # Vite build configuration
├── tailwind.config.js # Tailwind CSS configuration
├── tsconfig.json # TypeScript configuration
├── eslint.config.js # ESLint configuration
├── server.cjs # Custom Node.js server (for production)
├── Dockerfile # Container build configuration
└── package.json # Dependencies and npm scripts

Environment Variables

Copy the example file and fill in your values:

cp .env.example .env
VariableDefaultDescription
VITE_APP_BACKENDhttp://localhost:3000URL of the Designer Backend API
tip

If you are running the backend on a different port or host, update VITE_APP_BACKEND accordingly. All API calls in the app use this variable.


Local Development

  1. Fork and clone the repository:

    git clone <your-fork-url>
    cd leia-designer-frontend
  2. Install dependencies:

    npm install
  3. Copy the environment template and configure your values:

    cp .env.example .env
  4. Start the development server:

    npm run dev

The app will be available at http://localhost:5173. Make sure the Designer Backend is running at the URL set in VITE_APP_BACKEND.


Available Scripts

ScriptCommandDescription
Dev servernpm run devStart Vite dev server with HMR
Buildnpm run buildCompile TypeScript and bundle for production
Previewnpm run previewPreview the production build locally
Lintnpm run lintCheck code with ESLint
Startnpm startLaunch the Node.js production server

Contributing

  1. Fork the repository and create a branch off main:

    git checkout -b feat/my-feature
  2. Follow the existing ESLint configuration

    danger

    Do not disable rules without justification.

  3. Make sure the app builds without errors before opening a PR:

    npm run build
  4. Use Conventional Commits for your commit messages (feat:, fix:, docs:, etc.).

  5. Open a Pull Request with a clear description of your changes. Include screenshots if you modified any UI elements or layouts.