Merge branch 'rewrite'
This commit is contained in:
commit
a53cd53f55
|
|
@ -1,5 +1,9 @@
|
||||||
node_modules/
|
node_modules/
|
||||||
.turbo/
|
dist/
|
||||||
.env
|
.env
|
||||||
.env.*
|
.env.*
|
||||||
!.env.example
|
!.env.example
|
||||||
|
docs/
|
||||||
|
|
||||||
|
# moon runtime cache
|
||||||
|
.moon/cache/
|
||||||
|
|
|
||||||
|
|
@ -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: {}
|
||||||
|
|
@ -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/*'
|
||||||
|
|
@ -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"
|
||||||
28
README.md
28
README.md
|
|
@ -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.
|
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
|
## Sponsors
|
||||||
|
|
||||||
OpenCut is supported by companies that believe in open source creator tools.
|
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).
|
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
|
## License
|
||||||
|
|
||||||
[MIT](LICENSE)
|
[MIT](LICENSE)
|
||||||
|
|
|
||||||
|
|
@ -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'
|
||||||
|
|
@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -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();
|
||||||
|
|
@ -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"
|
||||||
|
}
|
||||||
|
|
@ -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'
|
||||||
18
package.json
18
package.json
|
|
@ -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": "."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
16
turbo.json
16
turbo.json
|
|
@ -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"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue