Engineering behind FeedForward

How I built an anonymous feedback platform that people can use to get honest feedbacks and grow.

Why “FeedForward”?

The name isn't just wordplay—it's the philosophy. FeedForward is feedback that pushes you forward, not criticism that dwells on mistakes.
Here's how I built it: the problem, the architecture, database design, and technical challenges that made this both frustrating and rewarding.
Let's dive in.

The “aha” moment

The best feedback comes from anonymous sources—course reviews, workplace surveys. People are honest when there's no consequences.
Problem: Most “anonymous” systems aren't truly anonymous. They're tied to accounts or people don't trust them.
I built a platform where anonymity is the foundation, and feedback helps people move forward.

System architecture

FeedForward System Architecture
Next.js • MongoDB • Anonymous Messaging
CLIENT LAYER
Next.js 14
App Router + TypeScript
UI Components
shadcn/ui + Tailwind
Authentication
NextAuth.js + JWT
⬇ HTTPS/API Routes ⬇
Next.js API Routes
Server-side Logic • Rate Limiting • Validation • Email Services
SERVICE LAYER
Auth Service
User Management
Message Service
Anonymous Messaging
Email Service
Verification & Notifications
AI Service
Message Suggestions
EXTERNAL INTEGRATIONS
Email Services
Nodemailer
Email Delivery
AI Services
OpenAI API
Message Suggestions
Infrastructure
AWS Amplify
Deployment & Hosting
DATA LAYER
MongoDB
Primary Database
Document Storage
Mongoose ODM
File System
Static Assets
User Uploads
Temporary Storage
Response Time
< 100ms average
Security
End-to-end encrypted
Architecture
Server-side rendering
Uptime
99.9% availability

Database design

FeedForward Database Schema
MongoDB Collections • User-Centric Design
users
_id, username, email
password (hashed)
isVerified, verifyCode
isAcceptingMessages
↓ 1:M
messages
_id, content
createdAt
userId (reference)
sessions
_id, userId
sessionToken
expires
verification_codes
userId, code
expiresAt
attempts
User Management
Message System
Authentication
Verification
Document References • Anonymous message handling with user privacy

Features

Technical challenges that made this project worth the sleepless nights:

01Anonymous Messaging

Challenge: Complete anonymity without spam. Messages must be untraceable but the platform stays secure.
Solution: MongoDB stores messages without sender links. NextAuth.js handles sessions without breaking anonymity.

02AI Message Suggestions

Ever stared at a blank message box? AI helps transform thoughts into constructive feedback.
OpenAI API generates suggestions that encourage growth-oriented feedback, not just criticism.

03Email Verification System

How do you verify users without compromising future anonymity? Tricky balance.
Nodemailer sends time-limited codes. Real users verified, anonymity preserved.

04Privacy Controls

Privacy is personal. Some want feedback from anyone, others from close circles. Flexible controls without complexity.
User-centric design: intuitive settings, transparent practices, complete control.

Beyond the basics

The features that turned a simple messaging app into something special:

01MongoDB Aggregation Pipelines

Picture this: A user wants to see their feedback patterns—how many appreciations vs. suggestions they receive. Simple query? Not quite. Enter MongoDB's aggregation pipelines—the Swiss Army knife of data processing.

// Real aggregation pipeline from the codebase
db.users.aggregate([
{ $match: { isAcceptingMessages: true } },
{ $lookup: {
from: "messages",
localField: "_id",
foreignField: "userId",
as: "userMessages"
}},
{ $addFields: { messageCount: { $size: "$userMessages" } } },
{ $group: {
_id: null,
totalUsers: { $sum: 1 },
usersWithMessages: { $sum: { $cond: [{ $gt: ["$messageCount", 0] }, 1, 0] } }
} }
])

The magic? One query processes thousands of documents, joins collections, calculates statistics, and returns insights in milliseconds. No multiple database hits, no complex application logic—just pure MongoDB wizardry.

02Intelligent Theme System

Ever notice how the theme toggle just works? That's 3 AM debugging paying off. Light mode, dark mode, system preference—it remembers your choice across sessions and never flickers.

☀️
Light Mode
Clean, professional vibes
🌙
Dark Mode
Easy on the eyes
🖥️
System
Follows your OS preference

The secret sauce? CSS custom properties, React Context, and localStorage working in harmony. One toggle, infinite possibilities.

03Smart Message Categorization

Not all feedback is created equal. Some messages spark growth, others show appreciation, and some ask genuine questions. The AI doesn't just suggest messages—it understands intent.

Questions
"How did you...?"
💬
General
"Just wanted to say..."
💡
Suggestions
"You could try..."
❤️
Appreciation
"Thank you for..."
🛠️
Constructive
"Consider improving..."
🎯
Growth
"Your next step..."

The innovation? OpenAI APIs analyze message content and intent patterns, automatically categorize messages, helping users understand the type of input they're receiving. No manual tagging required—the AI reads between the lines.

04API Rate Limiting & Spam Protection

With anonymous messaging comes the challenge of preventing abuse. How do you stop spam without compromising anonymity?Smart rate limiting is the answer.

⏱️
Time-based Limits
Max messages per IP per hour

The balance? Legitimate users send thoughtful messages at reasonable intervals, while spammers hit limits quickly. Anonymous stays anonymous, but spam gets blocked.

Tech choices

The stack that makes FeedForward tick. Each choice driven by purpose, not hype:

Next.js 14

Why? Full-stack in one package. Server-side rendering for speed, API routes for logic, App Router for clean file structure. Plus, React Server Components mean smaller bundles and faster loads.

MongoDB + Mongoose

Why? Anonymous messaging needs flexible document storage. No rigid schemas when user patterns evolve. Mongoose keeps data consistent while MongoDB's aggregation pipelines crunch analytics like a boss.

NextAuth.js

Why? Auth is hard. Privacy-focused sessions, JWT tokens, secure flows—all handled. Lets me focus on anonymity features instead of wrestling with authentication edge cases.

Nodemailer

Why? Email that actually delivers. SMTP reliability with custom templates. Time-limited verification codes work seamlessly—no third-party email service dependencies.

OpenAI API

Why? Because blank message boxes kill conversations. AI suggestions that actually make sense, encouraging growth-focused feedback instead of generic "good job" comments.

Tailwind CSS + shadcn/ui

Why? Utility-first CSS that doesn't fight you. shadcn/ui components for consistency. Fast prototypes, professional results, zero CSS headaches.

TypeScript

Why? Life's too short for runtime errors. Type safety catches bugs before users do. Better IDE support, cleaner refactoring, more confident deployments.

AWS Amplify

Why? Deploy and forget. CI/CD that works, AWS infrastructure that scales, zero deployment drama. Push to main, watch it go live.

Built with passion for honest communication by Tejaswa