Swiftpack.co - Thomvis/Construct as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by Thomvis.
Thomvis/Construct v2.0.0
Dungeons & Dragons DM companion app in SwiftUI
⭐️ 115
🕓 1 year ago
iOS macOS
.package(url: "https://github.com/Thomvis/Construct.git", from: "v2.0.0")

Construct: D&D companion app in SwiftUI

Project Goals

This project aims to be...

For Dungeon Masters

The easiest way to use the app is by downloading it from the App Store.

You can find an overview of Construct's features at construct5e.app.

For developers

Download the project, open Construct.xcodeproj and run Construct.

Architecture overview

Construct is built using SwiftUI and a reducer-based architecture implemented using The Composable Architecture framework. The entire app's state is represented by the AppState struct, a deeply nested data structure containing the top-level screens and any screen, sheet or popover opened from there. A tight integration between SwiftUI's NavigationLink and the app's state make programmatic navigation a breeze.

All data in the app is stored locally in an sqlite database using GRDB. Construct defines a simple key-value store on top of GRDB. All entities are serialized using Swift's Codable, can optionally support full-text search and are automatically saved in the database when they change in the app state.

The D&D domain calls for some interesting parsing solution. Construct contains a small parser combinator framework and defines a couple of interesting parsers.

I hope to write posts detailing some of the interesting parts of the app in the future.


Stars: 115
Last commit: 2 weeks ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

2 years ago
  • Added support for iPhone 12 devices.
  • Improved performance of quick-creating combatants for an encounter

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics