Skip to content

The source code for coenttb.com, written entirely in Swift in the style of PointFree and powered by coenttb-server-vapor

License

Notifications You must be signed in to change notification settings

coenttb/coenttb-com-server

Repository files navigation

coenttb.com - Swift Vapor website in the style of PointFree

coenttb-com-server is the source code for coenttb.com, written entirely in Swift in the style of PointFree and powered by Vapor & coenttb-web.

Read more about me in my introductory post on coenttb.com.

Key Features

  • Built entirely in Swift: Approachable for newcomers and powerful for experts. It is fast, modern, safe, and a joy to write.
  • Fully type safe: Every interaction, from request to response, is statically checked at compile time, ensuring runtime reliability and minimizing bugs.
  • Hypermodular: Each module integrates only the parts that it needs.

Why open source?

Building in Swift for the web is worth it, but the ecosystem is not yet mature. By open-sourcing this project, I hope to:

  1. Show you how to structure a Swift website elegantly.
  2. Inspire you to try it for yourself.
  3. Get feedback to make the ecosystem even better.

Getting started

  1. Clone the repo.
  2. Copy the .env.example file and rename it .env.development.
  3. Start a postgres server. Adjust the DATABASE_URL variable in your .env.development to whatever you name your server. If your server is called example-com-server-development, on port 5432, on localhost, with a database user named admin then the correct syntax is postgres://admin:@localhost:5432/example-com-server-development.
  4. If you want to see the Account system in action, you will need to setup Mailgun. Adjust the MAILGUN_PRIVATE_API_KEY and MAILGUN_DOMAIN variables with your specific details.
  5. Go to Xcode and run the Server executable target.

Related projects

The coenttb stack

PointFree foundations

Other

Feedback is much appreciated!

If you’re working on your own Swift web project, feel free to learn, fork, and contribute.

Got thoughts? Found something you love? Something you hate? Let me know! Your feedback helps make this project better for everyone. Open an issue or start a discussion—I’m all ears.

Subscribe to my newsletter

Follow me on X

Link on Linkedin

License

The paid content of coenttb.com, including text, images, and other media, is all rights reserved. Unauthorized use, reproduction, or distribution of this content is prohibited without prior permission.

All other content (such as blog posts, documentation, and media not part of paid content) is licensed under CC BY-NC-SA 4.0 LICENSE.

This project's source code, excluding content of coenttb.com, is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). You are free to use, modify, and distribute it under the terms of the AGPL-3.0. For full details, please refer to the LICENSE file.

Commercial Licensing

A Commercial License is available for organizations or individuals who wish to use this project without adhering to the terms of the AGPL-3.0. This option is ideal for:

  • Using the codebase in proprietary software
  • Incorporating it into SaaS products
  • Avoiding the source code sharing requirements of AGPL-3.0

For inquiries about commercial licensing, please contact info@coenttb.com.

About

The source code for coenttb.com, written entirely in Swift in the style of PointFree and powered by coenttb-server-vapor

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Languages