From f21ab74e383b4be3cae9bc97b9676dd8768ed5a7 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 24 Oct 2025 14:19:02 +0000 Subject: [PATCH] chore: add configuration files for monorepo setup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add root package.json and turbo.json - Add Next.js config files - Add FastAPI environment example - Add PWA manifest - Add ESLint and Prettier config 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- wan-pwa/.eslintrc.js | 7 +++ wan-pwa/.prettierrc | 8 ++++ wan-pwa/apps/api/.env.example | 18 ++++++++ wan-pwa/apps/web/.env.example | 11 +++++ wan-pwa/apps/web/package.json | 48 +++++++++++++++++++++ wan-pwa/apps/web/public/manifest.json | 62 +++++++++++++++++++++++++++ wan-pwa/apps/web/tsconfig.json | 27 ++++++++++++ wan-pwa/package.json | 32 ++++++++++++++ wan-pwa/packages/db/package.json | 10 +++++ wan-pwa/turbo.json | 23 ++++++++++ 10 files changed, 246 insertions(+) create mode 100644 wan-pwa/.eslintrc.js create mode 100644 wan-pwa/.prettierrc create mode 100644 wan-pwa/apps/api/.env.example create mode 100644 wan-pwa/apps/web/.env.example create mode 100644 wan-pwa/apps/web/package.json create mode 100644 wan-pwa/apps/web/public/manifest.json create mode 100644 wan-pwa/apps/web/tsconfig.json create mode 100644 wan-pwa/package.json create mode 100644 wan-pwa/packages/db/package.json create mode 100644 wan-pwa/turbo.json diff --git a/wan-pwa/.eslintrc.js b/wan-pwa/.eslintrc.js new file mode 100644 index 0000000..4b85440 --- /dev/null +++ b/wan-pwa/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + root: true, + extends: ["next/core-web-vitals", "prettier"], + rules: { + "@next/next/no-html-link-for-pages": "off", + }, +} diff --git a/wan-pwa/.prettierrc b/wan-pwa/.prettierrc new file mode 100644 index 0000000..e0b900f --- /dev/null +++ b/wan-pwa/.prettierrc @@ -0,0 +1,8 @@ +{ + "semi": false, + "singleQuote": false, + "tabWidth": 2, + "trailingComma": "es5", + "printWidth": 100, + "plugins": ["prettier-plugin-tailwindcss"] +} diff --git a/wan-pwa/apps/api/.env.example b/wan-pwa/apps/api/.env.example new file mode 100644 index 0000000..95882bf --- /dev/null +++ b/wan-pwa/apps/api/.env.example @@ -0,0 +1,18 @@ +# Supabase +SUPABASE_URL=https://xxxxx.supabase.co +SUPABASE_SERVICE_ROLE_KEY=eyJhbGci... + +# Replicate +REPLICATE_API_TOKEN=r8_xxxxx + +# API Configuration +ALLOWED_ORIGINS=http://localhost:3000 +PORT=8000 +ENV=development + +# Redis (optional for queue) +REDIS_URL=redis://localhost:6379 + +# Celery (optional for background tasks) +CELERY_BROKER_URL=redis://localhost:6379/0 +CELERY_RESULT_BACKEND=redis://localhost:6379/0 diff --git a/wan-pwa/apps/web/.env.example b/wan-pwa/apps/web/.env.example new file mode 100644 index 0000000..01e1b1d --- /dev/null +++ b/wan-pwa/apps/web/.env.example @@ -0,0 +1,11 @@ +# Supabase +NEXT_PUBLIC_SUPABASE_URL=https://xxxxx.supabase.co +NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGci... +SUPABASE_SERVICE_ROLE_KEY=eyJhbGci... + +# API +NEXT_PUBLIC_API_URL=http://localhost:8000 + +# App +NEXT_PUBLIC_APP_URL=http://localhost:3000 +NODE_ENV=development diff --git a/wan-pwa/apps/web/package.json b/wan-pwa/apps/web/package.json new file mode 100644 index 0000000..6527253 --- /dev/null +++ b/wan-pwa/apps/web/package.json @@ -0,0 +1,48 @@ +{ + "name": "@wan-pwa/web", + "version": "1.0.0", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "next lint", + "clean": "rm -rf .next node_modules" + }, + "dependencies": { + "@hookform/resolvers": "^3.9.1", + "@radix-ui/react-avatar": "^1.1.1", + "@radix-ui/react-dialog": "^1.1.2", + "@radix-ui/react-dropdown-menu": "^2.1.2", + "@radix-ui/react-label": "^2.1.0", + "@radix-ui/react-select": "^2.1.2", + "@radix-ui/react-slot": "^1.1.0", + "@radix-ui/react-tabs": "^1.1.1", + "@radix-ui/react-toast": "^1.2.2", + "@supabase/ssr": "^0.5.2", + "@supabase/supabase-js": "^2.46.1", + "class-variance-authority": "^0.7.0", + "clsx": "^2.1.1", + "lucide-react": "^0.454.0", + "next": "15.0.3", + "next-pwa": "^5.6.0", + "react": "^19.0.0-rc.0", + "react-dom": "^19.0.0-rc.0", + "react-hook-form": "^7.53.2", + "tailwind-merge": "^2.5.4", + "tailwindcss-animate": "^1.0.7", + "zod": "^3.23.8", + "zustand": "^5.0.1" + }, + "devDependencies": { + "@types/node": "^20", + "@types/react": "^18", + "@types/react-dom": "^18", + "autoprefixer": "^10.4.20", + "eslint": "^8", + "eslint-config-next": "15.0.3", + "postcss": "^8", + "tailwindcss": "^3.4.1", + "typescript": "^5" + } +} diff --git a/wan-pwa/apps/web/public/manifest.json b/wan-pwa/apps/web/public/manifest.json new file mode 100644 index 0000000..1ef582d --- /dev/null +++ b/wan-pwa/apps/web/public/manifest.json @@ -0,0 +1,62 @@ +{ + "name": "Wan2.1 PWA - AI Video Generation", + "short_name": "Wan2.1", + "description": "Generate stunning AI videos with Wan2.1 models", + "start_url": "/", + "display": "standalone", + "background_color": "#ffffff", + "theme_color": "#3b82f6", + "orientation": "portrait-primary", + "icons": [ + { + "src": "/icons/icon-72x72.png", + "sizes": "72x72", + "type": "image/png", + "purpose": "any maskable" + }, + { + "src": "/icons/icon-96x96.png", + "sizes": "96x96", + "type": "image/png", + "purpose": "any maskable" + }, + { + "src": "/icons/icon-128x128.png", + "sizes": "128x128", + "type": "image/png", + "purpose": "any maskable" + }, + { + "src": "/icons/icon-144x144.png", + "sizes": "144x144", + "type": "image/png", + "purpose": "any maskable" + }, + { + "src": "/icons/icon-152x152.png", + "sizes": "152x152", + "type": "image/png", + "purpose": "any maskable" + }, + { + "src": "/icons/icon-192x192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "any maskable" + }, + { + "src": "/icons/icon-384x384.png", + "sizes": "384x384", + "type": "image/png", + "purpose": "any maskable" + }, + { + "src": "/icons/icon-512x512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "any maskable" + } + ], + "categories": ["productivity", "entertainment"], + "screenshots": [] +} diff --git a/wan-pwa/apps/web/tsconfig.json b/wan-pwa/apps/web/tsconfig.json new file mode 100644 index 0000000..d7e05e5 --- /dev/null +++ b/wan-pwa/apps/web/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "target": "ES2020", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "@/*": ["./src/*"] + } + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +} diff --git a/wan-pwa/package.json b/wan-pwa/package.json new file mode 100644 index 0000000..1bfb0a6 --- /dev/null +++ b/wan-pwa/package.json @@ -0,0 +1,32 @@ +{ + "name": "wan-pwa", + "version": "1.0.0", + "private": true, + "description": "Wan2.1 PWA - AI Video Generation Platform", + "workspaces": [ + "apps/*", + "packages/*" + ], + "scripts": { + "dev": "turbo run dev", + "build": "turbo run build", + "start": "turbo run start", + "lint": "turbo run lint", + "test": "turbo run test", + "clean": "turbo run clean && rm -rf node_modules", + "format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,css,md}\"", + "db:migrate": "cd packages/db && npm run migrate", + "db:seed": "cd packages/db && npm run seed" + }, + "devDependencies": { + "@turbo/gen": "^2.3.0", + "prettier": "^3.3.3", + "prettier-plugin-tailwindcss": "^0.6.8", + "turbo": "^2.3.0" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=9.0.0" + }, + "packageManager": "npm@10.2.3" +} diff --git a/wan-pwa/packages/db/package.json b/wan-pwa/packages/db/package.json new file mode 100644 index 0000000..15fc850 --- /dev/null +++ b/wan-pwa/packages/db/package.json @@ -0,0 +1,10 @@ +{ + "name": "@wan-pwa/db", + "version": "1.0.0", + "private": true, + "description": "Database schema and migrations", + "scripts": { + "migrate": "echo 'Run migrations in Supabase dashboard'", + "seed": "echo 'Run seed data in Supabase dashboard'" + } +} diff --git a/wan-pwa/turbo.json b/wan-pwa/turbo.json new file mode 100644 index 0000000..48be123 --- /dev/null +++ b/wan-pwa/turbo.json @@ -0,0 +1,23 @@ +{ + "$schema": "https://turbo.build/schema.json", + "globalDependencies": ["**/.env.*local"], + "pipeline": { + "build": { + "dependsOn": ["^build"], + "outputs": [".next/**", "!.next/cache/**", "dist/**"] + }, + "dev": { + "cache": false, + "persistent": true + }, + "lint": { + "dependsOn": ["^lint"] + }, + "test": { + "dependsOn": ["^test"] + }, + "clean": { + "cache": false + } + } +}