Pejling
A drink counter for a night out. You tap every time you have a drink, and the app shows how many standard drinks are still active in your body. Published on the App Store.
Pejling is a React Native app built with Expo, and it’s pure frontend. Everything stays on the phone, with no account, no tracking and no ads. I designed and built it and got it through App Store review on my own, using AI as a tool along the way.
How it calculates
- One standard drink is 12 g of alcohol. Blood alcohol is estimated with Widmark’s formula from weight and sex, and the body burns about 0.15 per mille an hour. Active drinks are the blood alcohol converted back into drinks.
- A night closes by itself once the body has been at zero for more than three hours, and it’s saved to the history.
- Weight and sex are stored with every entry, so past nights don’t change when you edit your settings.
The app is indicative only. It doesn’t measure blood alcohol and can’t be used to judge whether you can drive.
How it’s built
- The calculation lives in plain TypeScript without UI and is covered by tests.
- An owl comments on the night, and the colours change as more drinks become active.
- Data is stored in SQLite on the phone. During development the app can also run in the browser, and then it uses localStorage instead.
- A calendar shows past nights, and the colour shows each night’s highest number of active drinks.