A comprehensive text analysis and security platform built with Java and Spring Boot, featuring advanced emoji detection, money symbol extraction, and parallel processing capabilities.
- 🔍 Advanced Text Analysis: Emoji detection and tagging with parallel processing support
- 💰 Money Symbol Extraction: Automatic calculation of monetary values from text
- 🛡️ Security Features: Spring Security with password encoding
- 🗄️ Database Integration: Oracle and H2 database support with HikariCP connection pooling
- ✅ Comprehensive Testing: 39 unit tests with 100% pass rate
- 🐳 Docker Support: Multi-stage containerized deployment ready
- 🌐 Web Interface: Modern Bootstrap-based UI with responsive design
- 📊 Health Monitoring: Actuator endpoints for application monitoring
- 🎮 Gamified Quiz: Interactive quiz with animations and scoring
- 🌍 Multilingual Support: English and French language support
- 🎨 Light/Dark Mode: User-selectable light and dark themes
- Java 17 - Modern LTS Java version
- Spring Boot 3.2 - Enterprise-grade framework
- Spring Security - Authentication and authorization
- Spring Data JPA - Database abstraction layer
- Thymeleaf - Server-side template engine
- Maven - Build and dependency management
- Oracle Database - Production database
- H2 Database - Development and testing
- HikariCP - High-performance connection pool
- Bootstrap 5.3 - Responsive CSS framework
- Font Awesome 6.0 - Icon library
- Vanilla JavaScript - Client-side interactions
- Docker - Containerization
- Docker Compose - Multi-container orchestration
- Nginx - Reverse proxy and load balancing
- Maven - Build automation
- JUnit 5 - Unit testing framework
- AssertJ - Fluent assertion library
- Spring Boot Test - Integration testing
- Java 17 or higher
- Maven 3.6+
- Docker (optional, for containerized deployment)
# Clone the repository
git clone https://github.com/Kvnbbg/bookish-octo-invention.git
cd bookish-octo-invention
# Build the application
mvn clean package
# Run the application
java -jar target/bookish-octo-invention-1.0.0.jar
# Run directly with Maven
mvn spring-boot:run
# Build and run with Docker Compose
docker-compose up -d
# Or build Docker image manually
docker build -t bookish-octo-invention .
docker run -p 8080:8080 bookish-octo-invention
- Web Application: http://localhost:8080
- Text Scanner: http://localhost:8080/scan
- Health Check: http://localhost:8080/health
- H2 Console: http://localhost:8080/h2-console (dev mode)
- Actuator Health: http://localhost:8080/actuator/health
Method | Endpoint | Description |
---|---|---|
GET |
/scan |
Text scanner web interface |
POST |
/scan/analyze |
Analyze text (sequential processing) |
POST |
/scan/analyze-parallel |
Analyze text (parallel processing) |
GET |
/scan/demo |
Demo analysis with sample data |
Method | Endpoint | Description |
---|---|---|
GET |
/ |
Home page |
GET |
/about |
About page with project information |
GET |
/health |
Health check page |
GET |
/actuator/health |
Actuator health endpoint |
Request:
curl -X POST http://localhost:8080/scan/analyze \
-H "Content-Type: application/json" \
-d '{
"items": [
"💰100",
"Text 😊",
"🔥 Emergency",
"💰50",
"Note"
]
}'
Response:
{
"tagged": [
"💰100 🔹Emoji:💰",
"Text 😊 🔹Emoji:😊",
"🔥 Emergency 🔹Emoji:🔥",
"💰50 🔹Emoji:💰",
"Note"
],
"total": 150
}
H2 Configuration (Default - Development)
spring.datasource.url=jdbc:h2:mem:testdb
spring.datasource.username=sa
spring.datasource.password=password
spring.h2.console.enabled=true
Oracle Configuration (Production)
spring.datasource.url=jdbc:oracle:thin:@localhost:1521:xe
spring.datasource.username=your_username
spring.datasource.password=your_password
spring.datasource.driver-class-name=oracle.jdbc.OracleDriver
The application is secured using Spring Security. User credentials are encrypted using BCrypt.
Default Credentials:
- user: password
- admin: admin
Environment Variables:
SPRING_PROFILES_ACTIVE=docker
JAVA_OPTS=-Xmx512m -Xms256m
Docker Compose Services:
app
: Main Spring Boot applicationnginx
: Reverse proxy with SSL terminationoracle-db
: Oracle database (optional)
# Run all tests
mvn test
# Run tests with coverage
mvn test jacoco:report
# Run specific test class
mvn test -Dtest=ScanResultTest
- 39 tests with 100% pass rate
- Comprehensive coverage including:
- ✅ Empty input handling
- ✅ Emoji tagging functionality
- ✅ Money total calculation
- ✅ Mixed emoji and money items
- ✅ Malformed money tags edge cases
- ✅ Parallel stream execution
- ✅ Unicode edge cases
- ✅ Large dataset performance
- ✅ Immutability verification
Supports detection and tagging of various emojis:
- 🔥 Fire emoji
- 😊 Smiling face
- 💰 Money bag
- 🎉 Party popper
- ❤️ Heart
- And many more Unicode emojis...
- Pattern Recognition: Detects 💰 symbols followed by numbers
- Decimal Support: Handles both integer and decimal values
- Parallel Processing: Optimized for large datasets
- Accurate Summation: Precise monetary calculations
- Parallel Streams: Utilizes multi-core processing
- Memory Efficient: Optimized for large text datasets
- Immutable Results: Thread-safe result objects
- Caching: Intelligent caching for repeated operations
bookish-octo-invention/
├── src/
│ ├── main/
│ │ ├── java/com/example/
│ │ │ ├── BookishOctoInventionApplication.java
│ │ │ ├── controller/
│ │ │ │ ├── HomeController.java
│ │ │ │ └── ScanController.java
│ │ │ ├── san/
│ │ │ │ ├── SAN.java
│ │ │ │ ├── ScanResult.java
│ │ │ │ └── ScanResultGatherer.java
│ │ │ └── security/
│ │ └── resources/
│ │ ├── templates/
│ │ │ ├── index.html
│ │ │ ├── scan.html
│ │ │ ├── about.html
│ │ │ └── health.html
│ │ └── application.properties
│ └── test/
│ └── java/com/example/
│ └── san/
│ └── ScanResultTest.java
├── docker-compose.yml
├── Dockerfile
├── nginx.conf
├── pom.xml
└── README.md
# Clean and compile
mvn clean compile
# Run tests
mvn test
# Package application
mvn package
# Run Spring Boot application
mvn spring-boot:run
# Build Docker image
docker build -t bookish-octo-invention .
# Run with Docker Compose
docker-compose up -d
- IDE Support: IntelliJ IDEA, Eclipse, VS Code
- Hot Reload: Spring Boot DevTools
- Live Reload: Thymeleaf template caching disabled in dev
- Debug Support: Remote debugging enabled
- Build Stage: Maven with OpenJDK 17 for compilation
- Runtime Stage: Lightweight OpenJDK 17 for execution
# Docker health check
curl -f http://localhost:8080/actuator/health
# Application health
curl http://localhost:8080/health
# Production build
mvn clean package -Pprod
# Docker production deployment
docker-compose -f docker-compose.prod.yml up -d
- 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 (
mvn test
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Follow Java coding standards
- Write comprehensive tests
- Update documentation
- Ensure backward compatibility
- Add meaningful commit messages
This project is licensed under the MIT License - see the LICENSE file for details.
For support and questions:
- 🐛 Issues: Create an issue on GitHub
- 📖 Documentation: Check this README and code comments
- 🧪 Examples: Review test cases for usage examples
- 💬 Discussions: Use GitHub Discussions for questions
- REST API Documentation: OpenAPI/Swagger integration
- Metrics Dashboard: Grafana integration
- Caching Layer: Redis integration
- Message Queue: RabbitMQ/Kafka support
- Microservices: Service decomposition
- Machine Learning: Advanced text analysis
- Multi-language: Internationalization support
- ✨ Initial Release: Complete Spring Boot web application
- 🔍 Text Analysis: Advanced emoji detection and money extraction
- ⚡ Parallel Processing: Multi-threaded text processing
- 🐳 Docker Support: Multi-stage containerization
- 🧪 Test Suite: Comprehensive unit test coverage
- 🌐 Web Interface: Modern Bootstrap UI
- 🔐 Security: Authentication and authorization
- 🗄️ Database: Oracle and H2 integration
- 📊 Monitoring: Health checks and actuator endpoints
- 📚 Documentation: Complete setup and usage guide
Made with ❤️ by the Bookish Octo Invention Team