Overview
The Beehive Management feature allows you to track individual hives within your apiaries. Each beehive record captures essential information about hive health, activity levels, population, food stores, brood patterns, and production capacity.What is a Beehive?
In Softbee, a beehive represents a single colony of bees housed in a hive structure. Each beehive belongs to a specific apiary and contains detailed tracking information that helps beekeepers make informed management decisions.Beehive Entity
Each beehive contains comprehensive data about the colony:lib/feature/beehive/domain/entities/beehive.dart
Key Features
Add Hives
Register new beehives with detailed initial metrics
Track Activity
Monitor activity levels: Alta, Media, or Baja
Health Monitoring
Record health status and disease presence
Production Tracking
Track production chambers and honey collection
Beehive Attributes
Activity Level
Indicates how active the colony is:- Alta (High): Very active, bees coming and going frequently
- Media (Medium): Moderate activity, normal foraging
- Baja (Low): Reduced activity, potential issues
Low activity levels may indicate problems such as queenlessness, disease, or insufficient food stores.
lib/feature/beehive/domain/enums/beehive_enums.dart:1-8
Bee Population
Estimated population size of the colony:- Alta (High): Strong colony, many frames covered with bees
- Media (Medium): Average colony strength
- Baja (Low): Weak colony, few frames covered
lib/feature/beehive/domain/enums/beehive_enums.dart:10-17
Food Frames
Number of frames containing honey and pollen stores (0-10).Brood Frames
Number of frames containing eggs, larvae, and capped brood (0-10). Healthy colonies typically have:- Good brood pattern (solid, minimal gaps)
- Multiple ages of brood present
- 4-7 frames of brood during active season
Hive Status
Describes the physical configuration:- Cámara de cría y producción: Single brood/production chamber
- Cámara de cría y doble alza de producción: Brood chamber + 2 honey supers
- Cámara de cría: Brood chamber only
- Cámara de producción: Production chamber only
lib/feature/beehive/domain/enums/beehive_enums.dart:19-29
Health Status
Tracks disease and pest presence:- Ninguno (None): Healthy colony, no issues detected
- Presencia barroa: Varroa mite infestation
- Presencia de plagas: Other pests present (wax moths, beetles, etc.)
- Enfermedad: Disease symptoms detected
lib/feature/beehive/domain/enums/beehive_enums.dart:31-39
Production Chamber
Indicates whether a honey super is installed:- Si (Yes): Production chamber is present
- No (No): No production chamber currently
lib/feature/beehive/domain/enums/beehive_enums.dart:41-48
Creating a Beehive
Add new hives to your apiary through the hive management interface.Enter Hive Details
Fill in the beehive information:
- Hive Number: Unique identifier within the apiary
- Activity Level: Select Alta, Media, or Baja
- Population: Estimate bee population density
- Food Frames: Count frames with honey/pollen
- Brood Frames: Count frames with brood
- Hive Status: Select configuration type
- Health Status: Note any health concerns
- Production Chamber: Indicate if honey super is present
- Observations: Add any additional notes
lib/feature/beehive/presentation/widgets/beehive_form_dialog.dart
Viewing Beehives
The hive management screen displays all hives for a selected apiary.Dashboard Statistics
At the top of the hive list, you’ll see summary statistics:- Total Colmenas: Total number of hives in this apiary
- Alta Actividad: Count of hives with high activity
- Con Producción: Number of hives with production chambers
- Saludables: Hives with no health issues
Hive Cards
Each hive is displayed in a card showing:- Hive Number: Primary identifier
- Activity Level: Color-coded indicator (green=alta, amber=media, red=baja)
- Health Status: Warning icon if issues present
- Production Chamber Status: Indicator of honey super presence
- Observations: Any notes from last inspection
- Food/Brood Indicators: Visual progress circles (desktop view)
lib/feature/beehive/presentation/pages/beehive_management_page.dart:632-886
Responsive Design
The hive list adapts to screen size:- Desktop (1024px+): 2-column grid with detailed cards
- Tablet (768-1024px): Single column with medium-sized cards
- Mobile (768px and below): Stacked list with compact cards
Updating a Beehive
Modify hive records as conditions change during inspections.Regular updates help track hive health trends over time. Consider updating after each inspection or at least monthly during active season.
Deleting a Beehive
Remove hives that are no longer active (died, split, sold, etc.).
Implementation:
lib/feature/beehive/presentation/pages/beehive_management_page.dart:983-1012
Viewing Hive Details
See complete information about a beehive in a detail view. Detail View Shows:- All hive attributes
- Creation and last update timestamps
- Complete observation history
- Frame counts with visual indicators
lib/feature/beehive/presentation/pages/beehive_management_page.dart:1014-1068
Use Cases
The beehive feature implements standard CRUD operations:| Use Case | Purpose | Location |
|---|---|---|
CreateBeehiveUseCase | Add new hive to apiary | lib/feature/beehive/domain/usecases/create_beehive_usecase.dart |
GetBeehivesByApiaryUseCase | Fetch all hives for an apiary | lib/feature/beehive/domain/usecases/get_beehives_by_apiary_usecase.dart |
UpdateBeehiveUseCase | Modify hive data | lib/feature/beehive/domain/usecases/update_beehive_usecase.dart |
DeleteBeehiveUseCase | Remove hive from system | lib/feature/beehive/domain/usecases/delete_beehive_usecase.dart |
State Management
Beehive data is managed with Riverpod:beehives: List of all hives for current apiaryisLoading: Loading indicatorerrorMessage: Error displaysuccessMessage: Success notifications
lib/feature/beehive/presentation/controllers/beehive_controller.dart
Search and Filter
Quickly find specific hives using the search bar:- Search by hive number
- Search by observations text
- Real-time filtering as you type
lib/feature/beehive/presentation/pages/beehive_management_page.dart:392-465
Visual Indicators
Activity Level Colors
- Alta: Green (
Colors.green[700]) - Media: Amber (
Colors.amber[700]) - Baja: Red (
Colors.red[700])
Health Status Icons
- Ninguno: Green heart icon
- Any issues: Red warning icon
Progress Indicators (Desktop)
Food and brood frames are displayed as circular progress indicators:- Blue circle for food frames
- Orange circle for brood frames
- Visual percentage based on 10-frame standard
lib/feature/beehive/presentation/pages/beehive_management_page.dart:799-876
Integration with Monitoring
Beehive data integrates with the monitoring feature to:- Track health trends over time
- Answer inspection questions
- Generate reports
- Alert on potential issues
Best Practices
- Update hive records immediately after inspections while details are fresh
- Use the observations field to note anything unusual
- Track food frames carefully, especially before winter
- Monitor health status regularly to catch problems early
- Keep production chamber status current for accurate honey tracking
Data Architecture
Softbee follows Clean Architecture:lib/feature/beehive/data/repositories/beehive_repository_impl.dart
Data Source: lib/feature/beehive/data/datasources/beehive_remote_datasource.dart