Skip to content

ishaan-khandelwal/CookSmart

Repository files navigation

CookSmart

CookSmart is an Expo React Native app for ingredient scanning, recipe discovery, favorites, and meal-planning flows. The mobile app uses Firebase Auth and an Express API backed by MongoDB for saved favorites and activity history.

Stack

  • Expo + React Native
  • Firebase Authentication
  • Express
  • MongoDB Atlas + Mongoose
  • Spoonacular API

App Setup

  1. Install the mobile app dependencies:
npm install
  1. Install the API dependencies:
npm --prefix server install
  1. Set the mobile app environment variables in the root .env file:
EXPO_PUBLIC_API_URL=http://YOUR_LOCAL_IP:5000
EXPO_PUBLIC_SPOONACULAR_API_KEY=your_spoonacular_key
EXPO_PUBLIC_ANTHROPIC_KEY=your_anthropic_key
  1. Set the API environment variables in server/.env:
PORT=5000
MONGODB_URI=mongodb+srv://username:[email protected]/cooksmart?retryWrites=true&w=majority
  1. Start the Mongo-backed API:
npm run server
  1. Start Expo in a second terminal:
npm start

MongoDB Integration

The Express API in server/src/index.js persists:

The mobile app reads and writes that data through src/services/api.js.

To verify the API is connected, open http://localhost:5000/health. A healthy response now includes the MongoDB connection state.

Notes

  • On a real phone, EXPO_PUBLIC_API_URL must use your computer's local network IP, not localhost.
  • Favorites are deduplicated per user and title to avoid duplicate saves from repeated taps.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors