FeedMessage is an anonymous social messaging platform that allows users to send and receive messages while keeping their identity private. Built with modern web technologies like Next.js, Tailwind CSS, and MongoDB, it offers a secure and user-friendly experience. Key features include anonymous messaging, user authentication with NextAuth.js, customizable settings, and responsive design. The platform also integrates with services like Resend API for email notifications and Google GenAI for AI-powered message suggestions. This project is built using modern web technologies and provides a seamless user experience.
feedmessage/
├── src/
│ ├── app/ # Next.js app directory
│ │ ├── (auth)/ # Authentication-related pages
│ │ │ ├── sign-in/ # Sign-in page
│ │ │ ├── sign-up/ # Sign-up page
│ │ │ └── verify/ # Verification pages
│ │ │ └── [username]/ # Dynamic username verification page
│ │ ├── (app)/ # Main application pages
│ │ │ ├── page.tsx # Main page
│ │ │ └── dashboard/ # Dashboard pages
│ │ │ └── page.tsx # Dashboard main page
│ │ ├── api/ # API routes
│ │ │ ├── accept-messages/ # Accept messages API
│ │ │ ├── auth/ # Authentication API
│ │ │ │ └── [...nextauth]/ # NextAuth.js dynamic route
│ │ │ ├── check-username-unique/ # Check username uniqueness API
│ │ │ ├── delete-message/ # Delete message API
│ │ │ │ └── [messageId]/ # Dynamic message ID route
│ │ │ ├── get-messages/ # Get messages API
│ │ │ ├── getUserByEmail/ # Get user by email API
│ │ │ ├── resend-otp/ # Resend OTP API
│ │ │ │ └── [username]/ # Dynamic username route
│ │ │ ├── send-message/ # Send message API
│ │ │ ├── sign-up/ # Sign-up API
│ │ │ ├── suggest-messages/ # Suggest messages API
│ │ │ └── verify-code/ # Verify code API
│ ├── components/ # Reusable UI components
│ ├── context/ # Context providers
│ ├── data/ # Static data files
│ ├── helpers/ # Helper functions
│ ├── lib/ # Library utilities
│ ├── models/ # Mongoose models
│ ├── schemas/ # Zod validation schemas
│ ├── types/ # TypeScript types
│ └── emails/ # Email templates
├── public/ # Public assets
├── package.json # Project dependencies
├── tsconfig.json # TypeScript configuration
├── next.config.js # Next.js configuration
└── README.md # Project documentation
Clone the repository:
git clone https://github.com/your-username/feedmessage.git
cd feedmessage
Install dependencies:
npm install
Set up environment variables:
Create a .env
file in the root directory and add the following:
MONGODB_URI=your_mongodb_connection_string
NEXTAUTH_SECRET=your_nextauth_secret
RESEND_API_KEY=your_resend_api_key
GEMINI_API_KEY=your_google_genai_api_key
BASE_URL=http://localhost:3000
Run the development server:
npm run dev
Open your browser and navigate to:
http://localhost:3000
npm run dev
: Start the development server.npm run build
: Build the application for production.npm start
: Start the production server.npm run lint
: Run ESLint to check for code quality issues.POST /api/sign-up
: Sign up a new user.POST /api/auth/signin
: Sign in an existing user.POST /api/verify-code
: Verify user account.GET /api/get-messages
: Fetch user messages.POST /api/send-message
: Send a new message.DELETE /api/delete-message/:id
: Delete a message.GET /api/accept-messages
: Get message acceptance status.POST /api/accept-messages
: Update message acceptance status.Contributions are welcome! Please follow these steps:
git checkout -b feature-name
git commit -m "Add new feature"
git push origin feature-name
Ensure user confirms email explicitly when trying to resend OTP. Update the backend to handle this scenario.
Improve the signup process by suggesting unique names and usernames for users.
Add more required fields to the signup form, such as phone number, date of birth, and profile picture upload.
Implement rate limiting for OTP resend requests to prevent abuse.
Enhance the dashboard to display user statistics, such as the number of messages sent and received.
Add a feature to allow users to block or report abusive messages.
Improve the email templates for better branding and user engagement.
Feel free to reach out if you have any questions or suggestions!