Skip to content

Commit b4b0ada

Browse files
authored
Dev (#11)
* feat: Enhance BottleCRM Mobile with Google Sign-In integration and modular architecture - Updated README.md to reflect the new mobile app features, requirements, and setup instructions. - Modified android/app/google-services.json for updated project configuration. - Implemented Google Sign-In in auth_bloc.dart, replacing traditional login method. - Updated crm_services.dart to handle Google login requests with JWT token exchange. - Refactored login.dart to streamline the login process and improve UI/UX. - Added api_config.dart for environment-based API URL management. - Updated pubspec.yaml to include google_sign_in package dependency. - Revised widget tests to validate Google login functionality. - Created CLAUDE.md for project guidelines and architecture overview. * fix: Update API URLs for development and production environments; enhance Google login response handling and logging * feat: Update Google login integration; modify API endpoint and response handling; enhance organization role display * feat: Refactor Profile.fromJson to handle new Google login format and improve name parsing * feat: Add organization selection screen and dashboard functionality - Implemented OrganizationSelectionScreen for users to select their organization. - Created DashboardController to manage dashboard state and data loading. - Developed ModernDashboardScreen to display dashboard content with responsive layouts. - Introduced DashboardState classes to handle different states of the dashboard. - Updated utils to remove unnecessary profile data fetching after login. - Enhanced error handling and loading states across dashboard components. * feat: Add google-services.json to .gitignore to prevent sensitive data exposure * feat: Update .gitignore to include additional sensitive files and configuration settings * Remove sensitive configuration files * Add Windows runner and Flutter integration - Introduced CMake configuration for Windows Flutter application in `CMakeLists.txt`. - Created `generated_plugin_registrant` files for plugin registration. - Implemented the main application entry point in `main.cpp` and window management in `flutter_window.cpp` and `win32_window.cpp`. - Added resource files including application icon and manifest for Windows compatibility. - Established utility functions for console management and command line argument handling. - Ensured proper DPI scaling and theme support for the application window. - Set up build dependencies and linked necessary libraries for Flutter integration.
1 parent 821ec83 commit b4b0ada

File tree

281 files changed

+17387
-36497
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

281 files changed

+17387
-36497
lines changed

.flutter-plugins-dependencies

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

.gitignore

Lines changed: 71 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
*.swp
66
.DS_Store
77
.atom/
8+
.build/
89
.buildlog/
910
.history
1011
.svn/
12+
.swiftpm/
13+
migrate_working_dir/
1114

1215
# IntelliJ related
1316
*.iml
@@ -26,15 +29,9 @@
2629
.dart_tool/
2730
.flutter-plugins
2831
.flutter-plugins-dependencies
29-
.packages
3032
.pub-cache/
3133
.pub/
3234
/build/
33-
pubspec.lock
34-
.vscode
35-
36-
# Web related
37-
lib/generated_plugin_registrant.dart
3835

3936
# Symbolication related
4037
app.*.symbols
@@ -46,3 +43,71 @@ app.*.map.json
4643
/android/app/debug
4744
/android/app/profile
4845
/android/app/release
46+
47+
# Firebase & Security Sensitive Files
48+
android/app/google-services.json
49+
ios/Runner/GoogleService-Info.plist
50+
ios/firebase_app_id_file.json
51+
52+
# Environment & Configuration Files
53+
.env
54+
.env.local
55+
.env.production
56+
.env.development
57+
config.json
58+
secrets.json
59+
60+
# API Keys & Credentials
61+
**/api_keys.dart
62+
**/secrets.dart
63+
**/credentials.json
64+
**/service-account-key.json
65+
66+
# Keystore Files (Android signing)
67+
*.keystore
68+
*.jks
69+
key.properties
70+
android/key.properties
71+
72+
# iOS Signing & Certificates
73+
ios/Runner/GoogleService-Info.plist
74+
ios/Runner.xcodeproj/project.xcworkspace/xcuserdata/
75+
ios/Runner.xcodeproj/xcuserdata/
76+
ios/Pods/
77+
ios/.symlinks/
78+
*.mobileprovision
79+
*.p12
80+
*.cer
81+
82+
# Local Development
83+
local.properties
84+
android/local.properties
85+
86+
# Claude AI Assistant
87+
.claude/
88+
*.claude.json
89+
90+
# IDE & Editor
91+
.vscode/settings.json
92+
.vscode/launch.json
93+
*.code-workspace
94+
95+
# OS Generated
96+
Thumbs.db
97+
ehthumbs.db
98+
Desktop.ini
99+
$RECYCLE.BIN/
100+
101+
# Temporary Files
102+
*.tmp
103+
*.temp
104+
*.bak
105+
*.swp
106+
*~
107+
108+
# Log Files
109+
logs/
110+
*.log
111+
npm-debug.log*
112+
yarn-debug.log*
113+
yarn-error.log*

CLAUDE.md

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# BottleCRM - Claude Context
2+
3+
## Project Overview
4+
- **Name**: BottleCRM
5+
- **Platform**: Flutter
6+
- **Version**: 1.0.0+1
7+
- **Flutter SDK**: ^3.8.1
8+
- **Design System**: Material Design
9+
- **Icons**: Material Icons
10+
- **Architecture**: Modern Flutter best practices
11+
12+
## Project Structure
13+
- `/lib/` - Main Dart source code
14+
- `/assets/` - Application assets (images, icons, fonts)
15+
- `/android/` - Android-specific configuration
16+
- `/ios/` - iOS-specific configuration
17+
- `/web/` - Web platform configuration
18+
- `/test/` - Unit and widget tests
19+
20+
## Development Guidelines
21+
22+
### Design & UI/UX
23+
- Follow Material Design 3 principles
24+
- Implement modern UI/UX best practices
25+
- Maintain consistency across all screens
26+
- Use responsive design for different screen sizes
27+
28+
#### Card & List Styling Guidelines
29+
- **Flat Design**: Use flat, minimal card styling similar to Asana/Jira
30+
- **No Shadows**: Avoid Card elevation/shadows; use Container with borders instead
31+
- **AppBar Styling**: Keep AppBars transparent/white (no backgroundColor: inversePrimary)
32+
- **List Items**: Use bottom borders (Colors.grey.shade200) for item separation
33+
- **Dashboard Cards**: White background with subtle grey borders and 8px border radius
34+
- **Task Cards**: Add left border with priority color (3px width) for visual hierarchy
35+
- **Consistent Spacing**: Use 4px vertical margins for list items, 16px horizontal margins
36+
37+
#### Color Guidelines
38+
- **Borders**: Use Colors.grey.shade200 for subtle separators
39+
- **Priority Colors**: Green (low), Orange (medium), Red (high), Purple (urgent)
40+
- **Status Colors**: Blue (new), Orange (contacted), Green (qualified), Red (lost)
41+
- **Backgrounds**: White containers with minimal border styling
42+
43+
### Code Standards
44+
- Follow Dart/Flutter naming conventions
45+
- Use descriptive variable and function names
46+
- Implement proper error handling
47+
- Write clean, maintainable code
48+
- Add appropriate comments for complex logic
49+
50+
### File & Folder Structure
51+
- Organize files by feature/module
52+
- Use proper naming conventions (snake_case for files)
53+
- Keep related files grouped together
54+
- Maintain clear separation of concerns
55+
56+
### Dependencies
57+
- **Core**: Flutter SDK, Cupertino Icons
58+
- **Development**: Flutter Test, Flutter Lints, Flutter Launcher Icons
59+
- **Linting**: Enabled via analysis_options.yaml
60+
61+
## Common Commands
62+
```bash
63+
# Install dependencies
64+
flutter pub get
65+
66+
# Run the app
67+
flutter run
68+
69+
# Run tests
70+
flutter test
71+
72+
# Build for release
73+
flutter build apk --release
74+
flutter build ios --release
75+
76+
# Generate icons
77+
flutter pub run flutter_launcher_icons:main
78+
79+
# Analyze code
80+
flutter analyze
81+
82+
# Format code
83+
dart format .
84+
```
85+
86+
## Key Features to Implement
87+
- CRM functionality (contacts, leads, deals)
88+
- User authentication and authorization
89+
- Data synchronization
90+
- Offline capability
91+
- Modern dashboard with analytics
92+
- Mobile-optimized user interface
93+
94+
## Testing Strategy
95+
- Unit tests for business logic
96+
- Widget tests for UI components
97+
- Integration tests for user flows
98+
- Use flutter_test framework
99+
100+
## API Architecture
101+
- **Centralized URLs**: All API endpoints defined in `lib/config/api_config.dart`
102+
- **HTTP Service**: Unified REST client in `lib/services/api_service.dart`
103+
- **Authentication**: Google Sign-In + JWT tokens via `lib/services/auth_service.dart`
104+
- **Models**: Type-safe API response models in `lib/models/api_models.dart`
105+
- **Usage Examples**: See `lib/services/example_usage.dart` for implementation patterns
106+
107+
### API Usage Pattern
108+
```dart
109+
// Get data from API
110+
final response = await ApiService().get(ApiConfig.contacts);
111+
if (response.success) {
112+
final contacts = response.data!.map((json) => Contact.fromJson(json)).toList();
113+
}
114+
115+
// Authentication check
116+
if (AuthService().isLoggedIn) {
117+
// Make authenticated requests
118+
}
119+
```
120+
121+
## Dependencies Added
122+
- `http: ^1.1.0` - HTTP client for API calls
123+
- `google_sign_in: ^6.1.5` - Google authentication
124+
- `shared_preferences: ^2.2.2` - Local storage for tokens
125+
- `jwt_decoder: ^2.0.1` - JWT token handling
126+
127+
## Notes for AI Assistant
128+
- Always use centralized API URLs from `ApiConfig`
129+
- All REST requests must go through `ApiService`
130+
- Handle authentication automatically via `AuthService`
131+
- Use type-safe models for all API responses
132+
- Follow Material Design guidelines
133+
- Maintain consistent code style across the project
134+
- Implement proper state management
135+
- Consider mobile-first design principles
136+
- Ensure accessibility compliance
137+
- Use Flutter best practices for performance

FIREBASE_SETUP.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Firebase Setup
2+
3+
## Initial Setup for New Developers
4+
5+
1. **Google Services Configuration**:
6+
- Copy `android/app/google-services.json.template` to `android/app/google-services.json`
7+
- Replace all placeholder values with your actual Firebase project configuration
8+
- Get this file from the Firebase Console > Project Settings > General > Your apps
9+
10+
2. **Required Configuration Files**:
11+
- `android/app/google-services.json` - Firebase configuration for Android
12+
- `ios/Runner/GoogleService-Info.plist` - Firebase configuration for iOS (if applicable)
13+
14+
3. **Environment Variables** (if using):
15+
- Create `.env` file in project root
16+
- Add your API keys and configuration
17+
18+
## Security Notes
19+
20+
- Never commit sensitive files like:
21+
- `google-services.json`
22+
- `GoogleService-Info.plist`
23+
- `.keystore` files
24+
- `key.properties`
25+
- Any files containing API keys or secrets
26+
27+
- These files are in `.gitignore` for security reasons
28+
- Use template files and environment variables for team development

0 commit comments

Comments
 (0)