Skip to content

shreyapawar40/SkinSense

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿงด SkinSense โ€“ AI Skincare Analysis System

SkinSense is a full-stack AI-powered skincare analysis platform that captures a userโ€™s face image, analyzes skin condition using an ML model, and returns personalized skincare insights along with product recommendations.

This project demonstrates real-world microservice architecture, API communication, and AI integration.

๐ŸŽฏ Project Objective

This project is designed to help students understand:

  • Full-stack application development
  • Microservices architecture (Frontend + Backend + ML Service)
  • REST API communication between services
  • Image upload handling (multipart/form-data)
  • Integration of AI/ML into real applications
  • External API usage (RapidAPI)
  • Debugging distributed systems

๐Ÿง  System Architecture

๐Ÿ“ธ React Frontend (Camera Capture)
        โ†“
โ˜• Spring Boot Backend (/api/skin/analyze)
        โ†“
๐Ÿค– FastAPI ML Service (/predict)
        โ†“
๐Ÿง  AI Model Output (Skin Type + Concern)
        โ†“
๐ŸŒ RapidAPI (Product Recommendations)
        โ†“
๐Ÿ“ฆ Final Response โ†’ Frontend UI

๐Ÿ“ฆ Prerequisites

Make sure you have installed:

  • Node.js (v16+)
  • Java 17+
  • Maven
  • Python 3.8+

๐Ÿ› ๏ธ Tech Stack

๐ŸŽจ Frontend

  • React (Vite)
  • TypeScript
  • Tailwind CSS
  • Axios

โ˜• Backend

  • Spring Boot (Java 17)
  • REST APIs
  • Multipart file handling
  • HTTP client for ML communication

๐Ÿค– ML Service

  • Python
  • FastAPI
  • Image classification model (CNN / rule-based prototype)

๐ŸŒ External API

  • RapidAPI (Product Recommendation APIs)

๐Ÿ“‚ Project Structure

SkinSense/
โ”œโ”€โ”€ skinsense-frontend/   # React frontend
โ”œโ”€โ”€ skinsense-backend/    # Spring Boot backend
โ”œโ”€โ”€ skinsense-ml/         # FastAPI ML service
โ””โ”€โ”€ README.md

โš™๏ธ Setup Guide

๐Ÿ”น 1. Clone Repository

git clone <your-repo-link>
cd SkinSense

๐Ÿ”น 2. Backend Configuration (Spring Boot)

Create:

skinsense-backend/src/main/resources/application.properties

Add:

server.port=8080

# ML Service URL (IMPORTANT)
ml.service.url=http://localhost:8000/predict

# RapidAPI Key
rapidapi.key=YOUR_RAPIDAPI_KEY

๐Ÿ”น 3. Frontend Configuration (Vite)

Create:

skinsense-frontend/.env

Add:

VITE_BACKEND_URL=http://localhost:8080

๐Ÿ”น 4. Start ML Service FIRST

cd skinsense-ml
pip install -r requirements.txt
uvicorn main:app --reload

Runs at:

http://localhost:8000

๐Ÿ”น 5. Start Backend (Spring Boot)

cd skinsense-backend
mvn spring-boot:run

Runs at:

http://localhost:8080

๐Ÿ”น 6. Start Frontend

cd skinsense-frontend
npm install
npm run dev

Runs at:

http://localhost:5173

๐Ÿ“ก API ENDPOINT

๐Ÿ”ธ POST /api/skin/analyze

Request

  • Type: multipart/form-data
  • Key: file

Response Example

{
  "skinType": "OILY",
  "concern": "ACNE",
  "tips": [
    "Wash face twice daily",
    "Use oil-free moisturizer"
  ],
  "products": [
    {
      "name": "Gentle Face Wash",
      "price": "โ‚น299",
      "rating": "4.3",
      "image": "image_url",
      "url": "product_link"
    }
  ]
}

๐Ÿ”— IMPORTANT ARCHITECTURE NOTE

๐Ÿง  ML Service Communication

  • Spring Boot calls ML service using HTTP
  • It requires the exact URL:
http://localhost:8000/predict

๐Ÿ‘‰ This is NOT automatic ๐Ÿ‘‰ Port must be explicitly configured ๐Ÿ‘‰ Services are independent processes


๐Ÿ”‘ RAPIDAPI SETUP

What is RapidAPI?

Used to fetch:

  • skincare products
  • beauty recommendations
  • external product listings

Steps:

  1. Go to https://rapidapi.com/
  2. Create account
  3. Subscribe to a skincare/product API
  4. Copy API key
  5. Paste into:
rapidapi.key=YOUR_KEY

โš ๏ธ Important Rules

  • Never commit API keys to GitHub
  • Use environment variables in production
  • Invalid key โ†’ product section will fail

โš ๏ธ COMMON ISSUES

โŒ Request not multipart

โ†’ You are sending JSON instead of FormData


โŒ ML service not responding

โ†’ Ensure FastAPI is running on port 8000


โŒ CORS error

โ†’ Enable in backend:

@CrossOrigin(origins = "*")

โŒ Products not loading

โ†’ Check RapidAPI key + subscription


โŒ Camera not working

โ†’ Allow browser permissions


๐Ÿš€ FEATURES

  • ๐Ÿ“ธ Live webcam capture
  • ๐Ÿค– AI-based skin analysis
  • ๐Ÿ’ก Personalized skincare recommendations
  • ๐Ÿ›๏ธ Product suggestions via external API
  • โšก Microservice-based architecture

๐Ÿ”ฎ FUTURE IMPROVEMENTS

#Frontend

  • Home Page Enhancement
  • Design SignUp/Login Page
  • Products Cards Enhancement in the Result Section
  • About page Enhancement

Backend

  • User authentication (JWT)
  • Add Product Filtering
  • Smarter Querying
  • Better Ranking of Products
  • Save scan history in database
  • Deploy backend + ML service (cloud)

Ml-Service

  • Improve ML accuracy (deep learning model)
  • Add dashboard analytics

๐ŸŽฏ STUDENT CHALLENGES

  • Add SignUp/Login Page
  • Improve UI animations โœจ
  • Add dark mode ๐ŸŒ™
  • Add loading skeletons โณ
  • Improve ML model accuracy ๐Ÿค–


๐Ÿ‘จโ€๐Ÿ’ป Author

Shreya Pawar

This project, SkinSense, is independently developed by me as a full-stack + AI learning project.

## ๐Ÿค Contributing

We welcome contributions!  
Please check the CONTRIBUTING.md file for guidelines.


๐Ÿ‘‰ Read the full guide here: [Contributing Guide](CONTRIBUTING.md)

About

SkinSense is an AI-powered web application that analyzes facial skin using computer vision and provides personalized skincare insights and product recommendations. It uses a full-stack architecture with React, Spring Boot, and a Python ML service to deliver an intelligent and user-friendly dermatology assistant.

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors