> ## Documentation Index
> Fetch the complete documentation index at: https://fymo.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Development Setup

> Clone the framework, install its Python and Node dependencies, and run a bundled example app against your local checkout.

This page is for anyone contributing to the fymo framework itself, meaning the `fymo/` package, its CLI, and its build pipeline. If you're building an application with fymo instead, head over to the [quickstart](/quickstart).

## Prerequisites

* Python 3.11 or newer, since `pyproject.toml` sets `requires-python = ">=3.11"`
* Node.js 20 or newer. The bundler shells out to esbuild, and the SSR sidecar runs on Node
* [uv](https://docs.astral.sh/uv/), which the project's own CI uses, though a plain `pip` and `venv` workflow works fine too

<Steps>
  <Step title="Clone the repo">
    ```bash theme={null}
    git clone https://github.com/Bishwas-py/fymo.git
    cd fymo
    ```
  </Step>

  <Step title="Install Python dependencies">
    With uv:

    ```bash theme={null}
    uv sync
    ```

    This installs fymo itself in editable mode, plus the dev dependencies from `pyproject.toml`: pytest, pytest-asyncio, and pydantic.

    Prefer a plain virtualenv? This covers the same ground:

    ```bash theme={null}
    python3 -m venv .venv
    source .venv/bin/activate
    pip install -e ".[pydantic]"
    pip install pytest pytest-asyncio
    ```
  </Step>

  <Step title="Install root npm dependencies">
    ```bash theme={null}
    npm install
    ```

    The root `package.json` declares svelte and devalue as runtime dependencies, and esbuild, esbuild-svelte, jsdom, svelte-preprocess, and typescript as dev dependencies. These are what the framework's own build and test code, under `fymo/build/js`, shells out to.
  </Step>

  <Step title="Run the test suite">
    ```bash theme={null}
    uv run pytest tests/
    ```

    Or, without uv, with your virtualenv active:

    ```bash theme={null}
    pytest tests/
    ```

    Tests live under `tests/`. Each file follows the `test_*.py` naming pattern, set in `pyproject.toml`.
  </Step>
</Steps>

## Running an example app

The repo ships two example apps under `examples/`. One is `blog_app`, which covers remote functions and auth; the other is `todo_app`, a plain CRUD-style UI. Each has its own `package.json` and `requirements.txt`, since it's meant to work as a standalone fymo project you could copy out of the repo.

<Steps>
  <Step title="Install the example's npm dependencies">
    Pick `blog_app` or `todo_app`, whichever you'd like to explore, then install its dependencies:

    ```bash theme={null}
    cd examples/blog_app   # or examples/todo_app
    npm install
    ```
  </Step>

  <Step title="Build and serve">
    ```bash theme={null}
    fymo build
    fymo serve
    ```

    Or, if you'd like the browser to reload automatically as you edit, run `fymo dev` instead for incremental rebuilds.

    Visit `http://127.0.0.1:8000` to see it running.
  </Step>
</Steps>

<Note>
  Both example apps list `fymo>=0.1.0` in their `requirements.txt`, which normally means pulling fymo from PyPI. Neither the example apps nor the CI workflows spell out a step for pointing that dependency at your local checkout instead.

  In practice this tends to work out on its own. If you run an example from the same environment where you ran `uv sync` at the repo root, that environment already holds your editable install of fymo. So running `python` or `fymo` there picks up your working copy, not the published release, simply because that's how an editable install behaves.

  If you set up an example in its own fresh virtual environment instead, you'll need to repeat that editable install yourself. Something like `pip install -e /path/to/fymo` will do it, so your local changes show up too.
</Note>

## Commit messages

CI checks that every non-merge commit message follows Conventional Commits: `type(scope): description`. The type must be one of `feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert`. A lint job in `.github/workflows/ci.yml` enforces this on every push to main.

<CardGroup cols={2}>
  <Card title="The app/ directory" icon="folder-tree" href="/app-directory">
    A map of where everything lives in a Fymo project.
  </Card>

  <Card title="Quickstart" icon="rocket" href="/quickstart">
    The application-builder path: install fymo and scaffold a new project.
  </Card>
</CardGroup>
