A Serverless API Template Generator for Server-Side Swift.
Breeze is a powerful tool designed to streamline the process of creating Serverless API templates in Swift.
It eliminates the complexity of setting up a project from scratch, providing developers with code, scripts and configurations to adapt and customize. The tool is based on open-source code, allowing anyone the possibility to inspect, understand and improve the implementation.
Breeze fundamental choices:
- Serverless Architecture
- Server-Side Swift code based on SSWG SDKs
- Open-Source dependencies
- Open to inspection, customisation and contribution
- Infrastructure as a Code
- Deployment scripts
Serverless architecture has revolutionized the way developers approach application deployment. Serverless computing eliminates the complexities associated with traditional server management. This approach results in increased agility, reduced operational overhead, scalability and efficient resource utilization.
Swift's concise syntax, strong type system, and performance optimizations contribute to faster development cycles and enhanced code maintainability. Leveraging Swift on the server side ensures a consistent and unified language experience for developers, fostering code sharing between client and server components.
The tool can generate the following available templates:
AWS Serverless REST API based on APIGateway, Lambda, DynamoDB
-
Specs: Docs/GenerateLambdaAPI.md
-
Command Line help:
swift run breeze generate-lambda-api --help
-
Talk @NSLondon: Serverless in Swift like a Breeze](https://youtu.be/D4qSv_fhQIo?si=WnsTlYbUjHs9DYHF)
-
Slide: Slides
A GitHub Webhook with signature verification based on APIGateway and Lambda.
-
Command Line help:
swift run breeze generate-github-webhook --help
A Serveless Webhook based on APIGateway and Lambda with POST and GET endpoints.
-
Specs: Docs/GenerateWebhook.md
-
Command Line help:
swift run breeze generate-webhook --help
swift run breeze --help
output:
OVERVIEW: Breeze command line
Generate the deployment of a Serverless project using Breeze.
The command generates of the swift package, the `serverless.yml` file and the relevant commands in the target path to deploy
the Lambda code on AWS using the Serverless Framework.
USAGE: breeze <subcommand>
OPTIONS:
-h, --help Show help information.
SUBCOMMANDS:
generate-lambda-api
generate-github-webhook
generate-webhook
See 'breeze help <subcommand>' for detailed help.
The workflow to develop Serverless in Swift using Breeze can be described by the following steps:
- Generate the project using the
breeze
command line tool- Choose a Breeze template and follow the documentation
- Copy and adapt the template configuration file
- Generate the project
- Customize the generated project adapting the code
- Build the project using the
build.sh
script - Deploy the project using the
deploy.sh
script - Update the project when the code changes using the
update.sh
script - Remove the project if it's not needed anymore with
remove.sh
script
- Swift (Version >= 5.7)
- Docker
- Serverless Framework version 3
- Ensure your AWS Account has the right credentials to deploy a Serverless stack.
- Ensure you can run
make
Contributions are welcome! If you encounter any issues or have ideas for improvements, please open an issue or submit a pull request.