A full-stack project for a personalized social media feed, featuring a Node.js/Express backend, a FastAPI-based recommendation engine, a React frontend, and a fine-tuned embedding model.
- Project Overview
- Architecture
- Backend (Node.js/Express)
- Recommendation API (FastAPI)
- Frontend (React/Vite)
- Model & Data
- Setup & Installation
- Environment Variables
- Swagger & API Docs
- License
This project delivers a personalized content recommendation platform, combining:
- Backend: User management, post CRUD, authentication, and API gateway.
- FastAPI Service: Content-based recommendations using embeddings and hybrid ranking.
- Frontend: Modern React SPA for user interaction.
- Model: Sentence-transformer-based embedding model for post similarity.
graph TD
A[User] --> B[Frontend (React)]
B --> C[Backend API (Node.js/Express)]
C --> D[Database (MongoDB)]
C --> E[Recommendation API (FastAPI)]
E --> F[Embedding Model]
E --> D
- Tech Stack: Node.js, Express, TypeScript, MongoDB, Mongoose, JWT, Multer, Swagger.
- Features: User authentication, post CRUD, image uploads, API docs, integration with FastAPI for recommendations.
- Location:
Backend/
cd Backend
npm install
npm run dev- API Docs: http://localhost:5000/api-docs
- Tech Stack: FastAPI, Python, FAISS, Pydantic, CORS.
- Features: Embedding-based similarity search, hybrid ranking, health checks, async endpoints.
- Location:
Fastapi/
cd Fastapi
pip install -r requirements.txt
uvicorn main:app --reload- Ensure
embedding_modeland data files are inFastapi/data/.
- Tech Stack: React, Vite, Zustand, modern CSS.
- Features: User login, feed, post creation/editing, like/dislike, interest selection.
- Location:
Frontend/
cd Frontend
npm install
npm run dev- Embedding Model: Sentence-transformers, fine-tuned for post similarity.
- Data: JSON files for posts and users, plus model weights.
- Location:
Fastapi/data/embedding_model/,Fastapi/data/posts.json,Fastapi/data/users.json,MODEL/
- Clone the repository
- Install dependencies for each component (see above).
- Configure environment variables (see below).
- Download model/data as described in
Fastapi/README.md.
MONGO_URI=your_mongodb_uri
JWT_SECRET=your_jwt_secret
NODE_ENV=development
- Backend API Docs: http://localhost:5000/api-docs
- FastAPI Docs: http://localhost:8000/docs
MIT License