From 51dee9c72f054e28b5b2f9bea214aa10f687991d Mon Sep 17 00:00:00 2001 From: Jakub Zych Date: Fri, 6 Feb 2026 00:18:53 +0100 Subject: [PATCH] Initial attempt on creative names. Removing 5 unneeded illuminate libs mapping --- IDEA_LIB_NAMES.md | 31 ++++++++++++++++ STACK.md | 90 +++++++++++++++++++++++------------------------ 2 files changed, 76 insertions(+), 45 deletions(-) create mode 100644 IDEA_LIB_NAMES.md diff --git a/IDEA_LIB_NAMES.md b/IDEA_LIB_NAMES.md new file mode 100644 index 0000000..17ab8b5 --- /dev/null +++ b/IDEA_LIB_NAMES.md @@ -0,0 +1,31 @@ +## SummerCMS Module Names + +| Module | Name | Why | +|--------|------|-----| +| container | **summer-backpack** | Carries everything you need, you bring it everywhere | +| contracts | **summer-pact** | A pact between friends — interfaces are contracts | +| support | **summer-towel** | "Always bring a towel" — the utility you always need | +| config | **summer-compass** | Guides your direction, tells you where to go | +| events | **summer-festival** | Festivals are summer events | +| http + routing | **summer-surf** | Surfing the web | +| database + pagination | **summer-lagoon** | Deep pool where all the data lives | +| auth + sessions | **summer-bouncer** | Checks who gets in | +| validation | **summer-lifeguard** | Keeps things safe, blows the whistle on bad input | +| cache | **summer-cooler** | Keeps things cold and ready to grab | +| queue | **summer-conga** | A conga line is literally a queue | +| mail | **summer-postcard** | You send postcards in summer | +| console | **summer-bonfire** | Where everyone gathers, commands happen around the fire | +| filesystem | **summer-sandcastle** | Building structures, organizing things | +| translation | **summer-phrasebook** | Travel phrasebook for speaking other languages | +| view | **summer-sunset** | The best view of summer | + +## Not Ported (Scala handles it natively) + +| Module | Why | Where it went | +|--------|-----|---------------| +| pipeline | Function composition is `f andThen g` in Scala | Inline | +| routing | Tapir endpoints ARE routes | Merged into **summer-surf** | +| session | Thin for API-first CMS | Merged into **summer-bouncer** | +| log | SLF4J is already a facade | Direct SLF4J usage | +| collections | Scala stdlib is excellent | Scala stdlib | +| pagination | Too small for standalone | Merged into **summer-lagoon** | diff --git a/STACK.md b/STACK.md index 3941a5a..92f7686 100644 --- a/STACK.md +++ b/STACK.md @@ -23,7 +23,7 @@ |---------|---------|-------| | **JSON** | uPickle or Circe | Serialization/deserialization for API + config | | **Config** | Typesafe Config (HOCON) | Industry standard JVM config, supports YAML-like nesting, env var substitution | -| **Logging** | SLF4J + Logback | Standard JVM logging | +| **Logging** | SLF4J + Logback | Standard JVM logging — used directly, no wrapper needed | | **Caching** | Caffeine (in-memory) + Jedis/Lettuce (Redis) | Caffeine is the fastest JVM cache; Redis for distributed | | **Hashing** | jBCrypt + JDK crypto | Password hashing + general encryption | | **Email** | Jakarta Mail | Standard JVM email | @@ -32,7 +32,7 @@ | **Template Engine** | Scalate (Mustache/SSP) or Twirl | Server-rendered public-facing themes | | **CLI** | Decline or Scopt | Console command parsing for scaffolding | | **Testing** | MUnit or ScalaTest + Tapir test utils | Unit + integration testing | -| **Build (project)** | sbt | Multi-module build for the 20+ subprojects | +| **Build (project)** | sbt | Multi-module build for the subprojects | | **Build (scripts)** | scala-cli | Quick scripts, prototyping, dev tooling. VirtusLab maintains it | --- @@ -43,28 +43,33 @@ Each module = separate sbt subproject, publishable independently (like Illuminat | Illuminate Package | SummerCMS Module | Implementation Approach | |-------------------|-----------------|------------------------| -| **Container** | `summer-container` | Scala 3 `given`/`using` for compile-time DI + lightweight runtime registry for plugins | -| **Contracts** | `summer-contracts` | Scala traits — all public APIs defined here | -| **Support** | `summer-support` | Extension methods, utility types, base classes | -| **Config** | `summer-config` | Typesafe Config wrapper, HOCON files | -| **Pipeline** | `summer-pipeline` | Function composition `(A => A)*` — trivial in Scala | -| **Events** | `summer-events` | Simple event bus with typed events + Ox channels for async | -| **Http** | `summer-http` | Tapir endpoint definitions, request/response wrappers | -| **Routing** | `summer-routing` | Tapir endpoints are already type-safe routes — combine with auto-discovery | -| **Database** | `summer-database` | Magnum repos + case class models + query builder | -| **Auth** | `summer-auth` | JWT tokens (for API) + session cookies (for admin), guards as traits | -| **Validation** | `summer-validation` | Compile-time via Scala types + runtime rules engine (inspired by fields.yaml) | -| **Cache** | `summer-cache` | Caffeine + Redis, driver-based via trait | -| **Queue** | `summer-queue` | Ox channels + virtual threads for workers, persistent queue via DB or Redis | -| **Mail** | `summer-mail` | Jakarta Mail wrapper with template support | -| **Console** | `summer-console` | CLI command framework for scaffolding (`summer create:plugin`, etc.) | -| **Session** | `summer-session` | Cookie/DB-backed sessions for admin panel | -| **Filesystem** | `summer-filesystem` | `java.nio.file` + S3 adapter | -| **Translation** | `summer-translation` | i18n with HOCON/JSON locale files | -| **View** | `summer-view` | Template engine for admin panel rendering | -| **Log** | `summer-log` | SLF4J facade, minimal wrapper | -| **Collections** | *(not needed)* | Scala stdlib collections are already excellent | -| **Pagination** | `summer-pagination` | Generic paginator for Magnum query results | +| **Container** | `summer-backpack` | Scala 3 `given`/`using` for compile-time DI + lightweight runtime registry for plugins | +| **Contracts** | `summer-pact` | Scala traits — all public APIs defined here | +| **Support** | `summer-towel` | Extension methods, utility types, base classes | +| **Config** | `summer-compass` | Typesafe Config wrapper, HOCON files, standardized access across all modules | +| **Events** | `summer-festival` | Simple event bus with typed events + Ox channels for async | +| **Http** | `summer-surf` | Tapir endpoint definitions, request/response wrappers, routing (Tapir endpoints are type-safe routes) | +| **Database** | `summer-lagoon` | Magnum repos + case class models + query builder + pagination | +| **Auth** | `summer-bouncer` | JWT tokens (for API) + session cookies (for admin), guards as traits, session management | +| **Validation** | `summer-lifeguard` | Compile-time via Scala types + runtime rules engine (inspired by fields.yaml) | +| **Cache** | `summer-cooler` | Caffeine + Redis, driver-based via trait | +| **Queue** | `summer-conga` | Ox channels + virtual threads for workers, persistent queue via DB or Redis | +| **Mail** | `summer-postcard` | Jakarta Mail wrapper with template support | +| **Console** | `summer-bonfire` | CLI command framework for scaffolding (`summer create:plugin`, etc.) | +| **Filesystem** | `summer-sandcastle` | `java.nio.file` + pluggable storage providers (S3, etc.) via driver trait | +| **Translation** | `summer-phrasebook` | i18n with HOCON/JSON locale files | +| **View** | `summer-sunset` | Template engine for admin panel rendering | + +### Illuminate Packages Not Ported (and why) + +| Illuminate Package | Why not needed | Where it lives instead | +|-------------------|----------------|----------------------| +| **Pipeline** | Function composition is native to Scala (`f andThen g`). Laravel needs a Pipeline class because PHP lacks first-class functions. In Scala this is a one-liner, not a module. | Inline wherever needed | +| **Routing** | Tapir endpoint definitions ARE routes — defining an endpoint and defining a route is the same thing. No separate routing layer needed. | Merged into `summer-surf` (http) | +| **Session** | For an API-first CMS with JWT, sessions are thin — only needed for admin panel cookies. Not enough to justify a standalone module. | Merged into `summer-bouncer` (auth) | +| **Log** | SLF4J is already a logging facade. Wrapping a facade with another facade adds zero value. Just use SLF4J + Logback directly. | Direct SLF4J usage | +| **Collections** | Scala stdlib collections are already excellent — `List`, `Map`, `Seq`, `Vector` with `map`, `filter`, `fold`, etc. No wrapper needed. | Scala stdlib | +| **Pagination** | A paginator is a case class + a few helper methods. Too small for a standalone module. | Merged into `summer-lagoon` (database) | --- @@ -137,27 +142,22 @@ summer create:migration vendor.pluginname description summercms/ build.sbt # Multi-project sbt build modules/ - summer-container/ - summer-contracts/ - summer-support/ - summer-config/ - summer-pipeline/ - summer-events/ - summer-http/ # Tapir integration - summer-routing/ - summer-database/ # Magnum integration - summer-auth/ - summer-validation/ - summer-cache/ - summer-queue/ # Ox integration - summer-mail/ - summer-console/ - summer-session/ - summer-filesystem/ - summer-translation/ - summer-view/ - summer-log/ - summer-pagination/ + summer-backpack/ # DI container + plugin registry + summer-pact/ # Contracts (traits) + summer-towel/ # Support utilities + summer-compass/ # Config + summer-festival/ # Events + summer-surf/ # HTTP + routing (Tapir) + summer-lagoon/ # Database + pagination (Magnum) + summer-bouncer/ # Auth + sessions + summer-lifeguard/ # Validation + summer-cooler/ # Cache + summer-conga/ # Queue (Ox) + summer-postcard/ # Mail + summer-bonfire/ # Console / CLI + summer-sandcastle/ # Filesystem + storage providers + summer-phrasebook/ # Translation / i18n + summer-sunset/ # View / templates app/ # Full CMS application (depends on all modules) summer-cms/ # Assembled CMS with admin panel plugins/ # Example/core plugins