A backend API that powers content engagement, tying interactions (likes, comments, views) to potential rewards and on-chain incentives.
🚧 Status: Actively in Development – New features, improvements, and Web3 reward integration are underway.
- Framework: NestJS (TypeScript)
- Database: MongoDB (with Mongoose ODM)
- Authentication: JWT + Role-based Access Control
- Cloud: Cloudinary for media handling
- Email Service: Nodemailer for email notifications
- Web3-ready: Modular structure to integrate blockchain logic (reward distribution, token verification, etc.)
- ✅ User registration & secure login (JWT)
- ✅ Role-based permissions (Admin, User, Creator, Moderator)
- ✅ Create and manage content (posts, media)
- ✅ Like, comment, and interact with content
- ✅ Cloud media upload support
- ✅ Email notifications
- ✅ Modular folder structure for scaling
- 🔜 Web3 reward triggers and token logic
- 🔜 Rate-limiting and spam detection (planned)
-
Modular Folder Structure
Designed using NestJS modules for separation of concerns and clean scaling. Example modules:auth,users,engagement,media. -
MongoDB with Mongoose
Chosen for its flexibility with unstructured data like posts, comments, media interactions. Indexes and lean queries are used for speed. -
JWT for Auth
JWT tokens support both access and refresh tokens with customizable expiry. Also easy to extend to external token systems like wallet auth. -
Cloudinary for Media
Fast, CDN-powered media upload and optimization. Ensures minimal load on your server. -
Web3-Ready Layer (Planned)
Project is structured to allow future integration of reward mechanisms like smart contract calls or token balances using areward.service.ts.
- User registers and receives a JWT token.
- Token used for authenticated routes like posting content or interacting.
- Admin and Moderator routes gated by roles using custom decorators (
@Roles()). - Refresh token and session management planned for production-level security.
- Add blockchain reward trigger logic
- Introduce rate-limiting and throttling
- Improve tests and documentation
- Add pagination to all lists
- Add user profile image upload and update
This API is designed to serve platforms that want to reward meaningful engagement — ideal for:
- Web3 social apps
- Token-gated forums
- Engagement-for-reward marketplaces
- Future DAOs and creator economies
Open to contributions and suggestions — feel free to fork and make PRs. More endpoints and blockchain support coming soon.
Victory Gray
Backend Developer | Problem Solver | API Architect
GitHub • LinkedIn • Email