How rohannimje/cosmolyze works
Cosmolyze is a dermatological analysis and cosmetic-product assessment platform. The principal workflow captures a facial image, obtains a first-stage visual analysis and follow-up questions, then combines the report, answers, and budget into a clinical recommendation. Separate capabilities audit ingredient formulas, resolve product packshots, persist scan history and streaks, and manage saved products. The excerpts show route ownership and persistence interactions; client-side details and several advertised subsystems are documented in the README but their implementation was not sampled.
Main entry points: server.js Express API · scan.js Scan history · shelf.js Digital shelf · prompts.js Clinical prompts
Components 21
User experience
- Capture and UI
index.html
Clinical intelligence
- Face analysis
routes/ai.js - Clinical synthesis
routes/ai.js - Formula audit
routes/ai.js - Ingredient search
routes/ai.js - Clinical prompts
prompts.js - AI providers
Product intelligence
- Packshot lookup
routes/scan.js - Image sources
- Packshot cache
models/CachedProduct.js - Digital shelf
routes/shelf.js - Saved products
models/DigitalShelf.js
Identity and records
- Account routes
routes/auth.js - JWT protection
middleware/auth.js - User records
models/User.js - Scan history
routes/scan.js - Scan records
models/ScanResult.js - Clinical profiles
models/ClinicalProfile.js
API platform
- Express API
server.js - MongoDB
Other components
- Patient
Connections 27
- Patient → Capture and UI: uses
README.md - Capture and UI → Express API: requests
README.md - Express API → Account routes: mounts
server.js - Express API → Scan history: mounts
server.js - Express API → Face analysis: mounts
server.js - Express API → Digital shelf: mounts
server.js - Express API → MongoDB: connects
server.js - Account routes → User records: reads and creates
routes/auth.js - Scan history → JWT protection: protects routes
routes/scan.js - Digital shelf → JWT protection: protects routes
routes/shelf.js - Scan history → Scan records: saves and queries
routes/scan.js - Scan history → User records: updates streak
routes/scan.js - Digital shelf → Saved products: reads and writes
routes/shelf.js - Face analysis → Clinical prompts: uses prompts
routes/ai.js - Clinical synthesis → Clinical prompts: uses prompts
routes/ai.js - Formula audit → Clinical prompts: uses prompts
routes/ai.js - Ingredient search → Clinical prompts: uses prompts
routes/ai.js - Face analysis → AI providers: calls models
README.md - Clinical synthesis → AI providers: calls models
README.md - Formula audit → AI providers: calls models
README.md - Ingredient search → AI providers: queries library
routes/ai.js - Packshot lookup → Packshot cache: reads and caches
routes/scan.js - Packshot lookup → Image sources: searches images
routes/scan.js - Scan history → MongoDB: persists records
README.md - Digital shelf → MongoDB: persists shelf
README.md - Clinical profiles → MongoDB: stores profiles
README.md - Packshot cache → MongoDB: stores TTL cache
README.md