Skip to content
Open

Dev #12

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .flutter-plugins-dependencies

Large diffs are not rendered by default.

77 changes: 71 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/

# IntelliJ related
*.iml
Expand All @@ -26,15 +29,9 @@
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/
pubspec.lock
.vscode

# Web related
lib/generated_plugin_registrant.dart

# Symbolication related
app.*.symbols
Expand All @@ -46,3 +43,71 @@ app.*.map.json
/android/app/debug
/android/app/profile
/android/app/release

# Firebase & Security Sensitive Files
android/app/google-services.json
ios/Runner/GoogleService-Info.plist
ios/firebase_app_id_file.json

# Environment & Configuration Files
.env
.env.local
.env.production
.env.development
config.json
secrets.json

# API Keys & Credentials
**/api_keys.dart
**/secrets.dart
**/credentials.json
**/service-account-key.json

# Keystore Files (Android signing)
*.keystore
*.jks
key.properties
android/key.properties

# iOS Signing & Certificates
ios/Runner/GoogleService-Info.plist
ios/Runner.xcodeproj/project.xcworkspace/xcuserdata/
ios/Runner.xcodeproj/xcuserdata/
ios/Pods/
ios/.symlinks/
*.mobileprovision
*.p12
*.cer

# Local Development
local.properties
android/local.properties

# Claude AI Assistant
.claude/
*.claude.json

# IDE & Editor
.vscode/settings.json
.vscode/launch.json
*.code-workspace

# OS Generated
Thumbs.db
ehthumbs.db
Desktop.ini
$RECYCLE.BIN/

# Temporary Files
*.tmp
*.temp
*.bak
*.swp
*~

# Log Files
logs/
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
137 changes: 137 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# BottleCRM - Claude Context

## Project Overview
- **Name**: BottleCRM
- **Platform**: Flutter
- **Version**: 1.0.0+1
- **Flutter SDK**: ^3.8.1
- **Design System**: Material Design
- **Icons**: Material Icons
- **Architecture**: Modern Flutter best practices

## Project Structure
- `/lib/` - Main Dart source code
- `/assets/` - Application assets (images, icons, fonts)
- `/android/` - Android-specific configuration
- `/ios/` - iOS-specific configuration
- `/web/` - Web platform configuration
- `/test/` - Unit and widget tests

## Development Guidelines

### Design & UI/UX
- Follow Material Design 3 principles
- Implement modern UI/UX best practices
- Maintain consistency across all screens
- Use responsive design for different screen sizes

#### Card & List Styling Guidelines
- **Flat Design**: Use flat, minimal card styling similar to Asana/Jira
- **No Shadows**: Avoid Card elevation/shadows; use Container with borders instead
- **AppBar Styling**: Keep AppBars transparent/white (no backgroundColor: inversePrimary)
- **List Items**: Use bottom borders (Colors.grey.shade200) for item separation
- **Dashboard Cards**: White background with subtle grey borders and 8px border radius
- **Task Cards**: Add left border with priority color (3px width) for visual hierarchy
- **Consistent Spacing**: Use 4px vertical margins for list items, 16px horizontal margins

#### Color Guidelines
- **Borders**: Use Colors.grey.shade200 for subtle separators
- **Priority Colors**: Green (low), Orange (medium), Red (high), Purple (urgent)
- **Status Colors**: Blue (new), Orange (contacted), Green (qualified), Red (lost)
- **Backgrounds**: White containers with minimal border styling

### Code Standards
- Follow Dart/Flutter naming conventions
- Use descriptive variable and function names
- Implement proper error handling
- Write clean, maintainable code
- Add appropriate comments for complex logic

### File & Folder Structure
- Organize files by feature/module
- Use proper naming conventions (snake_case for files)
- Keep related files grouped together
- Maintain clear separation of concerns

### Dependencies
- **Core**: Flutter SDK, Cupertino Icons
- **Development**: Flutter Test, Flutter Lints, Flutter Launcher Icons
- **Linting**: Enabled via analysis_options.yaml

## Common Commands
```bash
# Install dependencies
flutter pub get

# Run the app
flutter run

# Run tests
flutter test

# Build for release
flutter build apk --release
flutter build ios --release

# Generate icons
flutter pub run flutter_launcher_icons:main

# Analyze code
flutter analyze

# Format code
dart format .
```

## Key Features to Implement
- CRM functionality (contacts, leads, deals)
- User authentication and authorization
- Data synchronization
- Offline capability
- Modern dashboard with analytics
- Mobile-optimized user interface

## Testing Strategy
- Unit tests for business logic
- Widget tests for UI components
- Integration tests for user flows
- Use flutter_test framework

## API Architecture
- **Centralized URLs**: All API endpoints defined in `lib/config/api_config.dart`
- **HTTP Service**: Unified REST client in `lib/services/api_service.dart`
- **Authentication**: Google Sign-In + JWT tokens via `lib/services/auth_service.dart`
- **Models**: Type-safe API response models in `lib/models/api_models.dart`
- **Usage Examples**: See `lib/services/example_usage.dart` for implementation patterns

### API Usage Pattern
```dart
// Get data from API
final response = await ApiService().get(ApiConfig.contacts);
if (response.success) {
final contacts = response.data!.map((json) => Contact.fromJson(json)).toList();
}

// Authentication check
if (AuthService().isLoggedIn) {
// Make authenticated requests
}
```

## Dependencies Added
- `http: ^1.1.0` - HTTP client for API calls
- `google_sign_in: ^6.1.5` - Google authentication
- `shared_preferences: ^2.2.2` - Local storage for tokens
- `jwt_decoder: ^2.0.1` - JWT token handling

## Notes for AI Assistant
- Always use centralized API URLs from `ApiConfig`
- All REST requests must go through `ApiService`
- Handle authentication automatically via `AuthService`
- Use type-safe models for all API responses
- Follow Material Design guidelines
- Maintain consistent code style across the project
- Implement proper state management
- Consider mobile-first design principles
- Ensure accessibility compliance
- Use Flutter best practices for performance
28 changes: 28 additions & 0 deletions FIREBASE_SETUP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Firebase Setup

## Initial Setup for New Developers

1. **Google Services Configuration**:
- Copy `android/app/google-services.json.template` to `android/app/google-services.json`
- Replace all placeholder values with your actual Firebase project configuration
- Get this file from the Firebase Console > Project Settings > General > Your apps

2. **Required Configuration Files**:
- `android/app/google-services.json` - Firebase configuration for Android
- `ios/Runner/GoogleService-Info.plist` - Firebase configuration for iOS (if applicable)

3. **Environment Variables** (if using):
- Create `.env` file in project root
- Add your API keys and configuration

## Security Notes

- Never commit sensitive files like:
- `google-services.json`
- `GoogleService-Info.plist`
- `.keystore` files
- `key.properties`
- Any files containing API keys or secrets

- These files are in `.gitignore` for security reasons
- Use template files and environment variables for team development
Loading