Welcome to the Fiberplane Studio monorepo!
This project has an api and a frontend that can consume telemetry data from a Hono app.
To connect your Hono app to the Studio api, you'll need to add the code in packages/client-library-otel
to your Hono app. You can do this via NPM, or linking to the local codebase. Please read the client library README.md for instructions.
Worth noting is that the api connects to a local libsql (sqlite) database. Setup steps for this are simple (you just need to run migrations), and are in api/README.md.
The frontend is a React + Typescript + Tailwind app that uses shadcn/ui components. For more info on the frontend, see: frontend/README.md.
There are also folders containing:
fpx
- Rust code for production ingestion of telemetry datapackages/types
- The shared typescript types (and constants) used across the projects in the monorepowebhonc
- A proxy service for sending requests to your Hono app from a static public urlwww
- The documentation website for Studio
Let's focus on running the api and frontend for now.
You'll want to
- Run the code in this repo, and then
- Add some client code to a Hono app
The next two sections take you through how to do this.
- Clone this repo
cd api
and spin up the api (follow instructions in api/README)- Check the api is running on
http://localhost:8788
cd frontend
in a separate shell, and spin up the frontend (follow instructions in in frontend/README)- Check the frontend is running on
http://localhost:5173
Follow the instructions in the client-library-otel
README to add FPX telemetry to your Hono project.
This project uses typescript, biome and pnpm workspaces. Linting and formatting is handled with biome.
In the project root you can format all typescript codebases with pnpm run format
.
You will also want to use the project root to prepare the npx command for the distributable API. See the root's package.json
scripts, as well as the api's README for more details on testing the npx command.
Always publish with pnpm publish
.
If you've updated the code in packages/types
, you'll need to publish a new version of the package before publishing any other packages that depend on it.
The Rust types that will be used to generate the schemas are defined in xtask/src/commands/schemas.rs
.
To generate the frontend/src/schemas.ts
file, simply run cargo xtask generate-schemas
in the project root directory.
All code within the fpx
repository is distributed under the terms of
both the MIT license and the Apache License (Version 2.0).
See LICENSE-APACHE and LICENSE-MIT.