How anshumgupta3001/letterfromhearts works
Letter from Heart is a web app for writing and sharing personal, known-recipient, and “Caring Stranger” letters, then listening to or conversing with others. Users enter through authentication, navigate letter-writing and inbox/feed experiences, and can track opens, manage connections, and report issues; administrators have a separate dashboard. The server exposes these features through Express routes and controllers backed by MongoDB models, with email and notification workers for asynchronous delivery. The README provides no product detail, and unsampled page, route, and worker implementations limit which internal links can be asserted.
Main entry points: App.jsx Page router · app.js HTTP application · letterController.js Letter domain · replyController.js Conversation domain
Components 25
Web client
- Page router
client/src/App.jsx - App state
client/src/context/AppContext.jsx - API client
client/src/utils/api.js - Authentication UI
client/src/pages/AuthPage.jsx
Letter experiences
- Write letters
client/src/pages/WritePage.jsx - Letter views
client/src/pages/MyLettersPage.jsx - Listen and claim
client/src/pages/ListenPage.jsx - Replies
client/src/pages/MyRepliesPage.jsx - Known letters
client/src/pages/SentLettersPage.jsx
API and domain
- HTTP application
server/app.js - Authentication routes
server/routes/authRoutes.js - Letter routes
server/routes/letterRoutes.js - Reply routes
server/routes/replyRoutes.js - Letter domain
server/controllers/letterController.js - Conversation domain
server/controllers/replyController.js - Notifications
server/controllers/notificationController.js - MongoDB models
server/models/Letter.js - Content moderation
server/utils/moderation.js
Delivery and oversight
- Admin dashboard
client/src/pages/AdminDashboardPage.jsx - Report routes
server/routes/reportRoutes.js - Email workers
server/worker/notificationEmailWorker.js - Email event webhook
server/routes/resendWebhookRoutes.js - Report handling
server/controllers/reportController.js
Other components
- Seeker or listener
- Resend email service
Connections 26
- Seeker or listener → Page router: uses
- Page router → App state: provides state
- Page router → Authentication UI: renders
- Page router → Write letters: routes to
- Page router → Letter views: routes to
- Page router → Listen and claim: routes to
- Page router → Replies: routes to
- Page router → Known letters: routes to
- Page router → Admin dashboard: routes to
- HTTP application → Authentication routes: mounts
- HTTP application → Letter routes: mounts
- HTTP application → Reply routes: mounts
- HTTP application → Report routes: mounts
- Letter routes → Letter domain: dispatches
- Reply routes → Conversation domain: dispatches
- Report routes → Report handling: dispatches
- Letter domain → MongoDB models: reads and writes
- Conversation domain → MongoDB models: reads and writes
- Letter domain → Content moderation: checks content
- Conversation domain → Content moderation: checks content
- Letter domain → Notifications: creates alerts
- Conversation domain → Notifications: creates alerts
- Email workers → MongoDB models: reads notifications
- Email workers → Resend email service: sends email
- Resend email service → Email event webhook: posts events
- Email event webhook → MongoDB models: updates delivery