@@ -358,3 +358,56 @@ Result 3: Pioneer Anomaly Data (Ω-dist: 0.0000, scale match: ✅)
3583588 . ✅ OmegaSearch verified working
3593599 . ✅ 4 Rust modules added to workspace and compiling
36036010 . ✅ Dependency paths fixed for all modules
361+
362+ ---
363+
364+ ## Session 6: Platform Specs + Phase 0+1 Implementation (same day)
365+
366+ ### Platform Specification Documents (7 new specs)
367+
368+ Researched open-source projects and wrote 7 comprehensive spec documents into ` platform_specs/ ` :
369+
370+ | # | Document | Content |
371+ | ---| ----------| ---------|
372+ | 28 | OPEN_SOURCE_STACK_SELECTION | Evaluation matrix: Rocket.Chat, LiveKit, Tiptap+Yjs, LibreChat, Stripe |
373+ | 29 | SOCIAL_FEED_AND_PROFILES | Feed, posts, follows, media upload, Prisma models, API routes |
374+ | 30 | REALTIME_CHAT_AND_MESSAGING | Rocket.Chat deploy, OAuth SSO, AI bot, embedded chat |
375+ | 31 | WORKSPACE_AND_COLLABORATION | Discord-like workspaces, channels, roles, Tiptap collab docs |
376+ | 32 | VIDEO_AND_VOICE | LiveKit WebRTC SFU, voice channels, screen share |
377+ | 33 | CREDIT_AND_SUBSCRIPTION | Credit model, Stripe billing, AI usage metering, UET→Credit exchange |
378+ | 34 | INTEGRATION_ARCHITECTURE | Full system diagram, Docker Compose, SSO, data ownership |
379+
380+ ### Phase 0: Foundation Fixes (Implemented)
381+
382+ 1 . ** Auth env vars** — Replaced all 8 hardcoded ` localhost:3001 ` in auth pages with ` NEXT_PUBLIC_API_URL ` env var
383+ 2 . ** Prisma schema extended** — 180 → 368 lines, added 10 new models:
384+ - ` Follow ` (social graph), ` Vote ` (upvote/downvote), ` Media ` (file uploads)
385+ - ` Workspace ` , ` WorkspaceMember ` , ` Document ` (collaboration)
386+ - ` CreditBalance ` , ` CreditTransaction ` , ` Subscription ` (billing)
387+ - User profile fields: ` displayName ` , ` bio ` , ` avatarUrl ` , ` institution ` , ` website `
388+ - Post: added ` isVerified ` , ` votes ` , ` media ` relations
389+ - Project: added ` workspaceId ` for workspace linkage
390+ 3 . ** Workchat redirect** — ` /workchat ` now redirects to ` /chat `
391+ 4 . ** Docker env** — Added ` NEXT_PUBLIC_API_URL ` to docker-compose.yml
392+ 5 . ** Prisma 7.x fix** — Removed ` url ` from datasource block (moved to prisma.config.ts)
393+
394+ ### Phase 1: Academic Social Feed (Implemented)
395+
396+ ** New Pages:**
397+ - ` /feed ` — Infinite scroll feed with Latest/Trending/Following modes, tag filtering
398+ - ` /feed/new ` — Post composer with title, Markdown content, tag system
399+ - ` /profile/[userId] ` — User profile with bio, stats, recent posts, follow button
400+
401+ ** New API Routes:**
402+ - ` GET /api/feed ` — Paginated feed with cursor, mode, tag filters
403+ - ` POST /api/posts/[id]/upvote ` — Toggle upvote/downvote with atomic counter
404+ - ` POST /api/follow/[userId] ` — Follow user
405+ - ` DELETE /api/follow/[userId] ` — Unfollow user
406+ - ` GET /api/profile/[userId] ` — Profile data with follower counts + recent posts
407+
408+ ** New Components:**
409+ - ` FeedCard ` — Post card with author info, content preview, tags, vote buttons, comment count
410+
411+ ** Navigation:**
412+ - Added Feed link to landing page navbar
413+ - Fixed Topics link to use locale prefix
0 commit comments