The Talkora Server is a secure and scalable backend API for the Talkora Forum Platform. Built with Node.js, Express.js, MongoDB, and JWT Authentication, it supports user management, post creation, comments, announcements, Stripe payment, role-based access, and more.
🌐 https://b11a12-talkora.web.app
- 🗂️ Client GitHub: https://github.com/arifuddincoder/talkora-forum-client
- ⚙️ Server GitHub: https://github.com/arifuddincoder/talkora-forum-server
- 🌐 Main API: https://b11a12-talkora-server.vercel.app/
- ✅ JWT-based Authentication & Cookie Token Storage
- ✅ Role-based Authorization (User / Admin)
- ✅ RESTful API for Posts, Comments, Tags, Reports, Announcements
- ✅ Stripe Payment Integration for Membership
- ✅ Post Visibility & Voting (Upvote/Downvote)
- ✅ User Profile & Membership Tracking
- ✅ Aggregation Pipelines for Popularity Sorting & Tag Counts
- ✅ Search Logging & Popular Searches API
- ✅ Reported Comments Moderation with Feedback
/index.js → Main Express App
/vercel.json → Vercel Deployment Config
.env → Environment Variables (not uploaded)
/node_modules → Node Dependencies
Package | Purpose |
---|---|
express | Web server routing |
cors | Cross-Origin Resource Sharing |
dotenv | Environment variable loader |
mongodb | Database driver |
jsonwebtoken | Authentication & Authorization |
cookie-parser | Parse cookies from HTTP requests |
stripe | Stripe payment integration |
PORT=3000
MONGODB_URI=your_mongo_uri
ACCESS_TOKEN_SECRET=your_jwt_secret
STRIPE_SECRET_KEY=your_stripe_key
- JWT token is generated on login and stored in cookies (HttpOnly, SameSite, Secure)
- Middleware
verifyToken
validates user token - Middleware
verifyAdmin
protects admin-only routes - User role managed via
users
collection
/admin/overview
→ Total posts, comments, users/users
→ Paginated + searchable user list/users/role/:id
→ Make Admin/announcements
→ Create, List, Delete/tags
→ Add and fetch tags/reported-comments
→ Fetch, Delete, Ignore reported comments
GET /posts
→ Filter by tags, sort by popularity, paginationGET /posts/:id
→ Post details with comment countPOST /posts
→ Add new post (limit handled by client)PATCH /posts/:id/vote
→ Upvote/Downvote logic with toggleDELETE /posts/:id
→ Delete post (only if owner)GET /comments?postId=...
→ Public comment listPOST /comments
→ Add a commentPATCH /report-comment/:id
→ Report comment with feedbackGET /secure-comments/:postId
→ Protected comment fetch
POST /create-payment-intent
→ Stripe payment intentPOST /payments
→ Save payment recordPATCH /users/membership/:email
→ Grant membership & badge
POST /searches
→ Log user searchGET /popular-searches
→ Top 3 search keywordsGET /tags-with-counts
→ Popular tags with post counts
- ✅ Hosted on Vercel using
vercel.json
- ✅ CORS configured for frontend domain
- ✅ Refresh-safe routing enabled
- ✅ Secure token handling in cookies
- Admin Email:
rafiq.ahmed@mailinator.com
- Admin Password:
Pa$$w0rd!
- 🔗 Live URL: https://b11a12-talkora.web.app
- 🧾 Client GitHub: https://github.com/arifuddincoder/talkora-forum-client
- 🧾 Server GitHub: https://github.com/arifuddincoder/talkora-forum-server
Md Arif Uddin
📧 arifuddincoder@gmail.com
🌐 https://codebyarif.web.app
🔗 GitHub | LinkedIn