protein-tracker

πŸ₯— Protein Tracker

A simple, elegant Android mobile app for tracking daily protein and calorie intake. Built with React Native and Expo, featuring offline-first architecture with local SQLite storage and automatic light/dark mode support.

✨ Features

πŸ“± Get the App

Google Play Store

Download from Google Play

Direct Download

Download APK

πŸ“Έ Screenshots

Today View History Settings
Today History Settings

Supports both light and dark mode based on your device settings

View Light Mode Screenshots ## πŸ“Έ Screenshots
Today View History Settings
Today History Settings

🎯 Why Protein Tracker?

πŸ› οΈ Tech Stack

πŸ“¦ Project Structure

protein-tracker/
β”œβ”€β”€ .vscode/              # VS Code workspace settings
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ index.js          # Main app component with all screens
β”‚   └── _layout.tsx       # Root layout wrapper
β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ css/
β”‚   β”‚   └── style.scss    # GitHub Pages styling for legal docs
β”‚   β”œβ”€β”€ fonts/            # Custom fonts
β”‚   └── images/           # App images and icons
β”œβ”€β”€ components/           # Reusable React components
β”œβ”€β”€ constants/            # App-wide constants and config
β”œβ”€β”€ hooks/                # Custom React hooks
β”œβ”€β”€ screenshots/          # App screenshots for README
β”‚   β”œβ”€β”€ today.jpg
β”‚   β”œβ”€β”€ history.jpg
β”‚   └── settings.jpg
β”œβ”€β”€ scripts/              # Build and utility scripts
β”œβ”€β”€ .gitignore            # Git ignore rules
β”œβ”€β”€ LICENSE               # MIT License
β”œβ”€β”€ README.md             # Project documentation
β”œβ”€β”€ adaptive-icon.png     # Android adaptive icon
β”œβ”€β”€ app.json              # Expo configuration
β”œβ”€β”€ eas.json              # EAS Build configuration
β”œβ”€β”€ eslint.config.js      # ESLint configuration
β”œβ”€β”€ icon.png              # App icon
β”œβ”€β”€ package.json          # Dependencies and scripts
β”œβ”€β”€ package-lock.json     # Locked dependency versions
β”œβ”€β”€ privacy-policy.md     # Privacy policy (hosted on GitHub Pages)
β”œβ”€β”€ terms-of-service.md   # Terms of service (hosted on GitHub Pages)
└── tsconfig.json         # TypeScript configuration

πŸ”§ Key Implementation Details

Database Schema

Settings Table:

CREATE TABLE settings (
  id INTEGER PRIMARY KEY NOT NULL,
  goal_protein_g REAL NOT NULL
);

Entries Table:

CREATE TABLE entries (
  id INTEGER PRIMARY KEY NOT NULL,
  day TEXT NOT NULL,
  name TEXT NOT NULL,
  protein_g REAL NOT NULL,
  calories REAL,
  created_at TEXT NOT NULL
);

Onboarding Table:

CREATE TABLE onboarding (
  id INTEGER PRIMARY KEY NOT NULL,
  completed INTEGER NOT NULL DEFAULT 0
);

Core Functionality

πŸš€ Development

Prerequisites

Local Setup

# Clone the repository
git clone https://github.com/VerdieCraig/protein-tracker.git
cd protein-tracker

# Install dependencies
npm install

# Start the development server
npx expo start

# Run on Android device/emulator
npx expo start --android

Building for Production

This app uses EAS Build for creating production builds:

# Install EAS CLI (if not already installed)
npm install -g eas-cli

# Login to Expo
eas login

# Build AAB for Google Play Store
eas build --platform android --profile production

# Build APK for direct distribution
eas build --platform android --profile preview

πŸ“± Deployment

The app is published on Google Play Store. Legal documents (Privacy Policy and Terms of Service) are hosted on GitHub Pages for easy access and updates.

🀝 Contributing

Contributions, issues, and feature requests are welcome! Feel free to check the issues page.

Development Guidelines

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is MIT licensed.

πŸ‘€ Developer

Dark Lotus Dev

This app is committed to user privacy. All data is stored locally on your device and is never transmitted to external servers.

πŸ™ Acknowledgments


⭐ If you found this project helpful, please consider giving it a star on GitHub!