A React Native mobile app for tracking cocoon prices per kg with breed-wise and market-wise filtering. Built with Expo and Firebase Firestore.
- 📊 Real-time cocoon price display
- 🏷️ Breed-wise filtering (CB, BV)
- 🏪 Market-wise filtering (Ramanagara, Kollegala, Kanakapura, Siddalagatta, Kollara)
- 📈 Price statistics (Min, Max, Average)
- 🔄 Pull-to-refresh functionality
- 📱 Responsive mobile design
- ⚡ Real-time updates from Firebase Firestore
npm install- Copy the environment template:
cp .env.example .env
- Go to Firebase Console
- Create a new project or select existing
- Enable Firestore Database
- Go to Project Settings > General > Your apps
- Add a web app and copy the config object
- Replace the values in
.envfile with your actual Firebase credentials
Create a collection named cocoonPrices with documents containing:
{
breed: string, // 'CB', 'BV'
market: string, // Market name
pricePerKg: number, // Current price per kg
minPrice: number, // Minimum price
maxPrice: number, // Maximum price
avgPrice: number, // Average price
quality: string, // 'A', 'B', 'C'
lastUpdated: timestamp
}import { seedAllData } from './seedDataFinal';
// Uncomment the function call in seedDataFinal.ts and run once
seedAllData();# Start Expo development server
npm start
# Run on Android
npm run android
# Run on iOS
npm run ios
# Run on Web
npm run web├── App.tsx # Main app component
├── firebase.config.ts # Firebase configuration
├── types/index.ts # TypeScript interfaces
├── utils/priceUtils.ts # Utility functions
├── seedData.ts # Sample data seeding
└── assets/ # App assets
- React Native
- Expo
- TypeScript
- Firebase Firestore
- React Hooks
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request