Scent2Me Perfume Recommendation Platform

Built the FastAPI recommendation service, auth and wishlist persistence, CORS configuration, and Railway backend deployment for a Vercel frontend.

  • TF-IDF
  • Cosine Similarity
  • SQLAlchemy
  • +5 more

Read the case by outcome, role, and proof first.

Outcome

Built the FastAPI recommendation service, auth and wishlist persistence, CORS configuration, and Railway backend deployment for a Vercel frontend.

Role

Backend developer and deployment engineer

Proof signal

Content-based perfume recommendation engine

Context

Scent2Me is a group web application that helps users discover perfumes based on scent preferences, gender, time of use, occasion, longevity, favorite notes, and budget. The system combines an interactive Next.js frontend with a FastAPI recommendation backend.

Problem

Perfume discovery is preference-heavy: users often know what kind of scent experience they want, but not the exact product name or brand. The application needed a recommendation flow that could translate structured preferences into relevant perfume options while also supporting search, trending products, authentication, and wishlist persistence.

My Role

I worked as the backend developer and deployment engineer. My main contribution was building the REST API, recommendation logic, authentication and wishlist behavior, backend environment configuration, CORS setup, and Railway deployment.

Evidence

Scent2Me homepage showing the perfume recommendation platform hero and navigation
Frontend evidence: Scent2Me homepage deployed on Vercel with recommendation, explore, wishlist, and login navigation.

Approach

  • Built a FastAPI service for search, trending products, random products, reference-based recommendations, and preference-based recommendations.
  • Implemented content-based recommendation scoring using TF-IDF vectorization and cosine similarity.
  • Loaded recommendation artifacts such as meta.csv, tfidf.pkl, and X_tfidf.npz.
  • Added filtering based on gender, fragrance family, time of use, occasion, longevity, notes, and price range.
  • Implemented simple authentication, password hashing, user storage, and wishlist persistence with SQLAlchemy and PostgreSQL.
  • Configured CORS through ALLOW_ORIGINS so the Vercel frontend could communicate with the Railway backend.
  • Prepared deployment configuration through environment variables such as DATABASE_URL, ALLOW_ORIGINS, and ART_DIR.

Key Decisions

The application uses split deployment: the frontend runs on Vercel and the backend runs on Railway. This made the UI and recommendation service easier to maintain independently, but required careful CORS and environment-variable configuration.

For recommendations, the backend combines filtering and similarity scoring. Preference filters narrow the candidate set first, then TF-IDF and cosine similarity rank products by relevance to the user’s scent profile.

Scent2Me recommendation form with gender, fragrance family, time of day, occasion, favorite notes, and budget fields
Preference flow: users describe scent family, usage context, performance, notes, and budget before requesting recommendations.
Scent2Me recommendation results page showing perfume cards with ratings, notes, price, and save recommendation action
Recommendation output: ranked perfume cards with notes, rating, price, product links, and wishlist-saving behavior.

API Surface

Key backend endpoints included /health, /search, /trending, /random, /brands, /recommend, /recommend/preference, /auth/register, /auth/login, /auth/wishlist/add, /auth/wishlist, and /auth/wishlist/clear.

Result

The project delivered a deployed recommendation platform with a frontend/backend split, a content-based recommendation service, persistent user and wishlist data, and production-oriented backend configuration. My contribution focused on making the recommendation engine usable as an API and deployable as a separate service.

What I’d Improve

I would add automated API tests, monitor recommendation latency after deployment, add structured logging for recommendation requests, improve fallback behavior when filters are too restrictive, and document model artifact regeneration.

Back to the full project index.

Return to all case studies and filter by modeling, automation, decision support, or analytics.

View all projects