A modern link management system built with Java and hexagonal architecture principles.
LinkLift is a RESTful web service for managing web links with comprehensive CRUD operations. It features a clean, maintainable architecture that separates business logic from infrastructure concerns, making it highly testable and adaptable to changing requirements.
- π Link Management: Create and list web links with metadata
- ποΈ Clean Architecture: Hexagonal architecture with strict layer separation
- π Pagination & Sorting: Efficient data retrieval with flexible sorting options
- β‘ Event-Driven: Domain events for loose coupling and extensibility
- π§ͺ Comprehensive Testing: Unit, integration, and acceptance tests
- π‘οΈ Error Handling: Centralized exception handling with meaningful error codes
- π Database Agnostic: Repository pattern enables flexible data storage
- Java 17+ - Download here
- Maven 3.8+ - Installation guide
- Docker & Docker Compose - Get Docker
-
Clone the repository
git clone <repository-url> cd linklift
-
Start with Docker Compose (Recommended)
docker-compose up -d
-
Verify installation
curl http://localhost:7070/up # Expected: OK curl http://localhost:7070/api/v1/links # Expected: {"data": {"content": [], ...}, "message": "Links retrieved successfully"}
# 1. Start ArcadeDB
docker run -d --name arcadedb \
-p 2480:2480 -p 2424:2424 \
-e JAVA_OPTS="-Darcadedb.server.rootPassword=playwithdata" \
arcadedata/arcadedb:25.7.1
# 2. Build and run application
mvn clean package
java -jar target/linklift-1.0-SNAPSHOT.jarcurl -X PUT http://localhost:7070/api/v1/link \
-H "Content-Type: application/json" \
-d '{
"url": "https://github.com",
"title": "GitHub",
"description": "The world'\''s leading software development platform"
}'Response:
{
"link": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"url": "https://github.com",
"title": "GitHub",
"description": "The world's leading software development platform",
"extractedAt": "2025-08-15T18:12:39",
"contentType": "text/html"
},
"status": "Link received"
}# Basic listing
curl http://localhost:7070/api/v1/links
# With pagination and sorting
curl "http://localhost:7070/api/v1/links?page=0&size=10&sortBy=title&sortDirection=ASC"Response:
{
"data": {
"content": [...],
"page": 0,
"size": 10,
"totalElements": 25,
"totalPages": 3,
"hasNext": true,
"hasPrevious": false
},
"message": "Links retrieved successfully"
}LinkLift follows Hexagonal Architecture (Ports and Adapters) with clear separation between:
- Domain Layer: Pure business logic and rules
- Application Layer: Use cases and service coordination
- Infrastructure Layer: External adapters (web, database, events)
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Web Layer β β Application β β Persistence β
β (Javalin) ββββββ€ Services βββββΊβ (ArcadeDB) β
β β β β β β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β
βββββββββββββββββββ
β Domain Model β
β (Entities & β
β Events) β
βββββββββββββββββββ
- β Java 17: Modern language features and performance
- π Javalin: Lightweight, fast web framework
- ποΈ ArcadeDB: Multi-model database (Graph, Document, Key-Value)
- π¨ Maven: Build automation and dependency management
- π§ͺ JUnit 5: Modern testing framework with comprehensive assertions
- π³ Docker: Containerization for consistent environments
After starting the application with Docker Compose, you can access the web UI at:
http://localhost:80
Or simply:
http://localhost
The web interface allows you to view and add new links through a user-friendly React interface.
The web UI is built with React. If you want to develop the frontend separately:
# Navigate to the webapp directory
cd webapp
# Install dependencies
npm install
# Start development server
npm start
# Run tests
npm test
# Build for production
npm run buildThe React app includes:
- Component tests with React Testing Library
- API mocking for isolated testing
- Material UI for component styling
| Method | Endpoint | Description | Status |
|---|---|---|---|
| GET | /up |
Health check | β |
| PUT | /api/v1/link |
Create new link | β |
| GET | /api/v1/links |
List links (paginated) | β |
| Parameter | Type | Default | Description |
|---|---|---|---|
page |
Integer | 0 | Page number (0-based) |
size |
Integer | 20 | Items per page (max: 100) |
sortBy |
String | "extractedAt" | Sort field: id, url, title, description, extractedAt, contentType |
sortDirection |
String | "DESC" | Sort direction: ASC, DESC |
All errors return a consistent JSON format:
{
"status": 400,
"code": 1001,
"message": "Validation error",
"fieldErrors": {
"url": "URL cannot be empty"
},
"path": "/api/v1/link",
"timestamp": "2025-08-15T18:12:39"
}Common HTTP Status Codes:
200- Success201- Created400- Bad Request (validation errors)409- Conflict (duplicate URL)500- Internal Server Error
# Clean and build
mvn clean package
# Run tests
mvn test
# Run specific test
mvn test -Dtest=NewLinkServiceTest
# Run with coverage (if configured)
mvn test jacoco:reportsrc/
βββ main/java/it/robfrank/linklift/
β βββ Application.java # Main entry point
β βββ adapter/ # Infrastructure adapters
β β βββ in/web/ # REST controllers
β β βββ out/ # Database, event adapters
β βββ application/ # Application layer
β β βββ domain/ # Business logic
β β βββ port/ # Interface definitions
β βββ config/ # Configuration
βββ test/ # Test classes (mirrors main structure)
The project includes comprehensive testing at multiple levels:
Test Categories:
- Unit Tests: Fast, isolated tests for business logic
- Integration Tests: Tests with real database interactions
- Controller Tests: API endpoint testing using JavalinTest
# Run all tests
mvn test
# View test reports
open target/surefire-reports/index.html| Variable | Default | Description |
|---|---|---|
linklift.arcadedb.host |
localhost | ArcadeDB server hostname |
ArcadeDB Connection:
- Host: localhost:2480 (HTTP API)
- Database: linklift
- Username: root
- Password: playwithdata
Web UI: http://localhost:2480 (ArcadeDB Studio)
- π API Reference - Complete API documentation with examples
- ποΈ Architecture Guide - System design and architectural decisions
- π¨βπ» Developer Guide - Setup and development workflow
We welcome contributions! Please follow these steps:
- Fork the repository
- Create feature branch:
git checkout -b feature/amazing-feature - Make changes with tests
- Ensure tests pass:
mvn test - Commit with clear message:
git commit -m "feat: add amazing feature" - Push to fork:
git push origin feature/amazing-feature - Create Pull Request
- β Follow hexagonal architecture principles
- β Write tests for all new features
- β Use meaningful commit messages (Conventional Commits)
- β Update documentation as needed
- β Ensure code passes style checks
# Stop all services
docker-compose downThis project is licensed under the MIT License - see the LICENSE file for details.
Getting Help:
- π Check the Developer Guide for detailed setup
- π Create an Issue for bugs or feature requests
- π¬ Start a Discussion for questions
Built with β€οΈ using modern Java, clean architecture principles, and developer-friendly tools.
LinkLift is designed to be a solid foundation for link management that can evolve with your needs while maintaining clean architecture and high code quality.