Skip to content

GitNinja36/Zoro

Repository files navigation

🧠 Manga-BE — AI-Powered Manga Marketplace (Backend)

GitHub Tech License

🔗 GitHub Repo: Manga-BE


🚀 Project Overview

Manga-BE is the backend API for a full-stack AI-powered e-commerce platform where users can buy and sell manga books. It supports powerful, real-world features such as:

  • 🧠 AI-generated manga summaries (via HuggingFace Inference API)
  • 💳 Stripe-powered secure payments
  • 🔐 JWT Authentication with role-based access
  • 🖼️ Cloudinary for image & file uploads
  • RESTful APIs for books, users, orders, reviews, and authentication

🔑 Key Features

✅ AI Summary Generation

  • Powered by HuggingFace's facebook/bart-large-cnn model
  • Dynamically summarizes manga using title, genre, and description
  • Smart prompt: simulates a top bookseller crafting a sales-focused pitch

📚 Book Management API

  • Full CRUD operations for books
  • Accepts cover + additional images, and PDF manga files
  • Summary auto-generated by AI for sellers

🔐 User Authentication

  • JWT-based auth flow
  • Login & Signup APIs
  • Role-based access (admin, seller, buyer)
  • Auth middleware to protect sensitive routes

💬 Reviews & Ratings

  • Add ratings/comments to any manga book
  • Fetch aggregated review data
  • Structured schema for scalability

💳 Stripe Checkout Integration

  • Dynamically create checkout sessions for each book
  • Handles webhook/payment flow (extendable)
  • Secure key management with .env

☁️ Cloudinary Upload System

  • Upload and manage book cover images and PDFs
  • Modular upload utility (cloudinary.js)

🧠 Folder Structure

Manga-BE/
├── controllers/
│   ├── authController.js
│   ├── bookController.js
│   ├── paymentController.js
│   └── reviewController.js
├── middleware/
│   └── authMiddleware.js
├── routers/
│   ├── auth.js
│   ├── books.js
│   ├── payments.js
│   └── ai.js
├── utils/
│   ├── cloudinary.js
│   └── ai.js
├── config/
│   └── db.js
├── models/
│   ├── User.js
│   └── Book.js
├── server.js
└── .env

⚙️ Tech Stack

Technology Role
Node.js Backend Runtime
Express.js API Framework
MongoDB Database
Cloudinary File/Image Uploads
HuggingFace AI-Powered Summarization
Stripe Payment Integration
JWT Auth & Authorization
Axios API Requests
dotenv Secure Config

🔐 Environment Variables

Create a .env file in the project root:

PORT=8080
MONGO_URI=your_mongo_connection_string
JWT_SECRET=your_jwt_secret
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
STRIPE_SECRET_KEY=your_stripe_secret_key
HF_API_TOKEN=your_huggingface_token

🔍 API Endpoints

Method Endpoint Description
POST /auth/signup Register a new user
POST /auth/login Login and get JWT token
POST /book/add Add a new book with AI summary
GET /book/all Get all available manga books
POST /payment/checkout-session Start Stripe checkout session
POST /generate-summary Generate manga summary using AI
POST /review/:bookId Submit review for a manga

🧠 AI Summary Prompt Strategy

Consider yourself the best bookseller in the world. You MUST write a compelling manga description in 2–3 lines that will make people want to read it instantly — or risk losing your business.
  • Model used: facebook/bart-large-cnn
  • Result: crisp, human-like summaries focused on marketing impact

🧪 Testing the API

Start the server:

npm install
npm run dev

Then use Postman or the frontend repo Manga-FE to test.


📦 Related Repositories

Project Repository
💻 Frontend (React) Manga-FE

💼 Recruiter’s Note

This project showcases real-world backend engineering skills:

  • ✅ Modular REST API design using Express
  • ✅ HuggingFace integration (AI prompt + secure token headers)
  • ✅ End-to-end Stripe payment implementation
  • ✅ JWT authentication with RBAC structure
  • ✅ Cloud file/image upload system using Cloudinary

If you're looking for a developer who can build production-ready, intelligent, and scalable backend systems — this is hands-on proof of that.


📜 License

Licensed under the MIT License.


Made with ❤️ by Rohit Kumar

About

Zoro is the frontend of a modern, AI-powered manga platform for buying and selling manga books. integrate real-world AI systems, and handle secure online payments.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages