Emotion Galaxy: Four Planets in Three Weeks
How I read the Swift Student Challenge, and built a mental health journey with frameworks I had never touched
In February 2025 I had three weeks to build something for Apple's Swift Student Challenge. I was still new to Swift, and I had never written a line of ARKit, RealityKit or Create ML. What came out was Emotion Galaxy: a journey across four planets on iPad, where each planet is a small, evidence-based exercise for your mental health. It was named a Distinguished Winner, which is how I ended up in Cupertino for WWDC25.
This is how it was designed, and why it looks the way it does.
I read the judges before I wrote any code
Apple says submissions are judged on three things: technical accomplishment, creativity of ideas, and the written responses. That is too broad to design against. So I treated it like an exam and went through several years of past Distinguished Winners, looking for what they had in common.
Three things kept coming up:
- a real community the project was built for
- the newest frameworks, the ones Apple had just shown at WWDC
- a social issue, very often accessibility: tools for blind users, for people with disabilities
So the brief I gave myself was narrower than Apple's. Pick one real social issue. Then use as many current Apple frameworks as I could, each one there because it solves part of the problem, not because it looks impressive.
Why mental health, and why a galaxy
The issue was mental health in young people. It is close to everyone my age, and the numbers are not subtle. The app opens with them: one in seven people aged 10 to 19 lives with a mental health condition, and 301 million people worldwide live with anxiety.
The harder question was shape. Four frameworks in one app usually reads as a tech demo. I spent a long time brainstorming with AI before landing on a container that could hold all of it without feeling stitched together: a galaxy. Each planet is one technique that therapists actually use, built on one framework that makes it work. The planets unlock in order, so the frameworks become chapters of a single journey instead of a list of features.

Venus. Smile, and hold it
- Practice
- Smile training. Even a deliberate smile can nudge your mood.
- Built on
- Vision (face landmarks), AVFoundation (camera)
- Hard part
- Deciding what counts as a smile, fast enough to run on every frame
Venus asks for one thing: smile at the camera and keep it for two seconds. AVFoundation streams the camera, and on every frame Vision's VNDetectFaceLandmarksRequest returns the outline of your lips.
There is no trained smile model. The check is three measurements on the outer lip points: how far each mouth corner sits from the centre of the lips, and how far the lips have parted. Both corners have to move, at least one of them clearly, and the mouth has to open a little. While that holds, a ring fills and a timer counts down from 2.0. The moment the smile drops, it resets. It is a crude rule, but it is instant, and a live ring that lags behind your face would break the whole moment.
Artistic. Draw, and it becomes your planet
- Practice
- Art therapy, through symbols that come up again and again: a flower, a tree, a river, stars
- Built on
- PencilKit, a sketch classifier trained in Create ML, SpriteKit, SceneKit
- Hard part
- Training data. Recognising a quick hand-drawn tree, not a photo of one
You draw four things with Apple Pencil. Each drawing goes through an image classifier I trained in Create ML, on Apple's own tooling on my Mac. I built the training set from hand-drawn sketch datasets on Kaggle and GitHub: trees, flowers, water, stars. If the model doesn't see a tree, the app says so kindly and suggests adding branches, instead of just failing.
Every accepted drawing becomes a texture. The four are layered in order over a blue gradient, each with its own blend mode, and wrapped around a SceneKit sphere, with the same image driving the planet's glow. By the end, the planet spinning on screen is literally made of what you drew.
Oceanus. Breathe with Neptune
- Practice
- Paced breathing: three seconds in, five held, six out
- Built on
- ARKit (plane detection), RealityKit (rendering)
- Hard part
- All of it. I had never written AR code, and neither had the model, really
Oceanus puts Neptune and an ocean surface into your room. ARKit scans for a horizontal plane. Once it finds one, RealityKit anchors the Neptune model and the water to it, and plane detection switches off so the planet stops drifting. Then you walk around it while you follow the breathing rhythm. The long exhale is the point: it is the part that calms you down.
This planet took longer than the other three. The model kept giving me RealityKit code that compiled and then did nothing. What finally worked was reading Apple's documentation myself, pasting the relevant parts into the conversation, and describing exactly what I expected to see on screen. It took several days of back and forth to make one planet sit on a real floor.
Andromeda. Say how you feel
- Practice
- Naming your emotions, and being reminded that they pass
- Built on
- A text classifier trained in Create ML, Core ML, SwiftUI
- Hard part
- Ten emotions from a sentence or two, entirely on device
The last planet is a conversation. You write how you feel, or tap a suggestion like “I'm worried about my upcoming exam”. A text classifier I trained in Create ML, on sentences about feelings I collected online, labels it as one of ten emotions: happy, hopeful, confident, neutral, confused, depressed, anxious, angry, stressed or lonely. Those fold into positive, neutral or negative, and the reply follows from that. After three exchanges, the journey moves on.
It all runs on the iPad. There is no server and no API call; nothing you type leaves the device. For an app that asks people how they really feel, that felt like the only acceptable design.

Finishing a planet
Every planet ends the same way: a 3D version of it in SceneKit, wrapped in particles, that you can spin with your finger. Repetition was deliberate. It tells you that you finished something, and it tells you where you are in the journey. Back on the menu, the next card unlocks and a journey log fills in. After Andromeda, the app closes with a slow credits sequence, the way a film ends, because the last thing I wanted was a toast notification saying “Done!”.

How it was actually built
All of it, about 11,500 lines of Swift, was written with AI, in Cursor, with Claude 3.5 Sonnet. The cosmic artwork came from Midjourney and GPT; the planet textures and the music came from open-licence sources. From the first idea to the submit button took the three weeks the challenge allowed.
My part was what the model couldn't do on its own: choosing the structure, collecting and cleaning the training data for both classifiers, reading documentation when the model was out of its depth, and deciding when something was good enough for a judge to use with no one there to explain it.
Looking back
Emotion Galaxy is what one person could build in three weeks with early-2025 models. Today the AR planet would take an afternoon. But it was also my first clear look at where models break: fluent on APIs they have seen a thousand times, lost when the documentation is thin. Measuring that kind of gap is a big part of what I work on now.