This document outlines the various workflow styles available for developing, building, and deploying the Unraid API monorepo.
The Unraid API monorepo consists of several packages:
api: The Unraid API backendweb: The web frontend componentsplugin: The Unraid pluginunraid-ui: UI components library
To start all development servers in the monorepo:
pnpm devThis command runs all development servers concurrently:
- API server: http://localhost:3001
- Web components: http://localhost:4321
- UI components: http://localhost:5173
If you want to work on a specific package, you can run its development server individually:
cd api
pnpm devcd web
pnpm devcd unraid-ui
pnpm devTo build all packages in the monorepo:
pnpm buildThe plugin build requires Docker. This command automatically builds all dependencies (API, web) before starting Docker:
cd plugin
pnpm run docker:build-and-run
# Then inside the container:
pnpm buildThis serves the plugin at http://YOUR_IP:5858/ for installation on your Unraid server.
cd api
pnpm buildcd web
pnpm buildcd web
pnpm build:devTo deploy to a development Unraid server:
pnpm unraid:deploy <SERVER_IP>This command builds and deploys all components to the specified Unraid server.
cd api
pnpm unraid:deploy <SERVER_IP>cd web
pnpm unraid:deploy <SERVER_IP>cd plugin
pnpm unraid:deploy <SERVER_IP>To run tests across all packages:
pnpm testcd <package-directory>
pnpm testTo lint all packages:
pnpm lintTo automatically fix linting issues:
pnpm lint:fixTo run type checking across all packages:
pnpm type-checkFor packages that use GraphQL, you can generate types from your schema:
cd <package-directory>
pnpm codegenTo watch for changes and regenerate types:
cd <package-directory>
pnpm codegen:watchThe API package supports Docker-based development:
cd api
pnpm container:build # Build the Docker container
pnpm container:start # Start the container
pnpm container:stop # Stop the container
pnpm container:enter # Enter the container shell
pnpm container:test # Run tests in the containerWhen working with a deployed Unraid API, you can use the CLI:
unraid-api --help- Clone the repository:
git clone git@github.com:unraid/api.git - Set up the monorepo:
just setuporpnpm install - Start development servers:
pnpm dev - Make your changes
- Test your changes:
pnpm test - Deploy to a development server:
pnpm unraid:deploy <SERVER_IP> - Verify your changes on the Unraid server
If using nix, run nix develop from the root of the repo before Step 2.