- Flutter SDK (latest stable version)
- Firebase CLI
- Android Studio / Xcode (for mobile development)
- Git
- Go to Firebase Console
- Create a new project or use existing one
- Enable Authentication, Firestore, and Storage
dart pub global activate flutterfire_cliflutterfire configure- Copy your
google-services.jsonfrom Firebase Console - Place it in
android/app/google-services.json - NEVER commit this file to version control
- Download
GoogleService-Info.plistfrom Firebase Console - Add it to
ios/Runner/directory in Xcode - NEVER commit this file to version control
- Copy the template
lib/firebase_options.template.darttolib/firebase_options.dart - Replace placeholder values with your Firebase configuration
- NEVER commit the actual firebase_options.dart to version control
Create a .env file in the root directory (this file is gitignored):
# Firebase Configuration
FIREBASE_PROJECT_ID=your_project_id
FIREBASE_API_KEY=your_api_key
FIREBASE_MESSAGING_SENDER_ID=your_sender_id
# External APIs
EXCHANGE_RATE_API_KEY=your_exchange_rate_api_key- Clone the repository:
git clone <repository-url>
cd FileDoc_mini_admin- Install dependencies:
flutter pub get-
Set up Firebase configuration (see Firebase Setup above)
-
Run the app:
flutter run- Enable Email/Password authentication
- Configure OAuth providers if needed
Create the following collections:
users- User profiles and dataanalytics- User analytics datawithdrawals- Withdrawal requestsfiles- File metadata
- Configure storage rules for file uploads
- Set up appropriate security rules
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
// Users can only access their own data
match /users/{userId} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
// Analytics data - user specific
match /analytics/{userId}/{document=**} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
// Withdrawals - user specific
match /withdrawals/{document} {
allow read, write: if request.auth != null &&
request.auth.uid == resource.data.userId;
}
}
}rules_version = '2';
service firebase.storage {
match /b/{bucket}/o {
match /users/{userId}/{allPaths=**} {
allow read, write: if request.auth != null && request.auth.uid == userId;
}
}
}lib/
├── constant/ # App constants and colors
├── controllers/ # GetX controllers
├── model/ # Data models
├── screens/ # UI screens
├── services/ # Business logic services
├── widget/ # Reusable widgets
├── firebase_options.dart # Firebase configuration (DO NOT COMMIT)
└── main.dart # App entry point
- User authentication
- File management
- Analytics dashboard
- Billing and withdrawals
- Multi-platform support
- Configure signing keys
- Build release APK:
flutter build apk --release - Upload to Play Store
- Configure provisioning profiles
- Build for iOS:
flutter build ios --release - Upload to App Store
- Build for web:
flutter build web --release - Deploy to Firebase Hosting or your preferred platform
- Never commit Firebase configuration files
- Use environment variables for sensitive data
- Implement proper Firestore security rules
- Enable Firebase App Check for additional security
- Regular security audits of dependencies
- Firebase not initialized: Ensure firebase_options.dart is properly configured
- Build errors: Run
flutter clean && flutter pub get - Authentication issues: Check Firebase Auth configuration
- Check Flutter documentation
- Review Firebase documentation
- Create issues in the repository
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
[Add your license information here]