Native mobile app developed with Expo, React Native, NativeWind, Firebase, and Groq API.
App mobile nativa desenvolvida com Expo + React Native + NativeWind + Firebase + Groq API.
- Framework: React Native with Expo
- Styling: NativeWind (Tailwind for React Native)
- Database: Firebase Firestore
- Authentication: Firebase Authentication (email + Google Sign-In)
- Global State: Context API + AsyncStorage
- External APIs:
- Groq API for AI chat (mixtral-8x7b model)
- Open Food Facts API for food search
- Push Notifications: expo-notifications
- Camera & Barcode: expo-camera + expo-barcode-scanner
- Animations: react-native-reanimated and moti
- Navigation: @react-navigation/native-stack
- Install dependencies:
cd mobile
npm install- Configure environment variables:
Copy the
.env.examplefile to.envin themobile/folder and fill in your credentials:
cp .env.example .env
Never commit your real .env file to a public repository!
Important - Google Sign-In Configuration:
-
Go to the Google Cloud Console
-
Create a new project or select an existing one
-
Enable the "Google+ API" or "Google Identity" API
-
Go to "Credentials" > "Create Credentials" > "OAuth 2.0 Client ID"
-
Select "Web Application" as the type
-
Add the following authorized redirect URIs:
- For Expo Go:
https://auth.expo.io/@your-expo-username/nuti - For local development:
https://auth.expo.io/@anonymous/nuti - (Expo automatically generates the correct URI at runtime)
- For Expo Go:
-
Copy the "Client ID" and paste it into
EXPO_PUBLIC_GOOGLE_WEB_CLIENT_IDin your.env -
In the Firebase Console, go to Authentication > Sign-in method > Google
-
Enable the Google sign-in method and use the same Client ID from step 7
-
Add the same Client ID in the "Web SDK configuration"
-
Start the project:
npm startmobile/
├── App.tsx # Main app component
├── screens/ # Application screens
│ ├── LoginScreen.tsx
│ ├── RegisterScreen.tsx
│ ├── DashboardScreen.tsx
│ ├── AddMealScreen.tsx
│ ├── ChatScreen.tsx
│ ├── ProfileScreen.tsx
│ └── PremiumOnboardingScreen.tsx
├── components/ # Reusable components
│ ├── MealCard.tsx
│ ├── BadgeItem.tsx
│ └── ChartCircle.tsx
├── services/ # Services and APIs
│ ├── firebase.ts
│ ├── api.ts
│ └── gamification.ts
├── context/ # Context API
│ └── UserContext.tsx
├── utils/ # Utilities
│ ├── streakUtils.ts
│ └── formatters.ts
└── assets/ # Assets (images, icons)
- Login and registration with email/password
- Google Sign-In support
- Session management with AsyncStorage
- Circular chart for calories consumed / daily goal
- List of recent meals
- Current streak (consecutive days)
- Unlocked badges
- Floating button to add a meal
- Food search (Open Food Facts API)
- Take meal photo (expo-camera)
- Barcode scanning (expo-barcode-scanner)
- Save meal to Firestore
- Interactive chat with AI via Groq API
- History saved in Firestore
- Message limit for free users (5/day)
- Unlimited for Premium users
-
Streaks: +1 day if ≥3 meals registered
- Automatic badges:
- First Meal
- 3 Days in a Row
- Perfect Week (7 days)
- Perfect Month (30 days)
- 10 Meals
- 50 Meals
- Automatic badges:
- View and edit personal data
- View streak and badges
- Activate Premium (simulation)
-
Install Expo Go on your Android phone (Google Play Store)
-
Start the server:
cd mobile
npm start-
Connect your phone:
- Make sure your phone and computer are on the same Wi-Fi network
- Scan the QR code with Expo Go OR
- Enter the URL manually in Expo Go
-
Google Sign-In works automatically via web proxy (no SHA-1 needed)
To enable native Google Sign-In, you need the SHA-1:
Windows:
cd mobile/android
./get-sha1.ps1Linux/Mac:
cd mobile/android
chmod +x get-sha1.sh
./get-sha1.shManual:
cd mobile/android/app
keytool -list -v -keystore debug.keystore -alias androiddebugkey -storepass android -keypass androidThen configure in Google Cloud Console:
- Create OAuth 2.0 Client ID (Android type)
- Package name:
com.nuti.app - SHA-1: (paste the SHA-1 obtained)
- Add
EXPO_PUBLIC_GOOGLE_ANDROID_CLIENT_IDto your.env
Dev Client Build:
Local (requires Android Studio):
cd mobile
npx expo run:androidWith EAS (easier):
npm install -g eas-cli
eas login
cd mobile
eas build --platform android --profile development📖 Full guide: See TESTE_ANDROID.md for detailed instructions
- Firebase: Set up your Firebase project and add credentials to
.env - Groq API: Get your API key at https://console.groq.com
- Google Sign-In:
- For Expo Go: Uses Expo proxy (
auth.expo.io) - works automatically withEXPO_PUBLIC_GOOGLE_WEB_CLIENT_ID - For dev-client/standalone: Can use native login (requires additional setup in Google Console)
- The redirect URI is generated automatically by Expo at runtime
- Make sure the same Client ID is configured in the Firebase Console
- For Expo Go: Uses Expo proxy (
- Badges: Badges are initialized automatically on first run
- Environment Variables: Never commit the
.envfile - use.env.exampleas a reference
- Primary color: Green (#3BB273)
- Light/dark mode: Automatic based on system
- Modern and fluid UI with smooth animations
- Node.js 18+
- Expo CLI
- Android Studio (for Android builds)
- Expo account (for EAS Build)
- Never commit the
.envfile - Keep API keys secure
- Use environment variables for all credentials
Private project - All rights reserved
