How emzcodez/online-hangout-space works
Online Hangout Space is a web application for accounts, rooms, social connections, chat, and room customization. The principal workflow is: a user registers or logs in, discovers or creates a room, joins it, then chats or customizes it; room favorites, friend requests, notifications, and activity provide supporting social features. The sampled routes show Prisma-backed MySQL operations and MongoDB-backed notifications/activity. Watch sessions are a documented database capability, but no corresponding application route was shown, so that branch is represented only by the schema. UI-to-route wiring is not established by the excerpts.
Main entry points: prisma.ts Prisma client · auth Authentication routes · route.ts Room messages · rooms Room routes
Components 22
Web experience
- Hangout dashboard
web/src/app/dashboard/page.tsx - Room editor
web/src/app/dashboard/rooms/[roomId]/customize/page.tsx - Registration page
web/src/app/register/page.tsx
Identity
- Authentication routes
web/src/app/api/auth - Session and auth
web/src/lib/auth.ts - Login rate limit
web/src/lib/login-rate-limit.ts
Rooms and chat
- Room routes
web/src/app/api/rooms - Room messages
web/src/app/api/rooms/[roomId]/messages/route.ts - Customization route
web/src/app/api/rooms/[roomId]/customization/route.ts - Room access checks
web/src/lib/rooms.ts
Social features
- Friend routes
web/src/app/api/friends - Room favorites
web/src/app/api/favorites/route.ts - Notifications route
web/src/app/api/notifications/route.ts - Room activity route
web/src/app/api/rooms/activity/route.ts - Event writers
web/src/lib/mongo-events.ts
Persistence
- MySQL data
web/prisma/schema.prisma - Prisma client
web/src/lib/prisma.ts - MongoDB connection
web/src/lib/mongodb.ts - Notification model
web/src/models/notification.ts - Activity model
web/src/models/roomActivity.ts - SQL demo schema
online_hangout_space.sql
Other components
- Visitor
Connections 32
- Visitor → Registration page: opens registration
- Visitor → Hangout dashboard: uses hangout
- Visitor → Authentication routes: authenticates
- Visitor → Room routes: manages rooms
- Visitor → Friend routes: manages friends
- Visitor → Room favorites: saves rooms
- Registration page → Authentication routes: submits account
- Hangout dashboard → Room routes: requests rooms
- Hangout dashboard → Room messages: requests chat
- Room editor → Customization route: saves design
- Authentication routes → Session and auth: creates sessions
web/src/app/api/auth/login/route.ts - Authentication routes → Login rate limit: limits attempts
web/src/app/api/auth/login/route.ts - Authentication routes → Prisma client: reads and writes users
web/src/app/api/auth/register/route.ts - Room routes → Prisma client: queries rooms
web/src/app/api/rooms/route.ts - Room routes → Event writers: records creation
web/src/app/api/rooms/route.ts - Room messages → Room access checks: checks membership
web/src/app/api/rooms/[roomId]/messages/route.ts - Room messages → Prisma client: reads and writes chat
web/src/app/api/rooms/[roomId]/messages/route.ts - Room messages → Event writers: records messages
web/src/app/api/rooms/[roomId]/messages/route.ts - Customization route → Room access checks: checks membership
web/src/app/api/rooms/[roomId]/customization/route.ts - Customization route → Prisma client: stores room design
web/src/app/api/rooms/[roomId]/customization/route.ts - Friend routes → Prisma client: manages relationships
web/src/app/api/friends/requests/route.ts - Friend routes → Event writers: notifies recipients
web/src/app/api/friends/requests/route.ts - Room favorites → Room access checks: checks room access
web/src/app/api/favorites/route.ts - Room favorites → Prisma client: stores favorites
web/src/app/api/favorites/route.ts - Notifications route → MongoDB connection: connects database
web/src/app/api/notifications/route.ts - Notifications route → Notification model: reads and updates
web/src/app/api/notifications/route.ts - Room activity route → Prisma client: checks memberships
web/src/app/api/rooms/activity/route.ts - Room activity route → MongoDB connection: connects database
web/src/app/api/rooms/activity/route.ts - Room activity route → Activity model: queries activity
web/src/app/api/rooms/activity/route.ts - Event writers → MongoDB connection: writes events
- MySQL data → Prisma client: defines data model
- SQL demo schema → Visitor: documents data capabilities
README.md