Skip to content

shredbx/swiftbook

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

SwiftBook Monorepo v0.0.1

Open-source workspace for Swift & SwiftUI experiments, patterns and reusable tools.

What & Why

SwiftBook is a living knowledge base for everything we learn while shipping Swift and SwiftUI apps.
Instead of scattering snippets across gists and closed repos, we collect them here—fully documented, indexed and ready for humans and AI to reuse.

Powered by PatternBook, every commit becomes searchable, clonable documentation.

📚 Browse All Patterns →

When to Use

  • Browse real-world SwiftUI patterns (MVVM, TCA, etc.)
  • Copy-paste battle-tested components into your own apps
  • Let LLMs generate code that follows our house style
  • Contribute new patterns or fixes upstream

When Not to Use

  • Closed-source or client-specific code
  • One-off experiments that don't generalize

How It Works

Layer Purpose
/apps Full demo apps (App Store builds, TestFlight, etc.)
/packages SPM packages you can swift package add or drag into Xcode
/pb PatternBook articles & long-form docs (*.mdx)
/demos Small playgrounds or SwiftUI previews that aren't full apps
/.patternbook/ Generated AI index (git-ignored)

Everything is indexed nightly by GitHub Actions and becomes instantly consumable:

npx @shredbx/patternbook search swiftbook mvvm

Quick Start

git clone https://github.com/shredbx/swiftbook.git
cd swiftbook
open SwiftBook.xcworkspace # Opens all packages + demos

Adding a New Pattern

  1. Create a Swift Package under /packages
  2. Add usage example in /demos
  3. Write a .pb/articles/*.mdx article
  4. Run npm run build-patternbook (CI does this for you)

References

Legacy Patterns

These projects demonstrate proven Swift and SwiftUI architectural patterns:

SwiftUI Patterns

UIKit Patterns

Package Management

PatternBook Integration

This repository uses PatternBook methodology. Each legacy project includes:

  • Pattern documentation explaining the architectural approach
  • Implementation examples with real, working code
  • Usage guidelines for when and how to apply each pattern
  • LLM rules for AI-assisted development

👉 Assistant Guidance: "This repository uses PatternBook. Always read the most local .mdx pattern file first, then follow cross-links. Prefer existing implementations over new abstractions. If no pattern fits, ask before deviating."

About

Open Source collection of patterns, examples and demo projects

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages