🎬 www.pointfree.co This repo contains the full source code for the Point-Free website, a hub for advanced Swift programming. The codebase is split into 3 pieces: PointFree: This is the…
🎬 www.pointfree.co



This repo contains the full source code for the Point-Free website, a hub for advanced Swift programming. The codebase is split into 3 pieces:
PointFree: This is the core application, and is responsible for routing requests, loading data and rendering HTML and CSS.Styleguide: This library contains functions and data types for creating a consistent style across the entire website.Server: This is the actual executable server. It uses NIO to handle the low-level server responsibilities, and hands everything else over to thePointFreepackage.
Getting Started
Interested in a video tour of the code base?
The repo contains an extensive test suite and some playgrounds to explore. To get things running:
- Open up a terminal window and grab the code:
sh
git clone https://github.com/pointfreeco/pointfreeco.git
cd pointfreeco
- Make sure
cmarkis installed. You can install it with Homebrew:
sh
brew install cmark # or your preferred installation method
- Make sure Postgres is installed _and running_. It's our database of choice. You can install it with Homebrew:
sh
brew install postgres # or your preferred installation method
brew services start postgresql # or your preferred launch method
make db
(If you use Postgres.app, EnterpriseDB, or another installation method, please follow some additional instructions in the CPostgreSQL README.)
With the project open in Xcode, you can:
- Run the server locally
Server target
* Run: Command+R
* Visit http://localhost:8080
- Explore our playgrounds
PointFree target
* Build: Command+B
* Open a playground!
Some fun things to explore
There're a lot of fun things to explore in this repo. For example:
* We develop web pages in playgrounds for a continuous feedback loop. This is made possible by the fact that the entire server stack is composed of pure functions with side-effects pushed to the boundaries of the application. It allows us to load up any request in isolation, including POST requests, all without ever worrying about doing a side-effect.

* We use snapshot testing to capture full data structures in order to verify their correctness. Not only do we do this in the traditional way of taking screenshots of web pages at various break points (e.g. on iPhone and desktop), but we can also snapshot any entire request-to-response lifecycle (e.g. the POST to a signup page does the correct redirect).
▿ Step
ResponseEnded
▿ Request
POST http://localhost:8080/launch-signup
[email protected]
▿ Response
Status 302 FOUND
Location: /?success=true
Xcode Color Theme
Like the color theme we use in our episodes? Run make colortheme to install locally!
Related projects
Point-Free uses a bunch of interesting open-source software:
* 🗺 swift-html: A Swift DSL for type-safe, extensible, and transformable HTML documents.
* 🕸 swift-web: A collection of types and functions for dealing with common web server concerns, such as HTML render, CSS preprocessing, middleware and more.
* 🎶 swift-prelude: Offers a standard library for experimental functional programming in Swift.
* 🏷 swift-tagged: Helps us create strong contracts with our data boundaries, like JSON from GitHub and Stripe, and our PostgreSQL data.
* 📸 swift-snapshot-testing: Powers our testing infrastructure by taking snapshots of various data structures to guarantee the correctness of their output. We use this on everything from middleware to ensure requests are correctly transformed into responses, and even entire web pages to make sure the site looks correct at a variety of sizes (e.g. on iPhone and desktop).
Explore more of our open-source on the Point-Free organization.
Learn More
Brandon gave a talk about most of the core ideas that went into this project at Swift Summit 2017.
Find this interesting?
Then check out Point-Free!
License
The content of this project itself is licensed under the CC BY-NC-SA 4.0 license, and the underlying source code used to format and display that content is licensed under the [MIT license](LICENSE).
Members
-
swift-composable-architecture ★ PINNED
A library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind.
Swift ★ 15k 23h agoExplain → -
sqlite-data ★ PINNED
A fast, lightweight replacement for SwiftData, powered by SQL and supporting CloudKit synchronization.
Swift ★ 1.9k 3h agoExplain → -
swift-navigation ★ PINNED
Bringing simple and powerful navigation tools to all Swift platforms, inspired by SwiftUI.
Swift ★ 2.3k 7d agoExplain → -
swift-dependencies ★ PINNED
A dependency management library inspired by SwiftUI's "environment."
Swift ★ 2.2k 7d agoExplain → -
swift-sharing ★ PINNED
A universal solution to persistence and data sharing in surprisingly little code.
Swift ★ 792 28m agoExplain → -
swift-snapshot-testing ★ PINNED
📸 Delightful Swift snapshot testing.
Swift ★ 4.3k 7d agoExplain → -
isowords
Open source game built in SwiftUI and the Composable Architecture.
Swift ★ 3.0k 1y agoExplain → -
swift-tagged
🏷 A wrapper type for safer, expressive code.
Swift ★ 1.6k 8mo agoExplain → -
pointfreeco
🎬 The source for www.pointfree.co, a hub for advanced Swift programming.
Swift ★ 1.2k 1d agoExplain → -
swift-overture
🎼 A library for function composition.
Swift ★ 1.2k 2y agoExplain → -
episode-code-samples
💾 Point-Free episode code.
Swift ★ 1.1k 1d agoExplain → -
swift-case-paths
🧰 Case paths extends the key path hierarchy to enum cases.
Swift ★ 1.0k 9h agoExplain → -
swift-parsing
A library for turning nebulous data into well-structured data, with a focus on composition, performance, generality, and ergonomics.
Swift ★ 990 13d agoExplain → -
swift-nonempty
🎁 A compile-time guarantee that a collection contains a value.
Swift ★ 885 1y agoExplain → -
swift-custom-dump
A collection of tools for debugging, diffing, and testing your application's data structures.
Swift ★ 883 7d agoExplain → -
swift-html
🗺 A Swift DSL for type-safe, extensible, and transformable HTML documents.
Swift ★ 831 1y agoExplain → -
swift-perception
Observable tools, backported.
Swift ★ 798 2d agoExplain → -
combine-schedulers
⏰ A few schedulers that make working with Combine more testable and more versatile.
Swift ★ 789 7d agoExplain → -
swift-identified-collections
A library of data structures for working with collections of identifiable elements in an ergonomic, performant way.
Swift ★ 621 1mo agoExplain → -
swift-issue-reporting
Report issues in your application and library code as Xcode runtime warnings, breakpoints, assertions, and do so in a testable manner.
Swift ★ 517 6d agoExplain → -
swift-web
🕸 A collection of Swift server-side frameworks for handling HTML, CSS, routing and middleware.
Swift ★ 493 1mo agoExplain → -
swift-concurrency-extras
Useful, testable Swift concurrency.
Swift ★ 485 13d agoExplain → -
swift-prelude
🎶 A collection of types and functions that enhance the Swift language.
Swift ★ 477 2y agoExplain → -
swift-url-routing
A bidirectional router with more type safety and less fuss.
Swift ★ 408 7d agoExplain → -
swift-validated
🛂 A result type that accumulates multiple errors.
Swift ★ 396 2y agoExplain → -
swift-structured-queries
Truly type-safe SQL.
Swift ★ 343 21m agoExplain → -
syncups
A rebuild of Apple’s “Scrumdinger” application using modern, best practices for SwiftUI development.
Swift ★ 342 1mo agoExplain → -
swift-clocks
⏰ A few clocks that make working with Swift concurrency more testable and more versatile.
Swift ★ 337 7d agoExplain → -
swift-macro-testing
Magical testing tools for Swift macros.
Swift ★ 334 3mo agoExplain → -
swift-gen
🎱 Composable, transformable, controllable randomness.
Swift ★ 304 11mo agoExplain → -
swift-enum-properties ▣
🤝 Struct and enum data access in harmony.
Swift ★ 196 4y agoExplain → -
pfw
CLI for the Point-Free Way skills.
Swift ★ 186 1d agoExplain → -
composable-core-location
A library that bridges the Composable Architecture and Core Location.
Swift ★ 121 2y agoExplain → -
vapor-routing
A bidirectional Vapor router with more type safety and less fuss.
Swift ★ 100 2y agoExplain → -
swift-html-vapor
💧 Vapor plugin for type-safe, transformable HTML views.
Swift ★ 94 2y agoExplain → -
swift-playground-templates
🏫 A collection of helpful Xcode playground templates.
Makefile ★ 83 4y agoExplain → -
swift-debug-snapshots
Better debugging and testing for your data model.
Swift ★ 66 7d agoExplain → -
swiftui-navigation
This package is now Swift Navigation:
Swift ★ 64 1y agoExplain → -
composable-core-motion
A library that bridges the Composable Architecture and Core Motion.
Swift ★ 41 2y agoExplain → -
pointfreeco-server ▣
Point-Free server code.
★ 40 8y agoExplain → -
TrySyncUps
The starting project for our try! Swift 2024 Composable Architecture workshop.
Swift ★ 39 2y agoExplain → -
swift-boundaries ▣
🐣 Functional core, imperative shell.
Swift ★ 31 6y agoExplain → -
swift-quickcheck
🏁 An implementation of QuickCheck in Swift.
Swift ★ 25 6y agoExplain → -
swift-either
For those times you want A or B!
Swift ★ 22 6y agoExplain → -
swift-algebras
Algebraic laws bundled into concrete data types.
★ 21 6y agoExplain → -
sharing-grdb
A lightweight replacement for SwiftData and the Query macro.
Swift ★ 18 10mo agoExplain → -
swift-parser-printer
↔️ Parsing and printing
Swift ★ 16 6y agoExplain → -
swift-html-kitura ▣
☁️ Kitura plugin for type-safe, transformable HTML views.
Swift ★ 14 4y agoExplain → -
MacroKit ⑂
Exploring Swifts new macro system
Swift ★ 11 2y agoExplain → -
DoctorPretty ⑂
Wadler's "A prettier printer" embedded pretty-printer DSL for Swift
Swift ★ 8 8y agoExplain → -
xcode-test-support-bug
No description.
Swift ★ 3 1mo agoExplain → -
swift-bugs
No description.
★ 3 6y agoExplain → -
homebrew-swift
No description.
Ruby ★ 3 6y agoExplain → -
swift-java ⑂
No description.
★ 2 1y agoExplain → -
Ccmark
No description.
Swift ★ 2 6y agoExplain → -
swift ⑂
The Swift Programming Language
★ 1 1d agoExplain → -
xctest-dynamic-overlay ⑂
Report issues in your application and library code as Xcode runtime warnings, breakpoints, assertions, and do so in a testable manner.
★ 1 7d agoExplain → -
swift-testing ⑂
A modern, expressive testing package for Swift
★ 1 3d agoExplain → -
homebrew-tap
No description.
Ruby ★ 1 4mo agoExplain → -
swift-syntax ⑂
A set of Swift libraries for parsing, inspecting, generating, and transforming Swift source code.
★ 1 1y agoExplain → -
homebrew-formulae ⑂
Homebrew formula collection
Ruby ★ 1 3y agoExplain → -
.github
No description.
★ 1 4y agoExplain → -
swift-evolution ⑂
This maintains proposals for changes and user-visible enhancements to the Swift Programming Language.
★ 0 3d agoExplain → -
GRDB.swift ⑂
A toolkit for SQLite databases, with a focus on application development
★ 0 5mo agoExplain →
No repos match these filters.
More creators on gitmyhub
standardgalactic AlexTheAnalyst MorvanZhou cloudwu kenjinote