Merge branch 'rewrite'

This commit is contained in:
Maze Winther 2026-06-21 15:09:34 +02:00
commit a53cd53f55
13 changed files with 148 additions and 1758 deletions

6
.gitignore vendored
View File

@ -1,5 +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

@ -27,6 +27,30 @@
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).
## Sponsors
OpenCut is supported by companies that believe in open source creator tools.
@ -35,10 +59,6 @@ OpenCut is supported by companies that believe in open source creator tools.
Want your logo here? Reach out at [sponsor@opencut.app](mailto:sponsor@opencut.app).
## 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).
## License
[MIT](LICENSE)

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'

17
apps/api/package.json Normal file
View File

@ -0,0 +1,17 @@
{
"name": "@opencut/api",
"private": true,
"version": "0.0.1",
"scripts": {
"dev": "wrangler dev",
"deploy": "wrangler deploy",
"build": "wrangler deploy --dry-run"
},
"dependencies": {
"elysia": "latest"
},
"devDependencies": {
"@cloudflare/workers-types": "latest",
"wrangler": "latest"
}
}

15
apps/api/src/index.ts Normal file
View File

@ -0,0 +1,15 @@
import { Elysia, t } from "elysia";
import { CloudflareAdapter } from "elysia/adapter/cloudflare-worker";
export default new Elysia({ adapter: CloudflareAdapter })
.get("/", () => ({ status: "ok" }))
.get("/health", () => ({ healthy: true, timestamp: new Date().toISOString() }))
.post(
"/echo",
({ body }) => body,
{
body: t.Object({ message: t.String() }),
}
)
// .compile() is required — it triggers AoT compilation at startup
.compile();

7
apps/api/wrangler.jsonc Normal file
View File

@ -0,0 +1,7 @@
{
"$schema": "node_modules/wrangler/config-schema.json",
"name": "opencut-api",
"main": "src/index.ts",
// Minimum date required for CloudflareAdapter AoT support
"compatibility_date": "2025-06-01"
}

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'

1719
bun.lock

File diff suppressed because it is too large Load Diff

View File

@ -1,18 +0,0 @@
{
"name": "opencut",
"private": true,
"workspaces": ["apps/*"],
"scripts": {
"dev": "turbo dev",
"dev:web": "turbo dev --filter=@opencut/web",
"build": "turbo build",
"deploy": "turbo deploy"
},
"devDependencies": {
"turbo": "latest"
},
"packageManager": "bun@1.3.11",
"dependencies": {
"opencut": "."
}
}

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"]
}
}
}