Skip to content

Sypher845/sangam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

22 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Sangam - Ocean Conservation & Community Safety App

Sangam Logo

Empowering coastal communities through crowd-sourced reporting and real-time ocean safety information

Flutter Dart License


πŸ“– Table of Contents


🌊 About Sangam

Sangam is a comprehensive mobile application designed to protect ocean ecosystems and ensure the safety of coastal communities. The app combines crowd-sourced hazard reporting with real-time weather data and emergency services to create a safer, more informed maritime environment.

Mission

To empower fishermen, coastal residents, and ocean enthusiasts with the tools they need to report environmental hazards, access critical weather information, and stay safe while at sea.

Vision

A connected community working together to preserve our oceans and protect lives through technology and collaboration.


✨ Key Features

πŸ—ΊοΈ Interactive Map with Hazard Reporting

  • Real-time hazard visualization with Google Maps integration
  • Crowd-sourced reports from community members
  • Verified and unverified reports with distinct visual indicators
  • Location-based filtering (30km radius from your current location)
  • Hotspot circles showing hazard zones (12km for verified, 5km for unverified)
  • Report categories: Pollution, Water Quality, Marine Life, Plastic Waste, and more
  • Upvote system to validate community reports
  • Image attachments for visual evidence

🌀️ Weather & Ocean Conditions

  • Current weather data with beautiful gradient UI
  • 5-day weather forecast for planning ahead
  • Ocean-specific conditions:
    • Wind speed and direction
    • Visibility
    • Humidity
    • Atmospheric pressure
    • Sunrise and sunset times
  • Fishing Safety Indicator - AI-powered safety assessment based on:
    • Wind conditions (unsafe if > 25 km/h)
    • Visibility (unsafe if < 1 km)
    • Weather conditions (storms, heavy rain)
  • Location-aware weather using GPS

πŸ“Έ Camera Integration

  • Capture hazard photos directly from the app
  • Image upload with reports for verification
  • Gallery access for existing photos
  • Permission handling for camera and storage

🚨 Emergency Helpline

  • 24/7 emergency contact (9420473470)
  • One-tap calling for urgent situations
  • Water-related emergency assistance
  • Hazard reporting support

🌐 Multi-language Support

  • Real-time translation of all app content
  • Support for multiple languages to reach diverse communities
  • Seamless language switching
  • Localized user experience

πŸ‘€ User Authentication & Dashboard

  • Secure login and signup system
  • User profiles with personalized dashboards
  • Report history tracking
  • Activity monitoring
  • Session management

πŸ“ Location Services

  • GPS integration for accurate positioning
  • Automatic location detection
  • Permission management
  • Offline location caching

πŸš€ Getting Started

Prerequisites

Before you begin, ensure you have the following installed:

  • Flutter SDK (3.10.1 or higher) - Install Flutter
  • Dart SDK (3.10.1 or higher) - Comes with Flutter
  • Android Studio or VS Code with Flutter extensions
  • Git for version control
  • A physical device or emulator for testing

System Requirements

  • Windows: Windows 10 or later
  • macOS: macOS 10.14 or later
  • Linux: 64-bit distribution
  • Disk Space: At least 2.8 GB (excluding IDE/tools)
  • RAM: Minimum 4 GB recommended

πŸ“₯ Installation

1. Clone the Repository

git clone https://github.com/yourusername/sangam.git
cd sangam

2. Install Dependencies

flutter pub get

3. Verify Flutter Installation

flutter doctor

Fix any issues reported by Flutter Doctor before proceeding.

4. Run the App

For Android:

flutter run

For iOS:

cd ios
pod install
cd ..
flutter run

For Web:

flutter run -d chrome

βš™οΈ Configuration

🌦️ Weather API Setup (Required)

The weather feature requires a free API key from OpenWeatherMap. Follow these steps:

Step 1: Get Your API Key

  1. Visit OpenWeatherMap
  2. Sign up for a free account
  3. Verify your email address
  4. Navigate to API Keys
  5. Copy your API key

Step 2: Configure the App

  1. Open lib/services/weather_service.dart
  2. Find the line:
    static const String _apiKey = 'YOUR_API_KEY_HERE';
  3. Replace YOUR_API_KEY_HERE with your actual API key:
    static const String _apiKey = 'a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6';
  4. Save the file

Note: New API keys may take 10-15 minutes to activate.

πŸ“ Google Maps API Setup (Required for Android/iOS)

For Android:

  1. Get a Google Maps API key from Google Cloud Console
  2. Open android/app/src/main/AndroidManifest.xml
  3. Add your API key:
    <meta-data
        android:name="com.google.android.geo.API_KEY"
        android:value="YOUR_GOOGLE_MAPS_API_KEY"/>

For iOS:

  1. Open ios/Runner/AppDelegate.swift
  2. Add your API key:
    GMSServices.provideAPIKey("YOUR_GOOGLE_MAPS_API_KEY")

πŸ” Permissions Configuration

The app requires the following permissions (already configured in the project):

Android (android/app/src/main/AndroidManifest.xml):

  • ACCESS_FINE_LOCATION - GPS location
  • ACCESS_COARSE_LOCATION - Network location
  • CAMERA - Photo capture
  • INTERNET - API calls
  • WRITE_EXTERNAL_STORAGE - Save photos
  • READ_EXTERNAL_STORAGE - Access gallery

iOS (ios/Runner/Info.plist):

  • NSLocationWhenInUseUsageDescription - Location access
  • NSCameraUsageDescription - Camera access
  • NSPhotoLibraryUsageDescription - Photo library access

πŸ“– How to Use

🏠 Home Screen - Map & Reports

  1. View Hazard Reports

    • Open the app to see the interactive map
    • Red circles indicate verified hazards (12km radius)
    • Gray circles indicate unverified reports (5km radius)
    • Blue dot shows your current location
  2. Submit a Report

    • Tap the camera/report button
    • Take a photo of the hazard
    • Select hazard type (Pollution, Water Quality, etc.)
    • Add description
    • Submit report
  3. Upvote Reports

    • Scroll through the reports list at the bottom
    • Tap the upvote button to validate reports
    • Verified reports (with enough upvotes) appear in green
  4. View Report Details

    • Tap on any report card to expand
    • See full description, images, and location
    • Check verification status and upvote count

🌀️ Weather Screen

  1. Check Current Conditions

    • Navigate to the Weather tab
    • View current temperature, feels-like, and conditions
    • See weather icon representing current state
  2. Fishing Safety

    • Check the safety indicator card
    • Green "Safe" = Good conditions for fishing
    • Red "Unsafe" = Dangerous conditions (high winds, poor visibility, storms)
  3. Detailed Ocean Conditions

    • Wind speed and direction
    • Humidity percentage
    • Visibility distance
    • Atmospheric pressure
    • Sunrise and sunset times
  4. 5-Day Forecast

    • Scroll down to see upcoming weather
    • Each day shows temperature, conditions, and safety status
    • Plan your activities accordingly
  5. Refresh Data

    • Pull down to refresh
    • Or tap the refresh icon in the header

🚨 Emergency Screen

  1. Access Emergency Services

    • Navigate to the Emergency tab
    • View the 24/7 helpline number: 9420473470
  2. Make Emergency Call

    • Tap the "Call Now" button
    • Your phone will dial the emergency number
    • Available for water-related emergencies and hazard reporting
  3. Emergency Information

    • Read the information card for guidance
    • Available 24/7 for immediate assistance

πŸ‘€ User Dashboard

  1. Access Your Profile

    • Tap the profile icon in the top-right corner
    • View your account information
    • See your report history
    • Check activity statistics
  2. Manage Settings

    • Change language preferences
    • Update profile information
    • Manage notifications
    • Log out

🌐 Language Settings

  1. Change Language
    • Access settings from the dashboard
    • Select your preferred language
    • All text will be translated in real-time
    • Supports multiple regional languages

πŸ—οΈ App Architecture

Project Structure

sangam/
β”œβ”€β”€ android/              # Android-specific files
β”œβ”€β”€ ios/                  # iOS-specific files
β”œβ”€β”€ lib/
β”‚   β”œβ”€β”€ constants/        # App constants and configurations
β”‚   β”œβ”€β”€ extensions/       # Dart extensions
β”‚   β”œβ”€β”€ models/          # Data models
β”‚   β”‚   β”œβ”€β”€ tweet_model.dart      # Report/Tweet data structure
β”‚   β”‚   └── weather_model.dart    # Weather data structure
β”‚   β”œβ”€β”€ providers/       # State management (Provider pattern)
β”‚   β”‚   β”œβ”€β”€ auth_provider.dart    # Authentication state
β”‚   β”‚   β”œβ”€β”€ user_provider.dart    # User data state
β”‚   β”‚   └── language_provider.dart # Language state
β”‚   β”œβ”€β”€ screens/         # UI screens
β”‚   β”‚   β”œβ”€β”€ home_screen.dart           # Map & reports
β”‚   β”‚   β”œβ”€β”€ weather_screen.dart        # Weather & forecast
β”‚   β”‚   β”œβ”€β”€ emergency_screen.dart      # Emergency helpline
β”‚   β”‚   β”œβ”€β”€ camera_capture_page.dart   # Photo capture
β”‚   β”‚   β”œβ”€β”€ user_dashboard_screen.dart # User profile
β”‚   β”‚   β”œβ”€β”€ citizen_login_screen.dart  # Login
β”‚   β”‚   β”œβ”€β”€ citizen_signup_screen.dart # Registration
β”‚   β”‚   └── getting_started_screen.dart # Onboarding
β”‚   β”œβ”€β”€ services/        # Business logic & API calls
β”‚   β”‚   β”œβ”€β”€ api_service.dart          # Base API service
β”‚   β”‚   β”œβ”€β”€ auth_service.dart         # Authentication
β”‚   β”‚   β”œβ”€β”€ tweet_service.dart        # Report management
β”‚   β”‚   β”œβ”€β”€ weather_service.dart      # Weather API
β”‚   β”‚   β”œβ”€β”€ translation_service.dart  # Language translation
β”‚   β”‚   β”œβ”€β”€ permission_service.dart   # Permission handling
β”‚   β”‚   └── storage_service.dart      # Local storage
β”‚   β”œβ”€β”€ widgets/         # Reusable UI components
β”‚   β”‚   └── translated_text.dart      # Auto-translating text widget
β”‚   └── main.dart        # App entry point
β”œβ”€β”€ assets/              # Images, icons, and resources
β”œβ”€β”€ test/                # Unit and widget tests
β”œβ”€β”€ pubspec.yaml         # Dependencies and configuration
└── README.md            # This file

State Management

The app uses Provider for state management:

  • AuthProvider - Manages authentication state
  • UserProvider - Manages user data and session
  • LanguageProvider - Manages language preferences

Data Flow

  1. User Action β†’ UI Screen
  2. Screen β†’ Service (API call or local operation)
  3. Service β†’ Provider (update state)
  4. Provider β†’ UI (rebuild with new data)

πŸ› οΈ Technologies Used

Core Framework

  • Flutter 3.10.1+ - Cross-platform UI framework
  • Dart 3.10.1+ - Programming language

Key Dependencies

Package Version Purpose
provider ^6.1.1 State management
google_maps_flutter ^2.5.0 Interactive maps
geolocator ^12.0.0 GPS location services
camera ^0.10.5+9 Photo capture
http ^1.2.2 API communication
translator ^1.0.4+1 Multi-language support
url_launcher ^6.3.1 Phone calls & links
permission_handler ^11.3.1 Permission management
shared_preferences ^2.3.2 Local data storage
path_provider ^2.1.4 File system access
flutter_svg ^2.0.10+1 SVG image support
cupertino_icons ^1.0.8 iOS-style icons

External APIs

  • OpenWeatherMap API - Weather data and forecasts
  • Google Maps API - Map visualization and location services
  • Custom Backend API - User authentication and report management

🀝 Contributing

We welcome contributions from the community! Here's how you can help:

Reporting Issues

  1. Check if the issue already exists
  2. Create a detailed bug report with:
    • Steps to reproduce
    • Expected behavior
    • Actual behavior
    • Screenshots (if applicable)
    • Device and OS information

Submitting Pull Requests

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Code Style

  • Follow Dart style guide
  • Use meaningful variable and function names
  • Add comments for complex logic
  • Write unit tests for new features

πŸ› Troubleshooting

Common Issues

Issue: Weather data not loading

  • Solution: Check your OpenWeatherMap API key and ensure it's activated (wait 10-15 minutes after creation)

Issue: Location not detected

  • Solution: Enable location services in device settings and grant permission to the app

Issue: Map not displaying

  • Solution: Verify Google Maps API key is correctly configured in AndroidManifest.xml or AppDelegate.swift

Issue: Camera not working

  • Solution: Grant camera permission in device settings

Issue: Build errors after flutter pub get

  • Solution: Run flutter clean then flutter pub get again

πŸ“ž Support

Need Help?

Community


πŸ“„ License

This project is private and proprietary. All rights reserved.


πŸ™ Acknowledgments

  • OpenWeatherMap for providing weather data API
  • Google Maps Platform for mapping services
  • Flutter Community for excellent packages and support
  • Coastal Communities for their valuable feedback and testing
  • All Contributors who have helped make Sangam better

πŸ—ΊοΈ Roadmap

Upcoming Features

  • Push notifications for nearby hazards
  • Offline mode with cached data
  • Social sharing of reports
  • Advanced analytics dashboard
  • Integration with coast guard services
  • Marine life identification using AI
  • Tide predictions
  • Ocean current information
  • Community forums
  • Gamification and rewards system

πŸ“Š Version History

Version 1.0.0 (Current)

  • Initial release
  • Interactive map with hazard reporting
  • Weather and ocean conditions
  • Emergency helpline
  • Multi-language support
  • User authentication
  • Camera integration

Made with ❀️ for Ocean Conservation

Protecting our oceans, one report at a time

⬆ Back to Top

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors