You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A complete full-stack application for managing rural properties with geographic coordinates. The system provides a modern web interface for registering, viewing, editing, and deleting rural property records with integrated geographic data validation.
Business Context
Geographic Data Management: Store and manage rural property coordinates;
Real-time Validation: Frontend and backend validation for data integrity;
Single File Components: Vue components with template, script, and style;
Service Layer: API communication and business logic;
Reactive Data Binding: Two-way data binding with v-model;
Event Handling: Component communication through events.
Applied Patterns
Pattern
Application
Benefit
DTO
RuralPropertyRequestDTO
Contract separation
Repository
RuralPropertyRepository
Data abstraction
MVC
Overall architecture
Concern separation
Exception Handler
GlobalExceptionHandler
Centralized error handling
Implemented Features
Backend - Implemented Endpoints
Endpoint
Method
Description
Status
/api/properties
POST
Create new rural property
✅
/api/properties
GET
List all rural properties
✅
/api/properties/{id}
GET
Get property by ID
✅
/api/properties/{id}
PUT
Update existing property
✅
/api/properties/{id}
DELETE
Delete property
✅
Frontend - Features
Feature
Status
Details
Property registration form
✅ Implemented
Create new rural properties
Properties listing table
✅ Implemented
View all registered properties
Edit functionality
✅ Implemented
Update existing properties
Delete functionality
✅ Implemented
Remove properties
View details
✅ Implemented
Property information modal
Frontend validation
✅ Implemented
Mirroring backend constraints
Responsive design
✅ Implemented
Materialize CSS framework
Error handling
✅ Implemented
User-friendly messages
Green theme
✅ Implemented
Agriculture-inspired design
Technical Decisions and Trade-offs
Backend - Architectural Decisions
Decision
Justification
Trade-off
DTO Pattern
Clear API contract separation
Additional classes
Spring Validation
Standardized validation framework
Configuration complexity
Liquibase Migrations
Versioned database changes
Learning curve
OpenAPI Documentation
Automatic API documentation
Additional dependency
Frontend - UX/UI Decisions
Decision
Justification
Benefit
Vue.js with Options API
Simplicity for junior developers
Less reactive than Composition API
Materialize CSS
Consistent material design
Less customization flexibility
Axios for HTTP
Promise-based HTTP client
Additional dependency
Green color scheme
Agriculture thematic
Professional appearance
Validation Strategy
Backend Validation (Spring Boot)
// Entity validation matching frontend@NotBlank(message = "Property name is required")
@Size(max = 255, message = "Property name must not exceed 255 characters")
privateStringname;
@DecimalMin(value = "-90.0", message = "Latitude must be between -90 and 90")
@DecimalMax(value = "90.0", message = "Latitude must be between -90 and 90")
privateDoublelatitude;
@DecimalMin(value = "-180.0", message = "Longitude must be between -180 and 180")
@DecimalMax(value = "180.0", message = "Longitude must be between -180 and 180")
privateDoublelongitude;
@Positive(message = "Area must be positive")
privateDoubleareaHectares;
Frontend Validation (Vue.js)
✅ Name: Required, max 255 characters;
✅ Latitude: Optional, between -90 and 90;
✅ Longitude: Optional, between -180 and 180;
✅ Area: Required, positive value;
✅ Contextual error display: Errors shown only when relevant.
How to Run the Project
Prerequisites
Java 17+
Node.js 14+
Vue CLI 5+
Maven 3.6+
PostgreSQL 12+
1. Backend (Spring Boot)
# Navigate to backend directorycd rural-geodata-api
# Create and configure database connection in .env file# DATABASE_URL=jdbc:postgresql://localhost:5432/databasename# DATABASE_USERNAME=postgres # DATABASE_PASSWORD=yourpassword# Compile and run
mvn clean spring-boot:run
# Application available at: http://localhost:8080# API Documentation: http://localhost:8080/swagger-ui.html
2. Frontend (Vue.js)
# Navigate to frontend directorycd rural-geodata-web
# Install dependencies
npm install
# Run in development mode
npm run serve
# Application available at: http://localhost:8081
3. Database Setup
-- Database will be automatically created and populated-- via Liquibase migrations with sample data
4. API Testing (Postman)
# Import the Postman collection
File → Import → Select 'RuralProperty-API-Test-Collection.json'# Set environment variable
baseUrl = http://localhost:8080
# Run test suites to verify API functionality
Usage Examples
Backend - API Examples
1. Create Property
POST http://localhost:8080/api/propertiesContent-Type: application/json
{
"name": "Green Valley Farm",
"latitude": -15.841,
"longitude": -47.924,
"areaHectares": 120.5
}
2. List All Properties
GET http://localhost:8080/api/properties
{
"name": "Green Valley Farm",
"latitude": -15.841,
"longitude": -47.924,
"areaHectares": 120.5
}
{
"name": "Blue River Ranch",
"latitude": -16.052,
"longitude": -47.518,
"areaHectares": 85.3
}
3. Update Property
PUT http://localhost:8080/api/properties/1Content-Type: application/json
{
"name": "Green Valley Farm Updated",
"latitude": -15.842,
"longitude": -47.925,
"areaHectares": 125.0
}
Frontend - Usage Flow
Initial Access: System loads existing properties in table;
Create New: Fill form and click "Save" to register property;
🧩Full stack project that registers and lists rural properties with geographic data. Backend built with Spring Boot and PostgreSQL; frontend developed in Vue.js.