A full-stack anonymous message wall application where users can share their thoughts, questions, rants, or anything on their mind without registration or personal information.
- Landing Page: Welcoming interface with clear CTAs
- Post Submission: Anonymous post creation with optional tags
- Wall/Feed: Display all posts in reverse chronological order
- Search & Filter: Search posts by keywords and filter by tags
- Reactions: Anonymous reactions (like, love, laugh, wow, sad, angry)
- Admin Panel: Login-protected moderation interface
- Dark/Light Mode: Theme toggle for better UX
- Responsive Design: Works on all devices
- RESTful API: Express.js backend with MongoDB
- Security: Rate limiting, input sanitization, XSS protection
- Authentication: JWT-based admin authentication
- Analytics: Post statistics and tag popularity
- Moderation: Admin can delete inappropriate posts
- Frontend: React, React Router, Vite, Axios
- Backend: Node.js, Express.js, MongoDB, Mongoose
- Security: Helmet, express-rate-limit, express-validator, express-mongo-sanitize
- Authentication: JWT (jsonwebtoken), bcryptjs
- Node.js (v16 or higher)
- MongoDB (local installation or MongoDB Atlas)
- npm or yarn
cd "lol for now"cd backend
npm installCreate a .env file in the backend directory:
PORT=5000
MONGODB_URI=mongodb://localhost:27017/anonymous-wall
JWT_SECRET=your-secret-key-change-this-in-production
NODE_ENV=developmentcd ../frontend
npm installCreate a .env file in the frontend directory (optional):
VITE_API_URL=http://localhost:5000/apiRun the setup script to create an admin user:
cd ../backend
node scripts/createAdmin.jsOr manually create an admin using MongoDB:
// In MongoDB shell or Compass
use anonymous-wall
db.admins.insertOne({
username: "admin",
password: "$2a$10$..." // hashed password
})To hash a password, you can use the script in backend/scripts/createAdmin.js.
Make sure MongoDB is running on your system:
# On Linux/Mac
sudo systemctl start mongod
# or
mongod
# On Windows
net start MongoDBcd backend
npm start
# or for development with auto-reload
npm run devThe backend will run on http://localhost:5000
cd frontend
npm run devThe frontend will run on http://localhost:3000
POST /api/posts- Create a new postGET /api/posts- Get all posts (with pagination, filtering, search)GET /api/posts/:id- Get a single postDELETE /api/posts/:id- Delete a post (admin only)
GET /api/tags- Get all tags with counts
POST /api/react- Add a reaction to a post
POST /api/admin/login- Admin loginGET /api/admin/verify- Verify admin tokenGET /api/admin/analytics- Get analytics (admin only)
.
├── backend/
│ ├── models/ # Mongoose models
│ ├── routes/ # API routes
│ ├── middleware/ # Auth, rate limiting
│ ├── scripts/ # Utility scripts
│ └── server.js # Entry point
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ ├── context/ # React context
│ │ ├── services/ # API services
│ │ └── App.jsx # Main app component
│ └── vite.config.js # Vite configuration
└── README.md
- Rate Limiting: Prevents spam and abuse
- Input Sanitization: XSS protection via HTML escaping
- MongoDB Injection Protection: express-mongo-sanitize
- Helmet: Security headers
- JWT Authentication: Secure admin access
- Password Hashing: bcrypt for admin passwords
PORT: Server port (default: 5000)MONGODB_URI: MongoDB connection stringJWT_SECRET: Secret key for JWT tokensNODE_ENV: Environment (development/production)
VITE_API_URL: Backend API URL (default: http://localhost:5000/api)
- Set
NODE_ENV=productionin backend.env - Use a strong
JWT_SECRET - Update
MONGODB_URIto production database - Build frontend:
cd frontend && npm run build - Serve frontend build with a web server (nginx, Apache, etc.)
- Use PM2 or similar for backend process management
ISC
Feel free to submit issues and enhancement requests!