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