mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 20:41:09 +02:00
After the mobile-app deletion unblocked \`@context/mobile\`, five more pre-existing failures surfaced across shared packages and two services. All were silent-masked by the postinstall \`|| true\` for months. - **shared-ai**: \`planner/loop.ts\` imported \`ToolSchema\` from \`../tools/function-schema\`, which only imports (not re-exports) the type. Fixed to import from the source (\`../tools/schemas\`). - **shared-logger**: \`typeof window !== 'undefined'\` blows up under tsconfigs that don't include the DOM lib (e.g. uload-server's \`bun-types\`-only config), because shared-logger is consumed via source import. Replaced with a \`globalThis\`-indirected check that compiles under any lib configuration. - **shared-hono**: \`credits.ts\` returned \`res.json()\` directly as \`Promise<T | null>\`. Modern \`@types/node\` / undici types return \`unknown\` strictly — cast to \`T\` at the boundary so the generic contract is explicit. - **uload-server**: \`routes/analytics.ts\` + \`routes/email.ts\` still imported \`AuthUser\` from a \`middleware/jwt-auth\` module that was deleted during the migration to \`@mana/shared-hono\`. Replaced with \`AuthVariables\` from shared-hono, which matches the actual context shape set by \`authMiddleware()\`. - **manavoxel/web**: \`guestSeed\` collection entries were wrapped in arrow functions, but \`local-store\` expects \`T[]\` directly and iterates \`seed.length\` — which on a function is 0. The "guest seed" was silently dead; eager-evaluating \`generateGuestWorld()\` once and sharing the result fixes both the type and the runtime. Verified: \`pnpm run type-check\` from the repo root now exits 0 — 76/76 tasks successful, no failures. First fully green state since well before the postinstall \`|| true\` was introduced. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| apps | ||
| packages/uload-database | ||
| CLAUDE.md | ||
| package.json | ||
| README.md | ||
uLoad - URL Shortener & Link Management
A modern URL shortener and link management platform built with SvelteKit and PocketBase.
🚀 Production
Live: https://ulo.ad
Admin: https://ulo.ad/_/
🛠 Tech Stack
- Frontend: SvelteKit 2.0 + Svelte 5
- Backend: PocketBase (embedded)
- Styling: Tailwind CSS 4.0
- Deployment: Docker + Coolify on Hetzner VPS
- Database: SQLite (via PocketBase)
📦 Features
- URL shortening with custom codes
- QR code generation
- Click analytics
- User profiles (e.g., ulo.ad/p/username)
- Link management dashboard
- Real-time statistics
🏃 Development
# Install dependencies
npm install --legacy-peer-deps
# Start development server
npm run dev
# Start with PocketBase backend
npm run dev:all
# Run tests
npm run test
# Type checking
npm run check
🐳 Docker Deployment
# Build and run locally
docker-compose up --build
# Access at:
# Frontend: http://localhost:3000
# PocketBase: http://localhost:8090
📝 Documentation
- Deployment Guide - Complete Docker Compose deployment instructions
- Lessons Learned - Troubleshooting and insights
- Domain Setup - ulo.ad configuration
- Coolify Setup - Detailed Coolify configuration
🔧 Environment Variables
NODE_ENV=production
PORT=3000
ORIGIN=https://ulo.ad
PUBLIC_POCKETBASE_URL=https://ulo.ad/api
POCKETBASE_ADMIN_EMAIL=admin@example.com
POCKETBASE_ADMIN_PASSWORD=secure_password
See .env.example for all configuration options.
📂 Project Structure
uload/
├── src/ # SvelteKit application
│ ├── routes/ # Pages and API routes
│ ├── lib/ # Components and utilities
│ └── app.html # HTML template
├── backend/ # PocketBase configuration
│ ├── pb_schema.json # Database schema
│ └── init-pocketbase.sh # Setup script
├── build/ # Production build output
├── static/ # Static assets
├── Dockerfile # Multi-stage Docker build
├── docker-compose.yml # Local development
├── supervisord.conf # Process management
└── CLAUDE.md # AI assistant context
🚢 Deployment
The application is deployed on Hetzner VPS using Coolify with automatic deployments on push to main branch.
# Commit and push to deploy
git add .
git commit -m "Update"
git push origin main
# Coolify automatically deploys
Manual Deployment Steps:
- Set DNS A record to
91.99.221.179 - Add domain in Coolify
- Update environment variables
- Enable SSL certificate
- Deploy application
📊 Monitoring
- Health Check: https://ulo.ad/health
- Admin Panel: https://ulo.ad/_/
- Server: Hetzner CX21 (2 vCPU, 4GB RAM)
- Uptime: 99.9% SLA
🔐 Security
- HTTPS enforced
- Environment-based configuration
- Secure admin authentication
- Rate limiting on API endpoints
- Regular security updates
🤝 Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
🐛 Troubleshooting
Common issues and solutions are documented in DEPLOYMENT_LESSONS_LEARNED.md
For support, check:
- Application logs in Coolify
- Health endpoint status
- PocketBase admin panel
📄 License
Private - Memoro AI © 2024