Petify is a complete Android e-commerce app built with Java + XML + Firebase Auth + Cloud Firestore + Firebase Storage, featuring real-time synchronization and two fully separated panels: User and Admin.
It includes Stripe API integration for real online payment processing.
Petify includes two synchronized environments powered by Firestore:
| Panel | Capabilities |
|---|---|
| π€ User Panel | Browse products, search, add to cart, manage favorites, view product details, manage profile |
| π§βπΌ Admin Panel | Add/edit/delete products, upload product images, view user orders, manage payments |
Both panels communicate with:
- Cloud Firestore for real-time database
- Firebase Storage for hosting images
- Firebase Authentication for secure login
- Stripe API for payments
- Java
- XML UI
- Android Studio
- Gradle
| Service | Usage |
|---|---|
| Authentication | Role-based login (User/Admin) |
| Firestore NoSQL DB | Products, users, orders, cart, favorites |
| Firestore Indexes | Optimized search & queries |
| Firebase Storage | Product images + Profile images |
| Firestore Rules | Secure per-user access control |
| API | Purpose |
|---|---|
| Stripe API | Secure online payment processing (credit cards and debit cards payment intents) |
Stripe will handle:
- Payment intents
- Payment confirmation
- Server-side verification
- Firestore update on payment success
- Email/Password login via Firebase
- Admin/User role mapping
- Auto redirect based on role
- Firestore-powered product list
- Search + instant filter
- Real-time image loading via URL & Storage
-
Toggle heart icon
-
Stored in
users/{uid}/favorites -
Favorites screen includes:
- Product title, category, price
- Add to Cart button
- Remove favorite
- Add/remove products
- Modify quantity
- Real-time syncing to Firestore
- Large image
- Description
- Favorite toggle
- Add to Cart
- Edit profile
- Change password
- Logout
- View order history
- Create new products
- Edit product details
- Delete products
- Upload product images β Firebase Storage
- See all user orders
- Inspect payment details
- Verify completed payments
- Support for Stripe API
users/
uid/
name: "John"
email: "[email protected]"
role: "user"
products/
productId/
title: "Dog Toy"
category: "Toys"
price: 12.99
description: "..."
imageUrl: "..."
createdAt: timestamp
users/{uid}/favorites/
productId/
productId: "..."
title: "..."
imageUrl: "..."
price: 12.99
createdAt: timestamp
users/{uid}/cartItems/
productId/
title: "..."
quantity: 2
price: 12.99
imageUrl: "..."
orders/
orderId/
userId: "uid"
items: [...]
totalPrice: ...
status: "pending" | "paid"
product_images/
productId.jpg
profile_images/
uid.jpg
Used by:
- Admin product creation
- User profile updates
Stripe integration will introduce:
- Initiate payment intents
- Display Stripeβs payment sheet
- Secure tokenization of card details
-
Cloud Function or backend service will:
-
Create payment intents
-
Verify success
-
Update Firestore:
orders/orderId/status: "paid"
-
- PCI-compliant card handling
- Strong authentication
- Support for credit/debit
- Automatic fraud detection
- Models β represent Firestore documents
- Adapters β efficient RecyclerView bindings
- FirebaseUtils β shared Firestore/Auth instances
- Activities β UI + user interactions, no business logic inside
- Subcollections β for favorites, cart, payments
Petify/
βββ app/
β βββ java/com/example/petify/
β β βββ User/
β β βββ Admin/
β β βββ Adapters/
β β βββ Models/
β β βββ FirebaseUtils.java
β βββ res/layout/
β βββ res/drawable/
β βββ res/values/
β βββ AndroidManifest.xml
βββ google-services.json
βββ build.gradle
βββ README.md
βββ .gitignore
- Clone:
git clone https://github.com/negarprh/Petify.git- Open in Android Studio
- Add your
google-services.jsonunder/app - Connect Firebase
- Sync + Run
Negar Pirasteh , Betty Dang




