A modern Spring Boot web application for creating, managing, and exploring dynamic color combinations. Built with responsive design and optimized for performance.
- Dynamic Color Combinations: Create combinations with 1-10 colors
- Real-time Color Management: Add, remove, and reorder colors dynamically
- Advanced Search: Search by name, hex values, color count, and date ranges
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- Performance Optimized: Database indexes and query optimization for fast searches
- Intuitive Color Picker: Easy-to-use color selection interface
- Live Preview: Real-time preview of color combinations
- Mobile-First Design: Touch-friendly interface for all devices
- Accessibility: WCAG compliant with keyboard navigation support
- Multi-language Support: Spanish interface with English documentation
- RESTful API: Complete REST API for programmatic access
- Data Validation: Comprehensive input validation and error handling
- Database Migration: Completed migration from legacy system
- Performance Monitoring: Built-in performance tracking and optimization
- Comprehensive Testing: Full test suite with integration and performance tests
- Java 17 or higher
- Gradle 8.0 or higher
- SQLite (included)
-
Clone the repository
git clone <repository-url> cd Kolors
-
Build the application
./gradlew build
-
Run the application
./gradlew bootRun
-
Access the application
- Web Interface: http://localhost:8080
- Color Combinations: http://localhost:8080/combinations/
- Admin Panel: http://localhost:8080/admin/migration/status
- Navigate to the main page at http://localhost:8080/combinations/
- Click "Nueva CombinaciΓ³n" to create a new combination
- Enter a name for your color combination (minimum 3 characters)
- Add colors using the color picker or hex input
- Save your combination
- Add Colors: Click the "+" button to add up to 10 colors
- Remove Colors: Click the "Γ" button next to any color (minimum 1 color required)
- Reorder Colors: Colors are automatically positioned and can be managed through the interface
- Edit Colors: Click on any color to modify its hex value
- Search by Name: Use the search box to find combinations by name
- Filter by Color Count: Use the dropdown to filter by number of colors
- Search by Hex: Enter hex values to find combinations containing specific colors
- Date Filtering: Filter combinations by creation date
The application is fully responsive and optimized for mobile devices:
- Touch-friendly color picker
- Swipe gestures for navigation
- Optimized layouts for small screens
- Fast loading on mobile networks
src/
βββ main/
β βββ java/dev/kreaker/kolors/
β β βββ ColorCombination.java # Main entity
β β βββ ColorInCombination.java # Color entity
β β βββ ColorCombinationController.java # Web controller
β β βββ ColorCombinationRestController.java # REST API
β β βββ ColorCombinationService.java # Business logic
β β βββ migration/ # Migration utilities
β β βββ exception/ # Custom exceptions
β βββ resources/
β βββ templates/ # Thymeleaf templates
β βββ static/css/ # Stylesheets
β βββ application.properties # Configuration
βββ test/ # Test suite
- Backend: Spring Boot 3.x, Spring Data JPA, Hibernate
- Frontend: Thymeleaf, Bootstrap 5, Responsive CSS
- Database: SQLite with optimized indexes
- Testing: JUnit 5, Spring Boot Test, MockMvc
- Build: Gradle with Spring Boot plugin
# Run all tests
./gradlew test
# Run specific test class
./gradlew test --tests ColorCombinationServiceTest
# Run with coverage
./gradlew test jacocoTestReportThe application uses a normalized database schema:
- color_combination: Main combinations table
- color_in_combination: Individual colors within combinations
- Optimized indexes for search performance
- Foreign key constraints for data integrity
Key configuration options in application.properties:
# Database
spring.datasource.url=jdbc:sqlite:kolors.db
spring.jpa.hibernate.ddl-auto=update
# Logging
logging.level.dev.kreaker.kolors=DEBUG
logging.level.org.hibernate.SQL=DEBUG
# Performance
spring.jpa.properties.hibernate.jdbc.batch_size=20
spring.jpa.properties.hibernate.order_inserts=trueSERVER_PORT: Application port (default: 8080)DATABASE_URL: Database connection URLLOG_LEVEL: Logging level (DEBUG, INFO, WARN, ERROR)
GET /api/combinations- List all combinationsGET /api/combinations/{id}- Get specific combinationPOST /api/combinations- Create new combinationPUT /api/combinations/{id}- Update combinationDELETE /api/combinations/{id}- Delete combination
POST /api/combinations/{id}/colors- Add color to combinationDELETE /api/combinations/{id}/colors/{position}- Remove colorPUT /api/combinations/{id}/colors/{position}- Update color
GET /api/combinations/search?name={name}- Search by nameGET /api/combinations/search?hex={hex}- Search by hex valueGET /api/combinations/search?colorCount={count}- Filter by color count
# Create a new combination
curl -X POST http://localhost:8080/api/combinations \
-H "Content-Type: application/json" \
-d '{"name": "Sunset Colors", "colors": [{"hexValue": "FF6B35", "position": 1}]}'
# Search combinations
curl "http://localhost:8080/api/combinations/search?name=sunset"
# Add a color to existing combination
curl -X POST http://localhost:8080/api/combinations/1/colors \
-H "Content-Type: application/json" \
-d '{"hexValue": "FF8C42", "position": 2}'# Create production JAR
./gradlew bootJar
# Run production build
java -jar build/libs/kolors-1.0.jarFROM openjdk:17-jdk-slim
COPY build/libs/kolors-1.0.jar app.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "/app.jar"]For production deployment:
- Set appropriate database configuration
- Configure logging levels
- Set up reverse proxy (nginx/Apache)
- Configure SSL certificates
- Set up monitoring and health checks
- Database Indexes: Optimized indexes for all search queries
- Query Optimization: Efficient JPA queries with proper joins
- Caching: Strategic caching for frequently accessed data
- Lazy Loading: Optimized entity relationships
- Batch Processing: Efficient bulk operations
- Search Response Time: < 100ms for typical queries
- Page Load Time: < 2s on mobile networks
- Database Query Time: < 50ms for indexed searches
- Memory Usage: Optimized for low memory footprint
- Unit Tests: Service layer and utility functions
- Integration Tests: Database operations and API endpoints
- Performance Tests: Load testing and optimization validation
- UI Tests: Web interface and responsive design
- End-to-End Tests: Complete user workflows
# Performance tests
./gradlew test --tests "*Performance*"
# Integration tests
./gradlew test --tests "*Integration*"
# UI validation tests
./gradlew test --tests "*UI*"The application has completed migration from the legacy KolorKombination system:
- β Migration Completed: All legacy data successfully migrated
- β Legacy Code Removed: All legacy classes and tables removed
- β Data Validated: Complete data integrity validation
- β System Optimized: Performance improvements implemented
Access the migration status at: http://localhost:8080/admin/migration/status
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for new functionality
- Ensure all tests pass (
./gradlew test) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow Java naming conventions
- Write comprehensive tests
- Update documentation for new features
- Use conventional commit messages
- Ensure responsive design for UI changes
This project is licensed under the MIT License with Attribution Requirement.
Key Points:
- β Free to use, modify, and distribute
- β Commercial use allowed
- β Private use allowed
β οΈ Attribution Required: Must credit "Original software by Kreaker.dev"
See the LICENSE file for complete details.
When using or modifying this software, include attribution such as:
- Footer: "Powered by Kolors - Original software by Kreaker.dev"
- About page: "Based on Kolors by Kreaker.dev"
- Documentation: "Original development by Kreaker.dev"
- Check Java version (requires Java 21+)
- Verify port 8080 is available
- Check database permissions
- Verify database indexes are created
- Check application logs for errors
- Ensure proper data format
- Clear browser cache
- Check responsive CSS loading
- Verify viewport meta tag
- Check the documentation
- Review performance optimizations
- Open an issue for bugs or feature requests
Kolors - Making color combination management simple and beautiful. π¨
(c) Alex Lopez Monzon for Kreaker Developments