Skip to content
View devers2's full-sized avatar

Block or report devers2

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
devers2/README.md

Hi there, I'm devers2 πŸ‘‹

🌐 English | ν•œκ΅­μ–΄

Full-Stack Software Engineer & Open-Source Creator. Passionate about high-performance Java architectures, eliminating developer friction, and developer ergonomics.


🌟 Flagship Project: s2-util & s2-validator

Maven Central Java 17+ License

"Tired of writing validation rules twice in Java and JavaScript? Tired of annotation hell for conditional fields?" s2-validator is a next-generation dynamic validation framework that lets you Write Once, Validate Anywhere β€” from server-side Java DTOs to native browser HTML with zero frontend JavaScript code.

πŸ’‘ Why s2-validator over Standard Bean Validation?

Pain Points in Real-World Enterprise Standard Bean Validation (JSR-380) ⭐ s2-validator
Conditional Fields (If A then B required) Verbose @GroupSequenceProvider or custom annotation classes ❌ Expressive in 2 lines: .when("type", "VIP").rule(REQUIRED) βœ…
Cross-Field Comparison (pw == confirmPw) Class-level annotations; errors bound to root object ❌ Directly bound to the target field: .rule(EQUALS_FIELD, "pw") βœ…
Browser / Frontend Sync Server-only. Must duplicate identical regex/rules in JS/TS ❌ Zero frontend code: getRulesJson() + native tooltip auto-focus βœ…
Korean Particle Grammar πŸ‡°πŸ‡· Complex custom MessageInterpolator required ❌ Built-in smart postpositions ({0|은/λŠ”}, {0|이/κ°€}) βœ…
Field Typo / Refactoring Safety String-based property paths fail silently at runtime ❌ s2-validator-plugin catches typos at compile time via AST static analysis πŸ›‘οΈ βœ…

πŸš€ 30-Second Taste

1. Instant Backend Validation (No frontend sync needed)

Validate DTOs, VOs, or Maps in a single fluent line. Omitted rules default to REQUIRED:

// Fail-fast: throws S2RuntimeException on first error
S2Validator.of(command)
    .field("name", "Name") // Omitting rule auto-applies REQUIRED
    .field("email", "Email").rule(S2RuleType.EMAIL) // With rules, REQUIRED is NOT auto-applied
    .field("birthDate", "Birth Date").rule(S2RuleType.REQUIRED).rule(S2RuleType.DATE)
    .validate();

// Or collect all errors without throwing:
List<S2ValidationError> errors = new ArrayList<>();
boolean isValid = S2Validator.of(command)
    .field("name", "Name")
    .field("email", "Email").rule(S2RuleType.EMAIL)
    .validate(errors::add);

2. Full-Stack Auto-Sync (0 Lines of Frontend JS)

Need browser-side validation? Send the server rules directly to HTML:

// Server: Validate with Spring BindingResult & expose rules JSON
S2BindValidator.context("signUp", this::signUpRules).validate(command, result);
model.addAttribute("rules", S2BindValidator.context("signUp", this::signUpRules).getRulesJson());
<!-- Client: Native browser tooltips & auto-focus with a single HTML attribute! -->
<form th:data-s2-rules="${rules}">

πŸ”— Dive Deeper into the Ecosystem:


πŸ“¦ S2 Project Suite

Project / Module Description Repository
s2-validator ⭐ Unified dynamic cross-platform validation engine & Spring binding integration s2-util
s2-validator-plugin Gradle static analysis plugin β€” catches DTO field typos and incomplete chains at compile time s2-util
s2-core High-performance Java utility toolkit (MethodHandle Reflection, W-TinyLFU Cache, Dates, Strings) s2-util
s2-jpa Fluent dynamic JPQL query builder with SQL injection prevention s2-util
s2-support Opinionated companion library for application-level workflows (Pagination, SFTP/Files, Spring Context) s2-support
s2-build-support Convention Gradle plugin for automated licensing, copyright, and publication s2-build-support

πŸ› οΈ Tech Stack & Skills

  • Languages: Java (17 / 21+), Kotlin, SQL, JavaScript
  • Frameworks & Tech: Spring Boot, Spring MVC, Spring Data JPA, Hibernate, Caffeine Cache
  • Build & CI/CD: Gradle, Maven Central Publishing, GitHub Actions, Docker
  • Architecture: Clean Architecture, High-Performance I/O & Concurrency, AST Static Analysis

πŸ“« Connect

Pinned Loading

  1. s2-util s2-util Public

    Unified Dynamic Validator for Java & JS: Write Once, Validate Anywhere πŸš€

    Java 2