chore(uload): fix vite compat, clean deps, add DB setup

- Downgrade vite 7→6 to fix Plugin type mismatch (0 type errors now)
- Remove 20+ unused devDependencies (PocketBase, Stripe, Drizzle kit,
  Playwright, mdsvex, vitest-browser, gray-matter, etc.)
- Remove old config files (.env examples, Docker, prettierrc, eslint)
- Add uload to setup-databases.sh
- Remove shared-vite-config dep (not needed for simple config)
- Dev server starts successfully (725ms)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Till JS 2026-03-29 14:50:14 +02:00
parent 9942a21b8e
commit 9d2c7ad954
18 changed files with 37 additions and 958 deletions

View file

@ -1,36 +0,0 @@
# SvelteKit Configuration
PORT=3000
ORIGIN=https://your-domain.com
NODE_ENV=production
PUBLIC_APP_URL=https://ulo.ad
# Database (PostgreSQL)
# Development: Use local Docker container
DATABASE_URL=postgresql://uload:uload_dev_password_123@localhost:5432/uload_dev
# Production: Use your Coolify/Hetzner PostgreSQL container
# DATABASE_URL=postgresql://uload:your_password@uload-db-prod:5432/uload_prod
# File Storage (Cloudflare R2)
R2_ACCOUNT_ID=your_cloudflare_account_id
R2_ACCESS_KEY_ID=your_r2_access_key
R2_SECRET_ACCESS_KEY=your_r2_secret_key
R2_BUCKET_AVATARS=uload-avatars
R2_BUCKET_QR=uload-qr-codes
R2_PUBLIC_URL=https://files.ulo.ad
# Email (Resend)
RESEND_API_KEY=re_your_resend_api_key
RESEND_FROM_EMAIL=noreply@ulo.ad
# Umami Analytics (optional)
PUBLIC_UMAMI_URL=https://your-umami-instance.com
PUBLIC_UMAMI_WEBSITE_ID=your-website-id
# External Auth (to be implemented)
# AUTH_PROVIDER_CLIENT_ID=
# AUTH_PROVIDER_CLIENT_SECRET=
# Coolify specific (if needed)
# These will be set automatically by Coolify
# COOLIFY_URL=
# COOLIFY_TOKEN=

View file

@ -1,20 +0,0 @@
# SvelteKit Configuration
NODE_ENV=production
PORT=3000
ORIGIN=https://your-domain.com
PUBLIC_POCKETBASE_URL=https://your-domain.com/api
# PocketBase Admin Credentials
# These will be used to create the admin on first startup
POCKETBASE_ADMIN_EMAIL=till.schneider@memoro.ai
POCKETBASE_ADMIN_PASSWORD=p0ck3tRA1N
# Umami Analytics
# Replace with your actual Umami instance and website ID
PUBLIC_UMAMI_URL=https://your-umami-instance.com
PUBLIC_UMAMI_WEBSITE_ID=your-website-id
# Optional: Additional Configuration
# BODY_SIZE_LIMIT=512kb
# PROTOCOL_HEADER=x-forwarded-proto
# HOST_HEADER=x-forwarded-host

View file

@ -1,17 +0,0 @@
# Stripe Configuration
# Copy this to .env.local or add to your .env file
# Stripe API Keys (get from https://dashboard.stripe.com/test/apikeys)
PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_YOUR_PUBLISHABLE_KEY_HERE
STRIPE_SECRET_KEY=sk_test_YOUR_SECRET_KEY_HERE
# Stripe Product & Price IDs (will be created automatically by Claude)
STRIPE_PRODUCT_PRO=prod_xxx
STRIPE_PRICE_MONTHLY=price_xxx
STRIPE_PRICE_YEARLY=price_xxx
# Stripe Webhook Secret (from webhook endpoint in dashboard)
STRIPE_WEBHOOK_SECRET=whsec_xxx
# App URL for redirects
PUBLIC_APP_URL=http://localhost:5173 # Production: https://ulo.ad

43
apps/uload/.gitignore vendored
View file

@ -1,43 +0,0 @@
# Dependencies
node_modules
# Test results
test-results
# Build output
.output
.vercel
.netlify
.wrangler
.svelte-kit
build
dist
# OS
.DS_Store
Thumbs.db
# Environment files
.env
.env.*
!.env.example
!.env.*.example
# Vite
vite.config.js.timestamp-*
vite.config.ts.timestamp-*
# MCP Configuration with credentials
.mcp.json
.mcp.json-dev
# PocketBase
backend/pocketbase
backend/pb_data/
*.log
# IDE
.idea
.vscode
*.swp
*.swo

View file

@ -1,36 +0,0 @@
# SvelteKit Configuration
PORT=3000
ORIGIN=https://your-domain.com
NODE_ENV=production
PUBLIC_APP_URL=https://ulo.ad
# Database (PostgreSQL)
# Development: Use local Docker container
DATABASE_URL=postgresql://uload:uload_dev_password_123@localhost:5432/uload_dev
# Production: Use your Coolify/Hetzner PostgreSQL container
# DATABASE_URL=postgresql://uload:your_password@uload-db-prod:5432/uload_prod
# File Storage (Cloudflare R2)
R2_ACCOUNT_ID=your_cloudflare_account_id
R2_ACCESS_KEY_ID=your_r2_access_key
R2_SECRET_ACCESS_KEY=your_r2_secret_key
R2_BUCKET_AVATARS=uload-avatars
R2_BUCKET_QR=uload-qr-codes
R2_PUBLIC_URL=https://files.ulo.ad
# Email (Resend)
RESEND_API_KEY=re_your_resend_api_key
RESEND_FROM_EMAIL=noreply@ulo.ad
# Umami Analytics (optional)
PUBLIC_UMAMI_URL=https://your-umami-instance.com
PUBLIC_UMAMI_WEBSITE_ID=your-website-id
# External Auth (to be implemented)
# AUTH_PROVIDER_CLIENT_ID=
# AUTH_PROVIDER_CLIENT_SECRET=
# Coolify specific (if needed)
# These will be set automatically by Coolify
# COOLIFY_URL=
# COOLIFY_TOKEN=

View file

@ -1,20 +0,0 @@
# SvelteKit Configuration
NODE_ENV=production
PORT=3000
ORIGIN=https://your-domain.com
PUBLIC_POCKETBASE_URL=https://your-domain.com/api
# PocketBase Admin Credentials
# These will be used to create the admin on first startup
POCKETBASE_ADMIN_EMAIL=till.schneider@memoro.ai
POCKETBASE_ADMIN_PASSWORD=p0ck3tRA1N
# Umami Analytics
# Replace with your actual Umami instance and website ID
PUBLIC_UMAMI_URL=https://your-umami-instance.com
PUBLIC_UMAMI_WEBSITE_ID=your-website-id
# Optional: Additional Configuration
# BODY_SIZE_LIMIT=512kb
# PROTOCOL_HEADER=x-forwarded-proto
# HOST_HEADER=x-forwarded-host

View file

@ -1,17 +0,0 @@
# Stripe Configuration
# Copy this to .env.local or add to your .env file
# Stripe API Keys (get from https://dashboard.stripe.com/test/apikeys)
PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_YOUR_PUBLISHABLE_KEY_HERE
STRIPE_SECRET_KEY=sk_test_YOUR_SECRET_KEY_HERE
# Stripe Product & Price IDs (will be created automatically by Claude)
STRIPE_PRODUCT_PRO=prod_xxx
STRIPE_PRICE_MONTHLY=price_xxx
STRIPE_PRICE_YEARLY=price_xxx
# Stripe Webhook Secret (from webhook endpoint in dashboard)
STRIPE_WEBHOOK_SECRET=whsec_xxx
# App URL for redirects
PUBLIC_APP_URL=http://localhost:5173 # Production: https://ulo.ad

View file

@ -1 +0,0 @@
engine-strict=true

View file

@ -1,9 +0,0 @@
# Package Managers
package-lock.json
pnpm-lock.yaml
yarn.lock
bun.lock
bun.lockb
# Miscellaneous
/static/

View file

@ -1,16 +0,0 @@
{
"useTabs": true,
"singleQuote": true,
"trailingComma": "none",
"printWidth": 100,
"plugins": ["prettier-plugin-svelte", "prettier-plugin-tailwindcss"],
"overrides": [
{
"files": "*.svelte",
"options": {
"parser": "svelte"
}
}
],
"tailwindStylesheet": "./src/app.css"
}

View file

@ -1,40 +0,0 @@
import prettier from 'eslint-config-prettier';
import { includeIgnoreFile } from '@eslint/compat';
import js from '@eslint/js';
import svelte from 'eslint-plugin-svelte';
import globals from 'globals';
import { fileURLToPath } from 'node:url';
import ts from 'typescript-eslint';
import svelteConfig from './svelte.config.js';
const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));
export default ts.config(
includeIgnoreFile(gitignorePath),
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs.recommended,
prettier,
...svelte.configs.prettier,
{
languageOptions: {
globals: { ...globals.browser, ...globals.node },
},
rules: {
// typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects.
// see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
'no-undef': 'off',
},
},
{
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
languageOptions: {
parserOptions: {
projectService: true,
extraFileExtensions: ['.svelte'],
parser: ts.parser,
svelteConfig,
},
},
}
);

View file

@ -6,57 +6,30 @@
"dev": "vite dev",
"build": "vite build",
"preview": "vite preview",
"test": "pnpm run test:unit && pnpm run test:e2e",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"format": "prettier --write .",
"lint": "prettier --check . && eslint .",
"test:unit": "vitest run",
"test:e2e": "playwright test",
"db:generate": "drizzle-kit generate",
"db:migrate": "drizzle-kit migrate",
"db:push": "drizzle-kit push",
"db:studio": "drizzle-kit studio"
"lint": "prettier --check . && eslint ."
},
"type": "module",
"devDependencies": {
"@eslint/js": "^9.20.0",
"@playwright/test": "^1.51.0",
"@sveltejs/adapter-auto": "^4.0.0",
"@manacore/shared-vite-config": "workspace:*",
"@sveltejs/adapter-node": "^5.0.0",
"@sveltejs/kit": "^2.22.0",
"@sveltejs/vite-plugin-svelte": "^5.0.4",
"@tailwindcss/forms": "^0.5.8",
"@tailwindcss/typography": "^0.5.16",
"@manacore/shared-vite-config": "workspace:*",
"@tailwindcss/vite": "^4.1.11",
"@types/eslint__js": "^8.42.3",
"@types/node": "^24.3.0",
"@vitest/browser": "^3.2.4",
"@vitest/coverage-v8": "^3.2.4",
"drizzle-kit": "^0.31.7",
"@types/node": "^22.10.7",
"eslint": "^9.20.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-svelte": "^2.35.0",
"globals": "^15.0.0",
"gray-matter": "^4.0.3",
"jsdom": "^26.1.0",
"mdsvex": "^0.12.6",
"playwright": "^1.51.0",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.4.0",
"prettier-plugin-tailwindcss": "^0.6.0",
"rehype-autolink-headings": "^7.1.0",
"rehype-slug": "^6.0.0",
"svelte": "^5.0.0",
"svelte-check": "^4.0.0",
"tailwindcss": "^4.0.0",
"typescript": "^5.0.0",
"typescript-eslint": "^8.20.0",
"vite": "^7.0.4",
"vitest": "^3.2.3",
"vitest-browser-svelte": "^0.1.0",
"zod": "^4.0.17"
"vite": "^6.0.0"
},
"dependencies": {
"@manacore/local-store": "workspace:*",
@ -65,9 +38,7 @@
"@manacore/shared-auth-ui": "workspace:*",
"@manacore/shared-branding": "workspace:*",
"@manacore/shared-ui": "workspace:*",
"isomorphic-dompurify": "^2.26.0",
"lucide-svelte": "^0.539.0",
"svelte-i18n": "^4.0.1",
"svelte-sonner": "^1.0.5"
}
}

View file

@ -1,24 +0,0 @@
/** @type {import('tailwindcss').Config} */
export default {
content: ['./src/**/*.{html,js,svelte,ts}'],
darkMode: 'class',
theme: {
extend: {
colors: {
theme: {
primary: 'var(--theme-primary)',
'primary-hover': 'var(--theme-primary-hover)',
background: 'var(--theme-background)',
surface: 'var(--theme-surface)',
'surface-hover': 'var(--theme-surface-hover)',
text: 'var(--theme-text)',
'text-muted': 'var(--theme-text-muted)',
border: 'var(--theme-border)',
accent: 'var(--theme-accent)',
'accent-hover': 'var(--theme-accent-hover)',
},
},
},
},
plugins: [],
};

View file

@ -1,14 +1,7 @@
import { sveltekit } from '@sveltejs/kit/vite';
import tailwindcss from '@tailwindcss/vite';
import { defineConfig } from 'vite';
import { MANACORE_SHARED_PACKAGES } from '@manacore/shared-vite-config';
export default defineConfig({
plugins: [tailwindcss(), sveltekit()],
ssr: {
noExternal: MANACORE_SHARED_PACKAGES,
},
optimizeDeps: {
exclude: MANACORE_SHARED_PACKAGES,
},
});

View file

@ -1,98 +0,0 @@
# =============================================================================
# uload Docker Compose - Production (standalone)
# =============================================================================
# Use this for manual production deployment without Coolify.
# For Docker Compose deployments, use docker-compose.coolify.yml instead.
# =============================================================================
services:
# ---------------------------------------------------------------------------
# PostgreSQL Database
# ---------------------------------------------------------------------------
postgres:
image: postgres:16-alpine
container_name: uload-db-prod
restart: always
environment:
POSTGRES_DB: uload
POSTGRES_USER: uload
POSTGRES_PASSWORD: ${DB_PASSWORD}
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U uload -d uload"]
interval: 10s
timeout: 5s
retries: 5
networks:
- uload-network
# ---------------------------------------------------------------------------
# Redis Cache
# ---------------------------------------------------------------------------
redis:
image: redis:7-alpine
container_name: uload-redis-prod
restart: always
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- uload-network
# ---------------------------------------------------------------------------
# uload Web Application
# ---------------------------------------------------------------------------
app:
build:
context: .
dockerfile: Dockerfile
container_name: uload-app-prod
ports:
- '3000:3000'
environment:
NODE_ENV: production
PORT: 3000
HOST: 0.0.0.0
ORIGIN: ${ORIGIN:-https://ulo.ad}
DATABASE_URL: postgresql://uload:${DB_PASSWORD}@postgres:5432/uload
REDIS_URL: redis://redis:6379
AUTH_SECRET: ${AUTH_SECRET}
RESEND_API_KEY: ${RESEND_API_KEY:-}
STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY:-}
STRIPE_WEBHOOK_SECRET: ${STRIPE_WEBHOOK_SECRET:-}
R2_ACCESS_KEY_ID: ${R2_ACCESS_KEY_ID:-}
R2_SECRET_ACCESS_KEY: ${R2_SECRET_ACCESS_KEY:-}
R2_BUCKET_NAME: ${R2_BUCKET_NAME:-}
R2_ENDPOINT: ${R2_ENDPOINT:-}
PUBLIC_UMAMI_URL: ${PUBLIC_UMAMI_URL:-}
PUBLIC_UMAMI_WEBSITE_ID: ${PUBLIC_UMAMI_WEBSITE_ID:-}
restart: always
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- uload-network
volumes:
postgres_data:
driver: local
redis_data:
driver: local
networks:
uload-network:
driver: bridge

View file

@ -1,93 +0,0 @@
# =============================================================================
# uload Docker Compose - Local Development
# =============================================================================
#
# Usage:
# docker compose up -d # Start all services
# docker compose up -d postgres # Start only PostgreSQL
# docker compose logs -f # Follow logs
# docker compose down # Stop all services
# docker compose down -v # Stop and remove volumes
#
# Connection strings for local development:
# DATABASE_URL=postgresql://uload:uload_dev_password_123@localhost:5432/uload_dev
# REDIS_URL=redis://localhost:6379
#
# =============================================================================
services:
# ---------------------------------------------------------------------------
# PostgreSQL Database
# ---------------------------------------------------------------------------
postgres:
image: postgres:16-alpine
container_name: uload-db-dev
restart: unless-stopped
environment:
POSTGRES_DB: uload_dev
POSTGRES_USER: uload
POSTGRES_PASSWORD: ${DB_PASSWORD:-uload_dev_password_123}
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U uload -d uload_dev"]
interval: 10s
timeout: 5s
retries: 5
networks:
- uload-network
# ---------------------------------------------------------------------------
# Redis Cache
# ---------------------------------------------------------------------------
redis:
image: redis:7-alpine
container_name: uload-redis-dev
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
networks:
- uload-network
# ---------------------------------------------------------------------------
# pgAdmin (Database GUI)
# ---------------------------------------------------------------------------
pgadmin:
image: dpage/pgadmin4:latest
container_name: uload-pgadmin-dev
restart: unless-stopped
environment:
PGADMIN_DEFAULT_EMAIL: admin@localhost
PGADMIN_DEFAULT_PASSWORD: admin
PGADMIN_LISTEN_PORT: 5050
ports:
- "5050:5050"
volumes:
- pgadmin_data:/var/lib/pgadmin
depends_on:
postgres:
condition: service_healthy
networks:
- uload-network
volumes:
postgres_data:
driver: local
redis_data:
driver: local
pgadmin_data:
driver: local
networks:
uload-network:
driver: bridge