-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: #104 adjust billing logic to re-imagined pricing
- Loading branch information
1 parent
931f3b5
commit 2a37e3c
Showing
16 changed files
with
487 additions
and
265 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,38 +2,38 @@ | |
|
||
## About Ptah.sh | ||
|
||
Ptah.sh is an open-source self-hosting deployment platform - alternative to Heroku/Vercel and other Big Corp software. We believe that indie, startups and small to medium businesses must not suffer from unpredicted billing or bare-metal/VPS configurations. | ||
Ptah.sh is an open-source self-hosting deployment platform - alternative to Heroku/Vercel and other Big Corp software. We believe that indie, startups and small to medium businesses must not suffer from unpredicted billing or bare-metal/VPS configurations. | ||
|
||
The service is built on top of the proven container management solution - Docker Swarm. | ||
|
||
Ptah.sh takes the pain out of deployment by easing common tasks used in many projects, such as: | ||
|
||
- Setting up stateful services (PostgreSQL, MongoDB, MySQL and others). | ||
- Scaling stateless services to an infinite number of nodes (servers, as much as Docker Swarm can do). | ||
- Managing automated backups for critical data. | ||
- Load balancing of an incoming traffic and SSL auto-provisioning via Caddy Server. | ||
- And many more features. | ||
- Setting up stateful services (PostgreSQL, MongoDB, MySQL and others). | ||
- Scaling stateless services to an infinite number of nodes (servers, as much as Docker Swarm can do). | ||
- Managing automated backups for critical data. | ||
- Load balancing of an incoming traffic and SSL auto-provisioning via Caddy Server. | ||
- And many more features. | ||
|
||
## Ptah.sh Sponsors | ||
|
||
We would like to extend our thanks to the following sponsors for funding Ptah.sh development. If you are interested in becoming a sponsor, please send an e-mail to Bohdan Shulha via [[email protected]](mailto:[email protected]). | ||
We would like to extend our thanks to the following sponsors for funding Ptah.sh development. If you are interested in becoming a sponsor, please send an e-mail to Bohdan Shulha via [[email protected]](mailto:[email protected]). | ||
|
||
### Sponsors | ||
|
||
- _None so far_ | ||
- _None so far_ | ||
|
||
## Contributing | ||
|
||
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [CONTRIBUTING.md](https://github.com/ptah-sh/ptah-server/blob/main/CONTRIBUTING.md). | ||
|
||
## Security Vulnerabilities | ||
|
||
If you discover a security vulnerability within Ptah.sh services, please send an e-mail to Bohdan Shulha via [[email protected]](mailto:[email protected]). All security vulnerabilities will be promptly addressed. | ||
If you discover a security vulnerability within Ptah.sh services, please send an e-mail to Bohdan Shulha via [[email protected]](mailto:[email protected]). All security vulnerabilities will be promptly addressed. | ||
|
||
## License | ||
|
||
The Ptah.sh service suite is open-sourced software licensed under the [Functional Source License, Version 1.1, Apache 2.0 Future License](https://github.com/ptah-sh/ptah-server/blob/main/LICENSE.md). | ||
|
||
## Star History ★ | ||
|
||
[![Star History Chart](https://api.star-history.com/svg?repos=ptah-sh/ptah-server&type=Date)](https://star-history.com/#ptah-sh/ptah-server&Date) | ||
[![Star History Chart](https://api.star-history.com/svg?repos=ptah-sh/ptah-server&type=Date)](https://star-history.com/#ptah-sh/ptah-server&Date) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
|
||
namespace App\Models; | ||
|
||
use App\Models\PricingPlan\UsageQuotas; | ||
use Spatie\LaravelData\Data; | ||
|
||
class PricingPlan extends Data | ||
{ | ||
public function __construct( | ||
public string $productId, | ||
public UsageQuotas $quotas, | ||
) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace App\Models\PricingPlan; | ||
|
||
use Spatie\LaravelData\Data; | ||
|
||
class UsageQuotas extends Data | ||
{ | ||
public function __construct( | ||
public int $nodes, | ||
) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,39 @@ | ||
<script setup> | ||
import PrimaryButton from "@/Components/PrimaryButton.vue"; | ||
import { computed } from "vue"; | ||
const props = defineProps({ | ||
'checkout': Object, | ||
teamId: Object, | ||
priceId: String, | ||
customerId: String, | ||
name: String, | ||
}); | ||
const openCheckout = () => { | ||
Paddle.Checkout.open({ | ||
...props.checkout, | ||
settings: { | ||
...props.checkout.settings, | ||
'displayMode': 'overlay', | ||
} | ||
}); | ||
} | ||
const checkout = { | ||
settings: { | ||
displayMode: "overlay", | ||
successUrl: route( | ||
"teams.billing.subscription-success", | ||
{ team: props.teamId }, | ||
true, | ||
), | ||
}, | ||
items: [{ priceId: props.priceId, quantity: 1 }], | ||
customer: { id: props.customerId }, | ||
}; | ||
Paddle.Checkout.open(checkout); | ||
}; | ||
</script> | ||
|
||
<template> | ||
<PrimaryButton class="paddle_button bg-green-500 hover:bg-green-700" | ||
type="button" | ||
@click="openCheckout()" | ||
>Start Free Trial - 14 days</PrimaryButton> | ||
</template> | ||
<PrimaryButton | ||
class="paddle_button bg-green-500 hover:bg-green-700" | ||
type="button" | ||
@click="openCheckout()" | ||
><span class="w-full text-center" | ||
>{{ name }} - Start Free Trial</span | ||
></PrimaryButton | ||
> | ||
</template> |
Oops, something went wrong.