AI skincare routines for iOS and Android: ten-second check-ins, AM/PM routines built from your own shelf, and a calm progress timeline.
Live demo: https://www.freelancerportfoliohub.com/jameslee/projects/dewy/index.html
This repository holds the Dewy Android app, the shared routine logic, and the Dewy marketing site.
- App (
app/) is a native Android app written in Kotlin with Jetpack Compose. It has five tabs: Today, Check-in, Routine, Shelf and Progress. - Core (
core/) is a plain Kotlin library with the domain model, the layering rules behind the routine builder, check-in and checklist state, chart math and the demo profile's seed data. It has no Android dependency, so it builds and tests on any JVM. - Web (
server/) is a Ktor server. It renders the marketing pages (home, How it works, Product shelf, Pricing and an interactive App preview where visitors tab or swipe between the five app screens) and serves the routine API.
The app and the site share one design language (porcelain, peach, lilac and plum with an Instrument Serif display
face) and the same core module. The phone mockups on the site are drawn from the same seed data and routine logic
that the app uses.
- Skin check-ins on an illustrated face-zone map with hydration, oil and comfort scales and lifestyle tags. No camera.
- AM / PM routine builder that layers thinnest to richest, spaces out strong actives and explains each change. Steps can be dragged to reorder, added from the shelf or removed, and Dewy notes when an order breaks the layering rules.
- Product shelf with opening dates, use-by windows, running-low alerts and plain-language ingredient notes.
- Progress timeline: twelve weeks of self-reported trends with routine changes pinned in place.
- Interactive app preview with tab, tab-bar, dot, swipe and arrow-key navigation. Screen switching and the AM / PM toggle also work as plain links and forms when JavaScript is off.
- Routine API (
POST /api/routine) that applies the layering and pairing rules to a list of shelf products.
| Layer | Tools |
|---|---|
| App | Kotlin, Jetpack Compose (Material 3), AndroidX ViewModel + StateFlow, Canvas drawings |
| Core | Pure Kotlin (JVM 17 bytecode), no third-party dependencies |
| Web | Ktor (CIO engine), kotlinx.html, kotlinx.serialization, the original stylesheet |
| Tests | kotlin.test / JUnit 5, Ktor test host, JUnit 4 + Robolectric Compose UI tests |
| Tooling | Gradle Kotlin DSL with a version catalog, Android Gradle Plugin, Android Lint, Docker |
You need JDK 17 or newer. The Gradle wrapper downloads everything else.
Web server:
./gradlew :server:run # http://localhost:8080Android app (needs an Android SDK with platform 35, found through ANDROID_HOME or local.properties):
./gradlew :app:installDebug # on a connected device or running emulatorWithout an Android SDK, the build skips :app and still builds and tests :core and :server.
curl -X POST http://localhost:8080/api/routine \
-H 'content-type: application/json' \
-d '{"shelf":[{"id":"spf","name":"Mineral SPF 50","kind":"sunscreen"},
{"id":"ret","name":"Retinol 0.3%","kind":"treatment","actives":["retinoid"]}]}'kind is one of cleanser, toner, essence, serum, treatment, moisturizer, oil, sunscreen. actives
(optional, up to six) are drawn from retinoid, aha, bha, vitamin-c, niacinamide, benzoyl-peroxide.
Invalid requests return 400 with every problem keyed by its JSON path, e.g. shelf[0].kind.
Copy .env.example to .env. All are optional.
| Variable | Purpose |
|---|---|
PORT |
Port the web server listens on (default 8080) |
SITE_URL |
Canonical site URL used in page metadata |
APP_STORE_URL |
App Store listing for the iPhone button |
PLAY_STORE_URL |
Google Play listing for the Android button |
The Dockerfile builds and tests the web server, then runs it on a JRE image. It reads PORT, so it deploys to
Railway as is.
docker build -t dewy-web .
docker run -p 8080:8080 dewy-web.
├── app/ # Android app (Jetpack Compose)
│ └── src/
│ ├── main/kotlin/com/dewy/app/
│ │ ├── state/ # ViewModels for each tab
│ │ └── ui/
│ │ ├── components/ # cards, chips, sliders, zone map, bottles, ring, trend chart
│ │ ├── screens/ # Today, Check-in, Routine, Shelf, Progress
│ │ └── theme/ # colour, type and spacing tokens
│ ├── main/res/ # fonts, launcher icon, themes
│ └── test/ # ViewModel tests and Robolectric UI tests
├── core/ # pure Kotlin domain module
│ └── src/main/kotlin/com/dewy/core/
│ ├── model/ # zones, scales, shelf products, routine steps
│ ├── routine/ # RoutineEngine (layering rules) and RoutineBuilder
│ ├── checkin/ today/ shelf/ progress/
│ ├── chart/ # trend chart scales and ring geometry
│ └── data/ # demo profile seed data
├── server/ # Ktor web server
│ └── src/main/
│ ├── kotlin/com/dewy/web/
│ │ ├── api/ # POST /api/routine
│ │ ├── content/ # site copy, FAQ, pricing
│ │ ├── pages/ # /, /how-it-works, /shelf, /pricing, /app, 404
│ │ └── views/ # layout, components, phone screens, inline SVG
│ └── resources/static/ # stylesheet, script, fonts, images, favicon
├── docs/ # README images
├── gradle/libs.versions.toml # dependency versions
└── Dockerfile
| Command | Description |
|---|---|
./gradlew :server:run |
Start the web server |
./gradlew :core:test :server:test |
Run the core and web tests |
./gradlew :app:testDebugUnitTest |
Run the app's ViewModel and Compose UI tests |
./gradlew :app:assembleDebug |
Build a debug APK |
./gradlew :app:lintDebug |
Run Android Lint |
./gradlew build |
Build and test every module |
