TD-OLLAMA — Information for developers
Prerequisites
- Follow Tauri prerequisites
- Install Ollama and any model
- Bun v1.1.22 and rustc 1.82.0-nightly
General information
Project structure
It's a monorepo containing 2 parts:
- Desktop app
apps/desktop
(Tauri + Next.js) - Website
apps/website
(Next.js)
To manage it we use turborepo utilizing it's powerfull caching cabapilities.
Code quality
Code quality is checked both on your local machine and on push/pull requests on github side via actions.
- pre-commit hook runs
lint:fix
which applies safe fixes to your code via Biome for Next.js parts of application and clippy for Rust Tauri part. - pre-push hook runs
build:debug
which checks if your app compiles (in debug mode for Tauri and regular compilation for Next.js parts).
Local development
Local setup
First install bun deps
bun install
and then prepare git hooks via Husky
bun husky
Run desktop app in dev mode
bun dev:desktop
It spins up Next.js dev server on http://localhost:3000 and Tauri app in watch mode configured to listen to it
Run website in dev mode
bun dev:website
It just runs Next.js dev server on http://localhost:3000.
Compile the project
bun run build
Compile for other targets
Run build command manually cargo build --release --target=*
. Examples:
cargo build --release --target=x86_64-unknown-linux-gnu
cargo build --release --target=x86_64-apple-darwin
Use rustc --print target-list
to check supported targets.
More info
You can also utilize other commands in package.json
files so make sure to check them for additional info.