Sunray
A cozy focus timer and task manager which keeps you off your phone.
Tech
- Expo SDK 54 / React Native 0.81, with expo-router for file-based routing
- NativeWind + gluestack-ui for styling
- expo-sqlite for storage, Zustand for client state
- Custom native module (Swift + Kotlin) for lock detection / app shielding
The layout pretty much copies the bulletproof react structure: app/ holds the routes, features/ the feature-specific components/stores/constants, models/ the SQLite queries, and components/ui/ the gluestack components.
Development
The native module means you need a development build — Expo Go won't have FocusGuard.
yarn # install deps
yarn build:dev:ios # EAS dev-client build (simulator)
yarn ios # start metro + run on iOS
yarn android # same for android
yarn test # jest
Note: strict mode needs real hardware on iOS, you can test android entirely on a simulator though. iOS sims dont have the Family Controls settings that you need.
Forking
app.json points at my Expo project (owner, extra.eas.projectId, updates.url). EAS will refuse to build or publish updates against it from your account — run eas init to swap in your own project, and change the bundle identifier / package name before shipping anywhere.
Also: the panda isn't GPL (see License). If you ship a fork, replace the art or ask first.
AI usage
I used a self-hosted, locally-run LLM as a code reviewer and assistant on parts of this codebase, mostly the native focus-guard module. Nothing was sent to cloud AI services, and running a local model on hardware I already own keeps the ecological footprint about as close to zero as computing gets. Every line was read, understood, and tested on real devices by me. Every bug is mine, not the robot's.
If you contribute: AI assistance is fine, but it MUST be self-hosted, to reduce ecological impact. On top of this, every single line you submit must have been read by human eyes. If slop is submitted, you will be banned.
Todo list
- allow user to change app icon (more things to spend baked goods on)
- should just be each different pose is an option, with different backgrounds
- add dyslexic fonts / customizable fonts / other languages support
- different options for text in lots of scenarios
Support
Sunray is free and has no ads or purchases. If it helped you get things done, there's a video about the process of building it on YouTube, and even more on Patreon.
License
The source code is licensed under GPL-3.0.
The art, animation, and image assets under assets/ (the red panda, its outfits, sprite animations, and app icons) are not GPL — they are © Aiden Jastrzembski, all rights reserved. You may use them to build and run this app from this repo, but not reuse or redistribute them in other projects. See assets/LICENSE.