Perfect Tutorials and Examples

Developer tutorials and training materials can help you get comfortable using Perfect for your server-side Swift development projects. Members of the Perfect developer community have been building examples and tutorials, including several here and here. As more examples and tutorials are created, we'll share them - including yours (if you want to share)!

In the meantime, to start working in Perfect, please go to Get Started. And if you require any support getting started in Perfect, get help here.

Examples

For a complete, up to date list of examples generated by the Perfect team, visit PerfectExamples on GitHub.

Perfect Turnstile with PostgreSQL

This example demonstrates the integration Stormpath's Turnstile authentication system with Perfect and a PostgreSQL ORM.
See the code

Perfect Turnstile with SQLite

This example demonstrates the integration Stormpath's Turnstile authentication system with Perfect and a SQLite ORM.
See the code

Turnstile Authentication Example (from Stormpath)

This is a demo for Perfect's authentication using the Turnstile-Perfect integration.
See the code

Arcade API backend example

Using Perfect, this example demonstrates JSON API interactions with GET and POST methods, storing and retrieving data via the SQLite3 version of StORM (a Swift ORM). HTTP Requests are logged using Perfect-RequestLogger by David Fleming.
See the code

Zipping and Unzipping files

An example demonstrating zipping & unzipping files using Perfect.
See the code

Perfect URL Shortener

An Example URL Shortener System for Perfect.
See the code

Perfect CURL Examples

Examples using CURL to request data using Perfect.
See the code

Perfect Cookie Demo

This example demonstrates the use or cookie read & set using Perfect's HTTP request and response objects.
See the code

Perfect Blog - Mustache

An Example Blog & Mustache template system using Perfect.
See the code

Perfect System Demo

An example demonstrating host operating system access using Perfect.
See the code

Perfect File Handling

An example of file handling for Perfect.
See the code

Perfect Weather

Demonstrate using URL Routes & variables, Fetching of remote data from API's as JSON, reading and transforming to data more appropriately consumable by an API client.
See the code

Perfect Directory Lister

An Example Directory Lister for Perfect.
See the code

Perfect JSON API

An Example JSON API for Perfect.
See the code

Perfect Upload Enumerator

Demonstrates submitting files via HTTP(S) POST, and reflecting back information about them.
See the code

Perfect URL Routing

Demonstrates URL Routing in Perfect.
See the code

Perfect WebSockets Server

An Example of a WebSockets Server for Perfect.
See the code

Perfect Ultimate Naughts & Crosses

Ultimate Naughts & Crosses game with Perfect backend.
See the code