Zum Inhalt springen

Lovage

v1.0

A calm nutrition and wellness tracker for iOS and Android phones and tablets, in light and dark: a cream ground, forest green and soft orange, thin progress rings, meal logs, activity charts, goals and meal plans.

$199

Eingebaut

Das bekommst du
  • Hell und dunkelNutzt deine Theme-Farben
  • Handy und TabletDie Bildschirme, für die es gebaut ist
  • Pakete…
  • Codegröße…
  • Schont den Akku30 fps, ruht im Stillstand
  • Pausiert, wenn verdecktAußerhalb des Bildschirms oder anderer Tab
  • Weniger BewegungRuhig für alle, die es wollen

Bei jeder Änderung geprüft

Sicherheit geprüft am 3. Dez.
  • TypprüfungTypeScript strict
  • Lint und FormatESLint · Prettier
  • Tests und BuildScreenshots in Hell und Dunkel
  • Sicherheits-AuditKeine hohen oder kritischen Hinweise
  • PaketalterJede Version seit 7+ Tagen öffentlich
  • CPU im LeerlaufUnter einem halben Kern in Ruhe, ≤ 30 fps

Code

nutrition-lovageReact Native
  • README.mdHow to run it, change it and ship it.
  • app.config.tsThe app's name, ids and platform settings.
  • package.jsonThe app's packages: Expo, React Native.
  • package-lock.jsonThe exact package versions npm ci installs.
  • tsconfig.jsonTypeScript settings: strict, typed routes.
  • .npmrcnpm settings: exact versions, no install scripts.
  • .gitignoreWhat git leaves out: packages, builds, keys.
  • images.d.tsLets the app import its photos (data/photos.ts): Metro turns each .jpg into an image source <Image> takes.
  • appThe screens, one file per route (Expo Router).
    • (tabs)The screens, one file per route (Expo Router).
      • _layout.tsxThe tabs: Home, Logs, Plans and Profile in the bar with the seed between them, and Nutrition, Activity and Goals, opened from Home, keeping the bar under them.
      • activity.tsxActivity: steps for the day, week or month.
      • goals.tsxGoals: how many are done, then Active, Completed or All.
      • home.tsxHome: the greeting, today's four rings (tap them for Nutrition), a photo card with a word of encouragement, Today's goals, and a row with the water glass, the next meal and the streak.
      • logs.tsxLogs: a week of days to pick from, then Food, Activity or Sleep for the picked day.
      • nutrition.tsxNutrition: today, or the daily average over a week or a month.
      • plans.tsxMeal plans: filter by Weight loss, Muscle gain or Balanced, and the plans that fit, the one you follow marked Active.
      • profile.tsxProfile: your photo, name and email, weeks on Lovage, achievements and goals, then links to your progress, goals, plans, reminders, settings and help, and Sign out.
    • mealThe screens, one file per route (Expo Router).
      • [id].tsxA logged meal's own page (opened from Logs on a phone): the meal in full with edit and delete (components/meal-view.tsx).
    • planThe screens, one file per route (Expo Router).
      • [id].tsxA meal plan's own page (opened from Plans on a phone): the plan in full with its days, recipes and Start plan (components/plan-view.tsx).
    • _layout.tsxThe root: loads the heading font and the phone's language, follows the phone's dark or light setting and stacks the screens.
    • add-meal.tsxAdd food: pick the meal (breakfast, lunch, dinner or snacks; it starts on the one the link named, or the one for the time of day), search the foods or pick a popular one, choose a portion, add.
    • help.tsxHelp & support: common questions that open to their answers, then a way to write to support by email.
    • index.tsxThe welcome screen, the app's first route: misty hills at sunrise across the whole screen, settling from a slight zoom, then the Lovage mark, the name, the tagline and the two ways in (Get started, Sign in) rising one after another.
    • reminders.tsxReminders: gentle nudges for breakfast, water, lunch, a workout, dinner and bedtime.
    • settings.tsxSettings: metric or imperial units, the theme (it follows the phone's dark or light setting), the app's language (it starts on the phone's; Arabic turns the layout right to left after a restart), and the daily calorie and water targets the rings and goals measure against.
    • sign-in.tsxSign in: email and password (with show/hide), Remember me, Forgot password, the demo account to fill in with one tap, and Google, Apple and Facebook buttons.
    • sign-up.tsxSign up: name, email and password (with show/hide and an 8-character hint), then Create account.
  • componentsThe parts the screens are built from.
    • artThe drawings, as code: no image files.
      • bowl-art.tsxA dish drawn from above, for a meal or recipe without a photo: a flat bowl on the card's sunk color with three heaps of food in the dish's colors and a few leaves of herb on top.
    • auth-frame.tsxThe sign-in and sign-up screens' frame: the Lovage wordmark, a title and the form on a card, scrolling clear of the keyboard.
    • backdrop.tsxThe soft landscape behind every screen: a sky fading down, a sage glow at the top end and a warm one at the start, and two misty hills along the bottom, drawn once and still (no motion, no blur).
    • bar-chart.tsxA bar chart that grows: the bars rise one after another from the baseline, each in its slot.
    • build.tsxOne block of a screen's "growth" entrance (MOTION.enter in constants/motion.ts): from its first frame it is clear and 10pt low, then rises and fades in at its place in the order.
    • button.tsxThe app's buttons, flat: the main one is a solid forest pill, `quiet` a pill with a hairline edge on the card color, `danger` a quiet one with red words.
    • calorie-week.tsxDaily calories as bars against the goal over the last week or month, with the day closest to the goal named under them.
    • card.tsxA flat card: the card color on the ground with a hairline edge, the brand's roundness and even padding.
    • chip.tsxA choice pill (a kind of goal, a portion, a plan filter, a meal): the picked one fills with the brand green; the others are outlined.
    • confirm-sheet.tsxA sheet that asks before something you can't easily take back (delete a meal, sign out): a line about what happens, the action in red or green, and Cancel.
    • day-strip.tsxA week of days to pick from (Logs): each day's short name over its date, a green pill that glides to the picked day, a dot under days with meals logged, and arrows to the weeks before.
    • faq-item.tsxOne question that opens to its answer: the chevron turns a quarter round and the answer fades in just under it.
    • field.tsxA text field with a line icon, one designed focus state on every platform (the edge turns forest green, same width, so nothing shifts), an optional show/hide eye for passwords and an error line under it read out by screen readers.
    • food-line.tsxOne food in a meal: its name, the portion (and how many), its calories.
    • forgot-sheet.tsx"Forgot password?": a sheet that takes your email, checks it looks right, and then says where the reset link went.
    • goal-row.tsxOne goal: a small ring in the goal's tint around its icon, the title, how far along it is and a bar.
    • goal-sheet.tsxThe sheet to add a goal or edit one: the kind of goal (new goals only), your own goal's words, and the target with − and +.
    • heading.tsxA heading in the brand's heading font.
    • home-header.tsxHome's top: your photo, a greeting for the time of day with your first name, and a bell that opens Reminders.
    • icon-button.tsxA round icon button with a full touch target: bare (just the icon) or on a soft card-colored circle with a hairline edge.
    • icon.tsxLovage's line icons, drawn on one 24-point grid with round ends and a light stroke (ICON in constants/theme.ts), so they read as one set.
    • list-row.tsxA settings-style row: a tinted icon tile, a title with an optional line under it, and a chevron or anything else on the end side.
    • logo.tsxThe Lovage mark: a lovage umbel, three stems rising from one point into small rounded leaflets, with a warm seed head in the accent at the top.
    • logs-activity.tsxLogs' Activity tab for one day: the steps ring with the count in the middle, calories burned, distance and active time, and the day's workouts with a button to log one.
    • logs-food.tsxLogs' Food tab for one day: the day's calories and macros against the targets, then breakfast, lunch, dinner and snacks, each a logged meal or a dashed row to add it.
    • logs-sleep.tsxLogs' Sleep tab for one night: the hours slept counting up, bedtime and wake-up, the night's stages as one bar that grows across with a legend in minutes, and the seven nights up to it as a bar chart against the sleep target.
    • macro-rings.tsxCarbs, protein and fat as three small rings side by side, each with its grams in the middle and its share of the target under it.
    • macro-row.tsxA day's (or a meal's) calories, protein, carbs and fat side by side: each number counting up over a short bar in its tint, with the daily target under it when `targets` is on.
    • meal-row.tsxOne logged meal in a list: its photo (or the drawn bowl), which meal it is, what was in it, its calories and when it was logged.
    • meal-view.tsxA logged meal in full, shared by its own page (phone) and the side of Logs (tablet): the photo, which meal and when, its macros counting up, and its foods.
    • nav-rail.tsxThe tablet's navigation: the phone's pill stood upright, floating at the start side: the Lovage mark, the seed, then every place (Home, Logs, Nutrition, Activity, Goals, Plans, Profile), the picked one opened into a leaf with its name (components/nav-tab.tsx).
    • nav-tab.tsxThe pieces both navigations share: each place's icon and name, going to a tab, and one tab: an icon that, when picked, opens into a drawn leaf with its name under it (the leaf unfurls on a spring; with Reduce motion it is simply there).
    • next-meal-card.tsxHome's next-meal card: the first meal of today not logged yet (once all are in, tomorrow's breakfast idea), a suggested dish with its photo and calories, and a button that opens Add food for that meal.
    • photo.tsxA photo filling its box ("cover") with its focus point kept in view where the box crops it, the way CSS object-position does, and a wash of one color over it, from `top` to `bottom` opacity, so words on the photo keep their contrast and a bright photo doesn't glare at night.
    • plan-card.tsxA meal plan in the list: its photo, name and one-line promise, calories a day and length, and an "Active" tag on the plan you're following.
    • plan-view.tsxA meal plan in full, shared by its own page (phone) and the side of Plans (tablet): the photo, what it is, its length, calories and meals a day, a strip of days, and the picked day's four recipes, which slide in for each day.
    • portion-sheet.tsxThe portion step of adding a food: the food's portion size, a choice of ½×, 1×, 1½× or 2×, and its calories and macros for that much, which count to each new choice.
    • pressable-scale.tsxA Pressable that shrinks a little under the finger and springs back.
    • progress-bar.tsxA thin rounded progress bar in a metric's color.
    • quick-add.tsxQuick add, opened by the seed: the screen dims and four petals spring out around the seed one after another, each pointing back at it (meal, a glass of water, a workout, today's weight).
    • ring.tsxA thin progress ring: a soft track and an arc in the metric's color that grows clockwise from the top.
    • screen.tsxEvery screen's frame: the backdrop (unless the tabs already draw it) and the safe-area insets, so nothing sits under the notch, the status bar or the home indicator.
    • section-head.tsxA section's heading with an optional link on the end side ("See all", "+ Add").
    • seed-button.tsxThe seed that opens Quick add: a forest-green teardrop with a + in it, its tip resting down in the bar.
    • segments.tsxA row of choices with one picked (Day / Week / Month, Food / Activity / Sleep, the plan filters): a forest pill glides under the picked one (placed at once on the first measure, hooks/use-slide.ts).
    • sheet.tsxA bottom sheet over a dimmed screen (a portion, a goal, a workout, sign out).
    • social-buttons.tsx"or continue with" and three outlined buttons for Google, Apple and Facebook.
    • stat-tile.tsxA small stat card (steps, calories burned, distance, active time): an icon in the stat's tint, its name, and the number counting up.
    • stepper.tsxA value with − and + on either side (a target, a portion, a weight, a time).
    • streak-card.tsxHome's streak card: days in a row with every main meal logged, a flame that takes one slow breath every few seconds (only while Home is in front, never with "Reduce motion"), and this week's seven days as dots, filled where the meals are in.
    • tab-bar.tsxThe phone's navigation: a frosted pill floating above the bottom edge with Home, Logs, the seed in the middle, Plans and Profile.
    • time-sheet.tsxThe sheet to change a reminder's time: the hour and the minutes (in quarters) each with − and +, the time written the language's way.
    • toast.tsxThe note after an action ("Glass added", "Lunch deleted · Undo"): a deep pill that rises above the tab bar, stays four seconds and fades away.
    • today-meals.tsxToday's meals, each opening its page, with Add meal under them.
    • today-rings.tsxHome's four rings for today: calories, protein, sleep and workouts, each a thin ring in its own tint with the number counting up in the middle and what it measures under it.
    • toggle.tsxAn on/off switch in the brand green, flat: a track and a knob that glides across.
    • top-bar.tsxA screen's top bar: Back on the start side (when there is somewhere to go back to), the title in the middle and an optional action on the end side, like the native iOS bar but flat.
    • water-card.tsxHome's water card: a drawn glass that fills to today's share of the water target, the amount under it and a + to add one glass.
    • weight-sheet.tsxThe sheet to log today's weight: starts at the last weigh-in, steps by a tenth in the picked units, and shows the change since the first one.
    • workout-row.tsxOne logged workout: an icon for its kind in purple, its name, when and how long, and the calories it burned.
    • workout-sheet.tsxThe sheet to log a workout: what kind (walk, run, yoga…), how long, and the calories it burns, worked out as you change them.
  • constantsColors, sizes, motion and the brand defaults.
    • color.tsSmall color math for the shades that follow the brand colors.
    • motion.tsMotion settings shared by every animation: Lovage's "growth".
    • theme.tsLovage's colors, the brand defaults and the sizes every screen shares.
  • hooksState and theme hooks.
    • apply-direction.tsRight-to-left on a phone (Arabic): React Native flips the layout only after the app restarts, so this asks for it and says whether a restart is needed.
    • apply-direction.web.tsRight-to-left on the web: the page's dir and lang switch at once, and react-native-web lays start/end and rows out from them.
    • store.tsA tiny store for the app's state: one value, changed with `update`, and read in components with useStore, which redraws them when it changes.
    • use-account.tsThe account: who is signed in (or that they signed out, which guards the signed-in screens, app/_layout.tsx) and the accounts made on this phone.
    • use-awake.tsWhether a small repeating motion (the streak flame's breath) may run: only while its screen is focused, the app is in front (on the web: the tab is visible) and "Reduce motion" is off.
    • use-brand.tsThe brand settings: the values in constants/theme.ts.
    • use-count-up.tsA number that counts from where it was to its new value (calories, grams, steps), easing out over DRAW.
    • use-goal-text.tsHow a goal is written: its title ("Drink 2 L of water", "Sleep 8 hours") and how far along it is ("1.5 L / 2 L"), in the picked units and language, plus the icon and tint each kind of goal wears.
    • use-goals.tsThe goals: add, edit, delete, and how far along each is.
    • use-icons.tsHow the line icons are drawn (ICON in constants/theme.ts).
    • use-layout.tsPhone or tablet layout, from the window's width (not the device), so an iPad in Split View or a small Android tablet gets the layout that fits.
    • use-leave.tsA soft hand-off between screens that replace each other (sign in → Home, Profile → sign in): the screen fades out, then the next one comes in.
    • use-log.tsThe food, water, workout and weight log, seeded with five weeks (data/history.ts), and the sums every screen reads from it.
    • use-motion.tsThe app's moments (MOTION in constants/motion.ts): how parts come in, answer a press and leave.
    • use-prefs.tsWhat people set: units, daily targets, the meal plan they're on and their reminders.
    • use-scheme.tsDark or light, from the phone's appearance setting (app.config.ts sets userInterfaceStyle "automatic"); on the web, the browser's setting.
    • use-slide.tsA position that springs to each new target, except the first one it is measured at: there it starts in place, so the marker under the chosen tab or segment doesn't slide in from the edge when its screen opens.
    • use-still.tsWhether the app's own loops and plays stay still: the phone's "Reduce motion" is on, or MOTION.reduce is Always (constants/motion.ts).
    • use-theme.tsThe palette of the current theme and the styles that depend on it and on the brand, built once per brand and theme and shared by every component.
    • use-toast.tsA short note at the bottom after an action ("Glass added"), with an optional Undo.
    • use-units.tsWeights, distances and water in the units picked in Settings (metric or imperial), written the language's way.
    • use-visit.tsxCounts each visit to a tab, so a tab's screen builds up again every time it is opened, not only the first time (constants/motion.ts).
    • use-words.tsThe words of the language in use, and the tools that put numbers, dates and plurals into them.
  • dataEvery word and product the app shows.
    • foods.tsThe food list people search when they add a meal, and the dishes the log is seeded with.
    • history.tsThe log Lovage opens with: five weeks of meals, steps, sleep, workouts, water and weigh-ins, dated back from today so "Today" is always today.
    • photos.tsThe real photos (Unsplash stand-ins, free license; credits in README.md).
    • plans.tsThe meal plans and their recipes.
    • user.tsThe person signed in on first launch, the demo account that always works, and the daily targets Lovage starts with (Settings changes them).
  • pluginsBuild settings Expo has no option for.
    • night-window.tsAndroid's window color (behind the screens) for a phone in dark mode.
  • assetsThe photos the screens show.
    • photosThe photos the screens show.
      • lovage-avatar.jpgA photo the app shows.
      • lovage-chicken-salad.jpgA photo the app shows.
      • lovage-greek-yogurt.jpgA photo the app shows.
      • lovage-hero.jpgA photo the app shows.
      • lovage-oatmeal.jpgA photo the app shows.
      • lovage-plan-clean.jpgA photo the app shows.
      • lovage-plan-keto.jpgA photo the app shows.
      • lovage-plan-mediterranean.jpgA photo the app shows.
      • lovage-plan-vegan.jpgA photo the app shows.
      • lovage-salmon-rice.jpgA photo the app shows.
      • lovage-splash.jpgA photo the app shows.
  • localesEvery word the app shows, one JSON file a language; list.ts names them.
    • ar.jsonOne language's words, with the keys of en.json.
    • de.jsonOne language's words, with the keys of en.json.
    • en.jsonOne language's words, with the keys of en.json.
    • es.jsonOne language's words, with the keys of en.json.
    • fr.jsonOne language's words, with the keys of en.json.
    • list.tsThe languages Lovage ships, each with its own file in this folder.
    • pt.jsonOne language's words, with the keys of en.json.
    • zh-Hans.jsonOne language's words, with the keys of en.json.

README.md

How to run it, change it and ship it.

Lädt…
Gut für
Nutrition coaches, dietitians and wellness brands that want their own food, activity and goal tracking app on iOS and Android.
So funktioniert es
See today's rings, log meals by search and portion, track water, steps and sleep, set goals and follow a weekly meal plan.
So nutzt du es
Run it in Expo Go, change the words in locales/, foods and plans in data/, photos in data/photos.ts and colors in constants/theme.ts, then build with EAS.