Recosa

ReCoSa is a scalable SaaS platform built to provide intelligent, content-based item recommendations via API
Web App
On-going project
Started on Wed Feb 05 2025
project_img

📖 Overview

ReCoSa is a scalable SaaS platform built to provide intelligent, content-based item recommendations via API. It enables businesses such as e-commerce platforms, food delivery apps, and online marketplaces to integrate AI-powered recommendations into their platforms effortlessly — without building ML infrastructure from scratch.

This system allows users to upload item data (with features like tags, categories, etc.), and in return, they get an API that returns smart recommendations for similar items — improving engagement, conversions, and user retention.


🧠 Why I Built It

Recommendation systems drive modern digital experiences — whether it's Netflix, Amazon, or Zomato. I wanted to build a system where businesses can plug into personalized intelligence using a single API.

This project challenged me to combine Machine Learning, API security, usage tracking, and SaaS pricing — wrapped in a developer-friendly interface.


🧩 Key Features

🧬 AI-Powered Content-Based Recommendations

  • Accepts user-uploaded item data with rich metadata (name, tags, category, etc.)

  • Automatically vectorizes and indexes content using cosine similarity

  • Exposes REST API to retrieve N most similar items based on a given item

🔐 Secure API Access

  • Each user gets a unique API key upon signup

  • JWT-based authentication and protected endpoints

  • API key usage tracking with limits (based on pricing tier)

📊 Usage Analytics & Pricing

  • Tracks number of API calls and data uploaded

  • Users can view current usage and plan limits

  • Pricing tiers define data caps and usage volume

📁 File Upload and Data Parsing

  • Users can upload a CSV or JSON of their items

  • Server parses, validates, and stores it securely

  • Items can be updated/replaced anytime

🌐 Ready-to-Use API

  • Simple REST API for:

    • Uploading item data

    • Getting recommended items by ID

    • Monitoring API usage


💻 Frontend Highlights

  • Built with React + Tailwind + ShadCN UI

  • Dashboard shows:

    • Uploaded items

    • API usage stats

    • Sample API code to integrate recommendations

  • Clean, mobile-first interface

  • Theme switcher (light/dark)

  • Auth flow with Sign Up, Login, and API key management


🛠 Tech Stack

Layer
Tech Used
Frontend
React, Vite, TypeScript, Tailwind, ShadCN UI
Backend
FastAPI (Python), Pydantic
Database
MongoDB Atlas + Motor (Async ODM)
ML Engine
Scikit-learn, Cosine Similarity, TF-IDF
Auth & API
JWT, API Key Verification
Hosting
Vercel (Frontend), Render/EC2 (Backend)

🧠 How It Works (Architecture)


  1. User uploads product data with tags, categories, or descriptions.
  2. System processes and stores feature vectors.
  3. API endpoints allow:
    • Similar item retrieval

    • Data upload/update

    • Usage tracking

  4. All APIs are secured by API key and JWT auth.


💼 Real-World Use Cases

  • 🛍️ E-commerce: Show "You may also like" or "Similar products"
  • 🍱 Food apps: Recommend meals or items based on ingredients
  • 📚 EdTech: Suggest similar courses or learning material
  • 🎮 Gaming: Recommend similar in-game items or characters

🧠 What I Learned

  • Turning an ML model into a real-world SaaS product

  • Designing secure, scalable APIs for external usage

  • Asynchronous operations with FastAPI + Motor

  • SaaS architecture: pricing logic, usage caps, multi-tenant API keys

  • Clean dashboard UI/UX with modern component libraries

🚀 Future Roadmap

  • Add User-Based Collaborative Filtering

  • Real-time recommendation updates (with WebSocket support)

  • Stripe integration for paid plans

  • SDKs in JavaScript and Python for easy integration

  • Admin dashboard to monitor all users, plans, and performance

Visit Project
Contributed By

Akash Srivastava
Software Engineer @ Seawoods Ventures Inc.