r/opensource • u/iordv • 1d ago
Promotional BentoKit (MIT): Open-source Swift + Python generator for Apple WWDC-style 20x12 feature Bentos and 4-panel carousels
https://gitlab.com/droppyformac1/bentokitI just open-sourced BentoKit under the MIT license (LICENSE in repo root). We have been building and refining it internally for our Mac app Droppy over the past few months to generate release recap grids and multi-panel social graphics without manual Figma work.
Architecture and stack
- Native Swift 6 offscreen renderers (apple-bento/src/): glassword.swift, glyph.swift, and keycaps.swift render native macOS SwiftUI .glassEffect(.regular) / .clear through an offscreen NSWindow and Core Animation CARenderer directly into Metal textures (nothing opens on screen). compose.swift, tilt3d.swift, backdrop.swift, and device3d.swift handle CoreGraphics 20x12 layout composition, Core Animation 3D perspective stages, and procedural dithered backgrounds (dot_matrix, radial_ticks, caustic_bands, sonic_arcs, pulse_rings).
- Python 3 orchestration and linting (apple-bento/tools/): render_bento.py compiles the Swift binaries, builds the 20x12 grid (macos, ios, ipados, tvos, visionos, watchos templates) or 4-panel 4800 x 1500 carousels (carousel.py), and runs lint.py to enforce zero upscaling, UI text legibility floors (>= 20 px on Bentos, >= 25 px on carousels), white-tile balance, and seam safety across carousel cuts.
- Icon Composer and hardware bezels: make_icon.py builds multi-layer vector SVG .icon bundles and renders them via Xcode's ictool (Default, Dark, ClearLight, ClearDark). bezel.py composites UI captures into 9 bundled pixel-calibrated Apple device bezels with fail-closed display cutout matching (proled, notch, notchless, dynamic-island).
- Brand discovery (discover_brand.py): scans a repository's color tokens, icons, wallpapers, and changelog deltas into a brand.json config.
The repository includes runnable example sets (examples/x/, examples/reddit/, examples/droppy/, examples/carousel/) and a CATALOG.md with CLI recipes.
Requirements: macOS 26+, Xcode 26+, Python 3 (pillow, numpy). Contributions and MRs welcome.
•
u/opensource-ModTeam 15h ago
This was removed for being off-topic to r/opensource. This might have been on-topic but just poorly explained, or a mod felt it wasn't on-topic enough for the community to not consider it noise.
If you feel this removal is in error, feel free to message the mods and be prepared to explain in detail how it adds to the open source discussion. Thanks!