Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .claude/settings.local.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"permissions": {
"allow": [
"Bash(git lfs push:*)",
"Bash(git push:*)",
"Bash(find:*)",
"Bash(git lfs pointer:*)",
"Bash(git add:*)",
"Bash(git rm:*)",
"Bash(git commit:*)",
"Bash(ls:*)",
"Bash(git checkout:*)",
"Bash(git fetch:*)",
"Bash(git filter-repo:*)",
"Bash(git remote add:*)"
],
"deny": []
}
}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.17.0
v22.17.0
32 changes: 25 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
FROM oven/bun:canary-alpine
# Due to a bug in Bun or Next 🤷‍♂️ we are unable to build the app using only Bun
# to fix this, we use a Docker image that contains both Bun and Node

# a lot of people have the same issue but the Bun team closed the ticket 🤷‍♂️
# https://github.com/oven-sh/bun/issues/8725
FROM imbios/bun-node:latest-current-alpine-git

# if the Bun team decides to fix the bug one day 🤷‍♂️ then we will be able to use this instead:
# FROM oven/bun:alpine

ARG DEBIAN_FRONTEND=noninteractive

Expand All @@ -18,13 +26,13 @@ RUN apk add font-arabic-misc font-inconsolata font-dejavu font-awesome
RUN apk add ttf-opensans

# For Puppeteer
# DISABLEd - we don't actually need Puppeteer on Clapper right now
# DISABLED: we don't actually need Puppeteer on Clapper right now
# RUN apk add build-base gcompat udev chromium

RUN apk add --no-cache ffmpeg

# Set up a new user named "user" with user ID 1000
RUN adduser --disabled-password --uid 1001 user
# Set up a new user named "user" with user ID 1002
RUN adduser --disabled-password --uid 1002 user

# Switch to the "user" user
USER user
Expand All @@ -50,9 +58,19 @@ COPY --chown=user . /app

RUN bun i

# this step can be done by the developer,
# and the file uploaded using HF CLI tools
# RUN bun run build
# we can use this all-in-one command, but it might timeout
#RUN bun run build

# this allows for a finer grained control
RUN bun run build:clap
RUN bun run build:timeline
RUN bun run build:client
RUN bun run build:io
RUN bun run build:colors
RUN bun run build:engine
RUN bun run build:broadway
RUN bun run build:clapper-services
RUN bun run build:app

EXPOSE 3000

Expand Down
3 changes: 3 additions & 0 deletions bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions bun.lockb

This file was deleted.

26 changes: 23 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
{
"name": "@aitube/clapper-monorepo",
"version": "0.2.4",
"version": "0.2.5",
"description": "A monorepo for the Clapper project. Individual packages are in the packages directory.",
"engines": {
"bun": ">=1.0.0"
},
"packageManager": "bun@1.0.25",
"packageManager": "bun@1.2.17",
"private": true,
"scripts": {
"dev": "bun run --cwd packages/app dev",
"start": "bun run --cwd packages/app start",
"start:prod": "bun run --cwd packages/app start:prod",
"clean:all": "bun run clean:clap && bun run clean:timeline && bun run clean:client && bun run clean:io && bun run clean:colors && bun run clean:engine && bun run clean:broadway && bun run clean:clapper-services && bun run clean:app",
"clean:clap": "bun run --cwd packages/clap clean",
"clean:timeline": "bun run --cwd packages/timeline clean",
"clean:client": "bun run --cwd packages/client clean",
"clean:io": "bun run --cwd packages/io clean",
"clean:colors": "bun run --cwd packages/colors clean",
"clean:engine": "bun run --cwd packages/engine clean",
"clean:broadway": "bun run --cwd packages/broadway clean",
"clean:clapper-services": "bun run --cwd packages/clapper-services clean",
"clean:app": "bun run --cwd packages/app clean",
"build": "bun run build:all",
"build:all": "bun run build:clap && bun run build:timeline && bun run build:client && bun run build:io && bun run build:colors && bun run build:engine && bun run build:broadway && bun run build:clapper-services && bun run build:app",
"build:clap": "bun run --cwd packages/clap build",
Expand All @@ -28,8 +38,18 @@
},
"trustedDependencies": [
"@aitube/clapper",
"@tailwindcss/oxide",
"bufferutil",
"electron",
"electron-winstaller",
"esbuild",
"fs-xattr",
"macos-alias",
"msw",
"onnxruntime-node",
"protobufjs"
"protobufjs",
"sharp",
"unrs-resolver"
],
"workspaces": [
"packages/clap",
Expand Down
23 changes: 21 additions & 2 deletions packages/app/next.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
/** @type {import('next').NextConfig} */
import { join, dirname } from "node:path";
import { fileURLToPath } from "node:url";

const __filename = fileURLToPath(import.meta.url); // get the resolved path to the file
const __dirname = dirname(__filename); // get the name of the directory

process.on('unhandledRejection', error => {
console.log('unhandledRejection', error);
});

const nextConfig = {
output: 'standalone',

// this includes files from the monorepo base two directories up
// see: https://nextjs.org/docs/pages/api-reference/config/next-config-js/output#caveats
outputFileTracingRoot: join(__dirname, '../../'),

experimental: {
serverActions: {
// a clap file can be quite large - but that's OK
bodySizeLimit: '32mb'
}
},


// https://nextjs.org/docs/app/guides/memory-usage#try-experimentalwebpackmemoryoptimizations
// I suspect this might sometimes crash the build of the app
webpackMemoryOptimizations: false // let's set it to false
},
images: {
// temporary fix for:
Expand Down Expand Up @@ -62,4 +81,4 @@ const nextConfig = {
}
}

module.exports = nextConfig
export default nextConfig;
Loading
Loading