Welcome to Citronix!
Citronix is a citrus farm management application designed to streamline operations for farmers by managing farms, fields, trees, harvests, and sales. The application incorporates advanced constraints to ensure data consistency and optimal productivity.
The primary business domains of Citronix are:
- Harvest Management: Organizes farms and their associated data.
- Field Management: Manages fields within farms, including constraints on size and number.
- Tree Management: Tracks trees, including planting dates, age, and productivity.
- Harvest Management: Oversees seasonal harvests and their details.
- Sales Management: Handles sales data, revenue calculations, and client information.
- Harvest Aggregate
- Root Entity:
Harvest
- Associated Entities:
Field
- Root Entity:
- Field Aggregate
- Root Entity:
Field
- Associated Entities:
Tree
- Root Entity:
- Tree Aggregate
- Root Entity:
Tree
- Associated Entities:
HarvestDetail
- Root Entity:
- Harvest Aggregate
- Root Entity:
Harvest
- Associated Entities:
HarvestDetail
,Tree
- Root Entity:
- Sales Aggregate
- Root Entity:
Sale
- Associated Entities:
Harvest
- Root Entity:
- Harvest Context: Handles CRUD operations for farms and fields, ensuring size constraints.
- Tree Context: Manages tree lifecycle, including planting, aging, and productivity calculations.
- Harvest Context: Oversees seasonal harvests and ensures trees are only harvested once per season.
- Sales Context: Tracks sales and calculates revenues.
- As a farm owner, I want to create, modify, and view farm details (name, location, size, creation date) to manage my farm efficiently.
- As a farm owner, I want to search for farms using multiple criteria to find specific information quickly.
- As a farm owner, I want to associate fields with farms while ensuring the total field area does not exceed the farm's area.
- As a farm owner, I want to ensure no field exceeds 50% of the farm's total area and the minimum size of 0.1 hectares.
- As a farm owner, I want to manage up to 10 fields per farm.
- As a farmer, I want to track trees by planting date, age, and field association to monitor their productivity.
- As a farmer, I want to calculate tree productivity based on their age:
- Young: 2.5 kg/season.
- Mature: 12 kg/season.
- Old: 20 kg/season.
- As a farmer, I want to ensure trees are planted only between March and May for optimal growth.
- As a farmer, I want to record one harvest per season per field to avoid duplicate entries.
- As a farmer, I want to track the quantity harvested from each tree.
- As a farm owner, I want to record sales details, including the client, date, unit price, and associated harvest.
- As a farm owner, I want to calculate revenue for each sale:
Revenue = Quantity * Unit Price
.
Triggered on feature/*
branches and pull requests to develop
or main
.
- Validates code with
mvn install -DskipTests
. - Runs unit tests with
mvn test
.
Triggered on merges to develop
or main
.
- Builds the application and Docker image.
- Deploys to a staging environment (on
develop
) or production environment (onmain
). - Runs integration tests in a Dockerized setup.
main
: Production-ready code.develop
: Integration branch for testing.
feature/EPIC-{number}/{epic-name}
: Major features or epics.feature/US-{number}/{feature-name}
: User stories within an epic.feature/ST-{number}/{subtask-name}
: Subtasks for a user story.
Format:
type(scope): subject
[optional body]
[optional footer]
Types:
feat
: New features.fix
: Bug fixes.docs
: Documentation updates.style
: Code style changes.refactor
: Code restructuring.test
: Adding tests.chore
: Maintenance tasks.
Example:
feat(farm): implement farm creation feature
- Add form for farm creation
- Include validation for name and size
JIRA: US-1.1
## Description
[Brief description of the changes]
## JIRA Ticket
- [EPIC-1] Harvest Domain Management
- [US-1.1] Harvest Registration
## Type of Change
- [ ] New feature
- [ ] Bug fix
- [ ] Refactoring
- [ ] Documentation
## Testing
- [ ] Unit tests added
- [ ] Integration tests added
- [ ] Manual testing performed
- [ ] Regression testing performed
## Checklist
- [ ] Code follows project style guidelines
- [ ] Documentation updated
- [ ] Tests passing
- [ ] PR is linked to JIRA ticket
-
Feature Development
- Start with
develop
. - Create a branch for the user story:
git checkout -b feature/US-1.1/farm-registration
- Start with
-
Code Validation
- Push code to the feature branch.
- The validation pipeline runs.
-
Merging to Develop
- Create a pull request to
develop
. - Trigger the build-and-deploy pipeline to the staging environment.
- Create a pull request to
-
Testing and Promotion
- After staging tests, create a PR from
develop
tomain
. - Trigger deployment to production on merge.
- After staging tests, create a PR from