How yash762816/secret-box works
Secret Box is an anonymous-messaging app: account holders sign in, share a personal link, receive anonymous messages, and view them in a dashboard. The graph covers the sampled login, signup, response retrieval and persistence paths, plus the documented link-sharing experience. The dynamic message page and some UI/API wiring were not sampled, so their connections are limited to what route names and sampled callers support.
Main entry points: LoginForm.jsx Login and signup form · page.js Message dashboard · userModels.js User and message records · route.js Message listing endpoint
Components 19
User experience
- Landing page
src/app/home/page.jsx - Auth page
src/app/auth/page.jsx - Login and signup form
src/Components/LoginForm.jsx - Message dashboard
src/app/page.js - Recipient message page
src/app/nglresponse/[nglId]/page.jsx
Identity and sessions
- Google auth handler
src/app/api/auth/[...nextauth]/route.js - Signup endpoint
src/app/api/user/signup/route.js - Login endpoint
src/app/api/user/login/route.js - Current-user endpoint
src/app/api/user/me/route.js - Logout endpoint
src/app/api/user/logout/route.jsx - Token user lookup
src/helper/getUserViaToken.js
Anonymous messages
- Message submission endpoint
src/app/api/user/nglresponse/route.js - Message listing endpoint
src/app/api/user/responses/route.js
Persistence
- User and message records
src/models/userModels.js - Database connection
src/dbconfig/dbconnect.js
Other components
- Account holder
- Anonymous sender
- Browser
- Google identity provider
Connections 25
- Browser → Landing page: opens
- Browser → Auth page: opens
- Auth page → Login and signup form: renders
- Account holder → Login and signup form: enters credentials
- Login and signup form → Signup endpoint: submits signup
- Login and signup form → Login endpoint: submits login
- Login and signup form → Google auth handler: starts Google sign-in
- Google auth handler → Google identity provider: authenticates
- Signup endpoint → Database connection: connects
- Login endpoint → Database connection: connects
- Message listing endpoint → Database connection: connects
- Message submission endpoint → Database connection: connects
- Signup endpoint → User and message records: creates user
- Login endpoint → User and message records: finds and saves user
- Message submission endpoint → User and message records: adds message
- Message listing endpoint → Token user lookup: gets user ID
- Token user lookup → User and message records: resolves user
- Message listing endpoint → User and message records: reads messages
- Account holder → Message dashboard: views messages
- Message dashboard → Message listing endpoint: fetches messages
- Message dashboard → Current-user endpoint: fetches account ID
- Message dashboard → Logout endpoint: logs out
- Account holder → Message dashboard: shares message link
- Anonymous sender → Recipient message page: opens shared link
- Anonymous sender → Message submission endpoint: submits anonymous message