A Flutter app for creating and managing personal story collections with Firebase Firestore integration.
- 📝 Create, edit, and delete personal stories
- 🌙 Light and dark theme support with system detection
- 💾 Cloud storage with offline persistence using Firebase Firestore
- 🎨 Material Design 3 with custom cream/beige color scheme
- 📱 Responsive UI with loading states and error handling
- 🔄 Pull-to-refresh functionality
- ⚙️ Settings screen for theme customization
- State Management: Provider pattern for reactive UI updates
- Database: Firebase Firestore with offline persistence
- Theme: Custom Material Design 3 themes with SharedPreferences persistence
- Navigation: Flutter's built-in navigation system
- Data Models: Immutable Story model with serialization support
lib/
├── models/
│ └── story.dart # Story data model
├── services/
│ └── firestore_service.dart # Firebase integration
├── controllers/
│ ├── story_controller.dart # Story state management
│ └── theme_controller.dart # Theme state management
├── theme/
│ └── app_theme.dart # Custom theme definitions
├── widgets/
│ ├── common_loading_state.dart
│ ├── common_empty_state.dart
│ └── story_card.dart # Story list item widget
├── screens/
│ ├── story_list_screen.dart # Main story list
│ ├── story_form_screen.dart # Create/edit stories
│ ├── story_detail_screen.dart # Story viewer
│ └── settings_screen.dart # App settings
└── main.dart # App entry point
- Flutter 3.32.8 or later
- Dart SDK
- Android Studio or VS Code with Flutter extensions
- Firebase project with Firestore enabled
-
Clone the repository
git clone <your-repo-url> cd little-stories
-
Install dependencies
flutter pub get
-
Firebase Setup
- Create a new Firebase project at Firebase Console
- Enable Firestore Database
- Add an Android app to your Firebase project
- Download the
google-services.jsonfile - Replace the placeholder file in
android/app/google-services.json
-
Update package name (optional)
- If you want to change the package name from
com.example.littlestories - Update
android/app/build.gradle(applicationId) - Update
android/app/src/main/AndroidManifest.xml - Update
android/app/src/main/kotlin/folder structure - Update Firebase project configuration
- If you want to change the package name from
-
Run the app
flutter run
The app uses Firebase Firestore for data persistence. The database structure is:
stories (collection)
├── {documentId}
├── title: string
├── content: string
├── createdAt: timestamp
└── updatedAt: timestamp
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /stories/{document} {
allow read, write: if true; // Update this for production
}
}
}Note: Update security rules for production to include proper authentication.
This project uses Conventional Commits:
feat:New featuresfix:Bug fixesdocs:Documentation changesstyle:Code style changesrefactor:Code refactoringtest:Adding testschore:Maintenance tasks
flutter testflutter build apk --release-
Firebase connection issues
- Verify
google-services.jsonis properly configured - Check internet connectivity
- Ensure Firestore is enabled in Firebase Console
- Verify
-
Build errors
- Run
flutter clean && flutter pub get - Check Flutter and Dart SDK versions
- Verify Android SDK is properly installed
- Run
-
Theme not persisting
- Check SharedPreferences permissions
- Verify theme controller initialization
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes using conventional commit style
- Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Flutter team for the excellent framework
- Firebase for cloud services
- Material Design team for design guidelines