How to Build a Skin Progress Monitoring App Using Python and Flutter
Taking care of your skin is no longer limited to a visit to a spa. In the age of smartphones and IoT, you can now monitor the health and progress of your skin directly from your mobile device. In this tutorial, we’ll walk you through how to build a simple but powerful app to track facial improvements over time — from analyzing texture and tone to identifying subtle changes that result from treatments like facials.
This guide will use Flutter for the frontend and Python (specifically FastAPI) for the backend. We’ll also touch on how to integrate image processing and databases to store progress securely.
Why Build a Skin Monitoring App?
Skincare can be highly personal, and results from facials or other spa treatments may take time to show. With an app, users can:
- Upload daily or weekly facial images.
- Receive basic analysis (brightness, smoothness, blemishes, etc.).
- Compare their skin before and after a facial.
- Track treatments received (e.g., facial types, products used).
Such an app empowers users to make informed decisions about their skincare routines, and it enhances the client experience for spa professionals.
Tools You’ll Need
- Flutter (UI)
- Python (FastAPI backend)
- OpenCV (image processing)
- Firebase or PostgreSQL (storage)
- REST API / HTTP requests
- GitHub for version control
Setting Up the Project Structure
We’ll use a basic client-server architecture:
skin-app/
├── backend/ # Python FastAPI + Image processing
└── frontend/ # Flutter app
Backend: Python + FastAPI
Install FastAPI and Uvicorn:
pip install fastapi uvicorn python-multipart opencv-python
Image Upload and Analysis
from fastapi import FastAPI, File, UploadFile
import cv2
import numpy as np
from fastapi.responses import JSONResponse
app = FastAPI()
@app.post("/analyze-skin/")
async def analyze_skin(file: UploadFile = File(...)):
contents = await file.read()
np_img = np.frombuffer(contents, np.uint8)
img = cv2.imdecode(np_img, cv2.IMREAD_COLOR)
# Placeholder for real analysis:
mean_color = cv2.mean(cv2.cvtColor(img, cv2.COLOR_BGR2GRAY))[0]
return JSONResponse(content={
"brightness": mean_color,
"message": "Image analyzed successfully."
})
This simple endpoint reads the image and calculates the average brightness.
Frontend: Flutter App
Flutter Dependencies
Add the following dependencies to pubspec.yaml
:
http: ^0.14.0
image_picker: ^1.0.0
Flutter UI Code (Dart)
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:image_picker/image_picker.dart';
import 'package:http/http.dart' as http;
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
home: SkinMonitorPage(),
);
}
}
class SkinMonitorPage extends StatefulWidget {
@override
_SkinMonitorPageState createState() => _SkinMonitorPageState();
}
class _SkinMonitorPageState extends State<SkinMonitorPage> {
File? _image;
final picker = ImagePicker();
Future pickImage() async {
final pickedFile = await picker.pickImage(source: ImageSource.camera);
if (pickedFile != null) {
setState(() {
_image = File(pickedFile.path);
});
uploadImage(_image!);
}
}
Future uploadImage(File imageFile) async {
var request = http.MultipartRequest('POST', Uri.parse('http://10.0.2.2:8000/analyze-skin/'));
request.files.add(await http.MultipartFile.fromPath('file', imageFile.path));
var response = await request.send();
if (response.statusCode == 200) {
print("Uploaded successfully");
} else {
print("Failed to upload");
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Skin Progress Tracker')),
body: Center(
child: Column(
children: [
_image == null ? Text('No image selected.') : Image.file(_image!),
ElevatedButton(
onPressed: pickImage,
child: Text('Capture Image'),
)
],
),
),
);
}
}
Add Database Support
You can use Firebase for mobile-friendly storage or PostgreSQL for more scalable backend storage. Store image metadata (upload time, brightness score, treatment tags, etc.) to generate history charts.
Facial Analysis Ideas
As you grow your app, consider integrating:
- Skin segmentation (OpenCV or Mediapipe).
- Blemish detection (edge detection + ML models).
- Facial symmetry and tone tracking.
- AI-powered skincare suggestions.
Deployment Tips
- Host the Python API on services like Render or Railway.
- Use HTTPS and authentication for image uploads.
- Store user data securely and ensure GDPR compliance.
One interesting use case for this app came from a user looking to measure results after a facial chicago to monitor improvements after a series of spa treatments.
By creating this type of app, not only are you bringing spa quality monitoring to smartphones, but you’re also opening opportunities for collaborations with skincare professionals.
Whether you’re an independent developer, a spa business, or a skincare enthusiast, building your own skin progress monitoring app is a rewarding experience that merges beauty and tech in a meaningful way.