Skip to content

madank21/Grocify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

158 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ›’ Grocify

Grocify is a modern, cross-platform grocery list management application built with React Native and Expo. It helps users organize, track, and optimize their grocery shopping with powerful features like categorization, priority management, purchase tracking, and insights.


πŸš€ Features

  • βœ… Create, update, and delete grocery items
  • πŸ—‚οΈ Categorize items (produce, dairy, etc.)
  • ⭐ Set priority levels (low, medium, high)
  • βœ”οΈ Track purchased items
  • πŸ“Š Insights dashboard for shopping analytics
  • 🍽️ Meal planner integration
  • πŸ” Secure authentication with social login
  • ⚑ Optimistic UI updates for smooth UX

πŸ—οΈ Tech Stack

πŸ“± Frontend

  • React Native (Expo)
  • Expo Router (file-based navigation)
  • TypeScript

🎨 UI & Styling

  • NativeWind (Tailwind CSS for React Native)
  • Expo Linear Gradient
  • Expo Blur
  • React Native Reanimated

🧠 State Management

  • Zustand

πŸ” Authentication

  • Clerk (Google, GitHub, Apple login)
  • Expo Secure Store

πŸ—„οΈ Backend & Database

  • Neon (Serverless PostgreSQL)
  • Drizzle ORM (type-safe queries)
  • Drizzle Kit (migrations & schema)

πŸ“‘ API Layer

  • Expo Router API Routes (server-side logic)

πŸ“Š Monitoring

  • Sentry (error tracking & performance monitoring)

🧩 Architecture Overview

Grocify follows a modern full-stack mobile architecture:

src/
β”œβ”€β”€ app/                # Routes & layouts (Expo Router)
β”œβ”€β”€ components/         # Reusable UI components
β”œβ”€β”€ hooks/              # Custom hooks
β”œβ”€β”€ lib/server/         # Database & server logic
β”œβ”€β”€ store/              # Zustand state management

Key Concepts

  • File-based routing using Expo Router
  • API routes for CRUD operations
  • Type-safe database layer with Drizzle ORM
  • Centralized state management with Zustand
  • Secure authentication flow with Clerk

πŸ” Authentication Flow

  1. User selects a social login provider
  2. Clerk handles OAuth authentication
  3. Session is created and securely stored
  4. User is redirected to the main app

πŸ—„οΈ Database Schema

The app uses a grocery_items table:

Field Type Description
id UUID Primary key
name String Item name
category String Item category
quantity Number Item quantity
purchased Boolean Purchase status
priority String Priority level
updated_at Timestamp Last updated time

πŸ“‘ API Endpoints

Method Endpoint Description
GET /api/items Fetch all items
POST /api/items Create new item
PATCH /api/items/:id Update item
DELETE /api/items/:id Delete item
POST /api/items/clear-purchased Clear purchased items

βš™οΈ Getting Started

1️⃣ Clone the Repository

git clone https://github.com/your-username/grocify.git
cd grocify

2️⃣ Install Dependencies

npm install

3️⃣ Setup Environment Variables

Create a .env file and add:

EXPO_PUBLIC_CLERK_PUBLISHABLE_KEY=your_key
DATABASE_URL=your_neon_database_url
SENTRY_DSN=your_sentry_dsn

4️⃣ Run the App

npm start

Then open in:

  • Android Emulator
  • iOS Simulator
  • Expo Go

πŸ› οΈ Development Workflow

Database Changes

npm run db:push

Seed Database

npm run seed:grocery

Run on Device

npm run android
npm run ios

πŸ“Š Future Improvements

  • 🧾 Smart recommendations using AI
  • πŸ“¦ Inventory tracking
  • πŸ›οΈ Budget management
  • πŸ”” Notifications & reminders
  • 🌐 Offline support

🀝 Contributing

Contributions are welcome!

  1. Fork the repo
  2. Create your feature branch
  3. Commit your changes
  4. Push to your branch
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License.


πŸ’‘ Acknowledgements

  • Expo team for amazing tooling
  • Clerk for authentication
  • Neon & Drizzle for backend simplicity

πŸ“¬ Contact

If you have feedback or ideas, feel free to reach out!


⭐ If you like this project, don't forget to star the repo!

About

Grocify is a modern, cross-platform grocery list management application built with React Native and Expo. It helps users organize, track, and optimize their grocery shopping with powerful features like categorization, priority management, purchase tracking, and insights.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors