Dermafind is a full-stack acne analysis and skincare recommendation platform that combines computer vision with large language models to provide personalized skincare guidance based on facial image analysis.
The system uses a custom YOLOv26 model to detect acne types from uploaded images and an LLM-driven recommendation engine aligned with the IGA acne severity grading scale.
- Image-based acne detection and classification
- Detection of six acne types:
- Pustule
- Dark spot
- Nodule
- Papule
- Whitehead
- Blackhead
- Personalized skincare recommendations using the IGA acne grading scale
- JWT-based authentication with refresh token rotation and revocation
- Microservices architecture with asynchronous inference processing
The platform follows a microservices architecture, where services are independently deployed and communicate through a gateway.
| Service | Tech Stack | Purpose |
|---|---|---|
| Auth Service | Spring Boot, Spring Security, Spring Data JPA, Hibernate, PostgreSQL | Handles JWT authentication, access tokens, refresh tokens, and token revocation |
| Inference Service | Python, Flask, YOLOv26 custom model, Celery, Redis | Processes uploaded images, performs acne detection, and returns structured predictions |
| Gateway | OpenResty (Nginx + Lua) | Reverse proxy responsible for routing, authentication validation, and CORS handling |
| Frontend | React, Vite, TypeScript | User interface for scans, results, authentication |
| Async Tasks | Celery + Redis | Background job processing for inference workloads |
| Database | PostgreSQL | Stores users and application metadata |
A video demonstration of the platform is available here:
- User uploads a facial image from the frontend
- Request is routed through the OpenResty gateway
- Gateway validates the JWT token with the Auth Service
- Image is forwarded to the Inference Service
- Celery workers process the image asynchronously
- The YOLOv26 model detects acne types and returns structured predictions
- The LLM generates skincare recommendations using the IGA grading scale
- Results are returned to the frontend
Note:
Running the inference service locally requires a Roboflow API key. Without it, acne detection will not function.
- Docker
- Docker Compose
- Node.js 20+ (for frontend development)
Create a .env file in the root directory.
ROBOFLOW_API_KEY=your_roboflow_key_here VITE_API_BASE_URL=http://localhost/api
POSTGRES_USER=postgres POSTGRES_PASSWORD=postgres
REDIS_URL=redis://redis:6379
Clone the repository:
git clone https://github.com/yourusername/dermafind.git
cd dermafind
Create the .env file with the required variables.
Start all services:
docker compose up --build
This launches:
- Auth Service
- Forum Service
- Inference Service
- OpenResty Gateway
- React Frontend
- PostgreSQL
- Redis
Access the application:
- The frontend expects the API at
/api(configured viaVITE_API_BASE_URL) - Large image uploads are supported (up to 16MB)
- Without a Roboflow API key, inference will fail but authentication features remain usable
The OpenResty gateway performs the following tasks:
- Routes
/api/*requests to the correct microservice - Validates JWT tokens for protected routes
- Injects user context headers for downstream services
- Handles CORS configuration for frontend communication