chore(tooling): replace turbo with moon, add proto toolchain

This commit is contained in:
Maze Winther 2026-06-15 00:01:28 +02:00
parent 8768f6dd8f
commit 6c81db47c0
9 changed files with 112 additions and 30 deletions

5
.gitignore vendored
View File

@ -1,6 +1,9 @@
node_modules/
.turbo/
dist/
.env
.env.*
!.env.example
docs/
# moon runtime cache
.moon/cache/

14
.moon/toolchains.yml Normal file
View File

@ -0,0 +1,14 @@
$schema: 'https://moonrepo.dev/schemas/toolchains.json'
# javascript must be enabled alongside bun
javascript: {}
bun:
version: '1.3.11'
# Auto-install deps when lockfile/manifest changes
installDependencies: true
# Rust toolchain — no crates yet, but enabling it now means
# moon will automatically understand Cargo.toml files and
# track Cargo.lock for hashing when they appear.
rust: {}

6
.moon/workspace.yml Normal file
View File

@ -0,0 +1,6 @@
$schema: 'https://moonrepo.dev/schemas/workspace.json'
# Discover all projects under apps/ automatically.
# When Rust crates land, add a 'crates/*' glob here.
projects:
- 'apps/*'

4
.prototools Normal file
View File

@ -0,0 +1,4 @@
# proto pins tool versions workspace-wide.
# Every developer and CI machine gets the exact same versions automatically.
moon = "2.3.3"
bun = "1.3.11"

View File

@ -26,6 +26,26 @@
You can still find the previous version at [opencut-app/opencut-classic](https://github.com/opencut-app/opencut-classic), which is the one to reach for today. [opencut.app](https://opencut.app) still runs the classic version; the rewrite will live at [new.opencut.app](https://new.opencut.app) until it's ready to take over.
## Development
Install [proto](https://moonrepo.dev/proto) if you haven't already:
```sh
bash <(curl -fsSL https://moonrepo.dev/install/proto.sh)
```
From the repo root:
```sh
proto use # installs bun + moon at the versions pinned in .prototools
bun install
```
```sh
moon run web:dev # localhost:5173
moon run api:dev # localhost:8787
```
## Contributing
We're not set up to take outside contributions yet while the architecture is being designed. If you want to follow along, ask questions, or just hang out, [join the Discord](https://discord.gg/zmR9N35cjK) or [open an issue](https://github.com/opencut-app/opencut/issues).

24
apps/api/moon.yml Normal file
View File

@ -0,0 +1,24 @@
$schema: 'https://moonrepo.dev/schemas/project.json'
language: 'typescript'
layer: 'application'
tasks:
dev:
command: 'bun run dev'
options:
runInCI: false # dev server — skipped in CI, never cached
build:
command: 'bun run build'
inputs:
- 'src/**/*'
- 'wrangler.jsonc'
- 'package.json'
outputs:
- 'dist'
deploy:
command: 'bun run deploy'
deps:
- '~:build'

32
apps/web/moon.yml Normal file
View File

@ -0,0 +1,32 @@
$schema: 'https://moonrepo.dev/schemas/project.json'
language: 'typescript'
layer: 'application'
tasks:
dev:
command: 'bun run dev'
options:
runInCI: false # dev server — skipped in CI, never cached
build:
command: 'bun run build'
inputs:
- 'src/**/*'
- 'public/**/*'
- 'vite.config.ts'
- 'tsconfig.json'
- 'package.json'
outputs:
- 'dist'
test:
command: 'bun run test'
inputs:
- 'src/**/*'
- 'tsconfig.json'
deploy:
command: 'bun run deploy'
deps:
- '~:build'

View File

@ -1,19 +1,14 @@
{
"name": "opencut",
"private": true,
"workspaces": ["apps/*", "architecture"],
"workspaces": ["apps/*"],
"scripts": {
"dev": "turbo dev",
"dev:web": "turbo dev --filter=@opencut/web",
"dev:architecture": "turbo dev --filter=@opencut/architecture",
"build": "turbo build",
"deploy": "turbo deploy"
"dev": "moon run web:dev api:dev",
"dev:web": "moon run web:dev",
"dev:api": "moon run api:dev",
"build": "moon run :build",
"test": "moon run :test",
"deploy": "moon run :deploy"
},
"devDependencies": {
"turbo": "latest"
},
"packageManager": "bun@1.3.11",
"dependencies": {
"opencut": "."
}
"packageManager": "bun@1.3.11"
}

View File

@ -1,16 +0,0 @@
{
"$schema": "https://turbo.build/schema.json",
"tasks": {
"build": {
"dependsOn": ["^build"],
"outputs": [".output/**", "dist/**"]
},
"dev": {
"cache": false,
"persistent": true
},
"deploy": {
"dependsOn": ["build"]
}
}
}