Full MVP: workspace layout, visual refresh, PWA, production deploy
Major changes since initial commit: Schema: version branching (parentVersionId, branchLabel), share links, guest comments, track status enum (sketch/in_progress/final/released), track sections, cover art for projects and tracks. API: 29+ endpoints — auth, projects, tracks, versions, comments, share links (public + management), uploads (cover), activity feed, onboarding demo seed. Email templates in German with brand styling. Web: SvelteKit 5 workspace layout with persistent sidebar, breadcrumb top-bar, collapsible right panel. SoundCloud-style waveform player with round play button, avatar comment markers, keyboard shortcuts (Space/JKL/C). Full German UI. Cover art with gradient fallback. Track status pills. Activity feed dashboard. Welcome modal with demo-seed trigger. Landing page with 7-section scroll layout. Login on /login. Public /listen/:token page for guest feedback. Visual: Inter Variable font, Magenta→Orange gradient accent, warm dark neutrals, Lucide-style inline SVG icon set, spring animations on modals, glass-effect toasts, responsive from 360px to 2560px+. PWA: manifest, service worker, icons, iOS/Android installable. Production: adapter-node, server-side API proxy hook, docker-compose with Postgres + MinIO + auto-migration + health checks. Env example included. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
29
apps/api/src/routes/onboarding.ts
Normal file
29
apps/api/src/routes/onboarding.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { Hono } from 'hono';
|
||||
import { eq } from 'drizzle-orm';
|
||||
import { projectMembers } from '@music-hub/db';
|
||||
import { requireAuth } from '../middleware/auth.js';
|
||||
import { createDemoProject } from '../lib/demo-seed.js';
|
||||
import type { AppEnv } from '../types.js';
|
||||
|
||||
export const onboardingRoutes = new Hono<AppEnv>()
|
||||
.use('*', requireAuth)
|
||||
|
||||
.post('/seed-demo', async (c) => {
|
||||
const db = c.get('db');
|
||||
const userId = c.get('userId');
|
||||
|
||||
// Refuse to spam users with multiple demos
|
||||
const existing = await db
|
||||
.select({ id: projectMembers.id })
|
||||
.from(projectMembers)
|
||||
.where(eq(projectMembers.userId, userId))
|
||||
.limit(1);
|
||||
|
||||
if (existing.length > 0) {
|
||||
// User already has projects — they shouldn't see the welcome modal anyway,
|
||||
// but be defensive: still create a fresh demo so the action is meaningful.
|
||||
}
|
||||
|
||||
const projectId = await createDemoProject(db, userId);
|
||||
return c.json({ projectId }, 201);
|
||||
});
|
||||
Reference in New Issue
Block a user