No description
Find a file
Paulo Castellano 9bc9e1f93c feat: wire StripeEventListener domain logic for plan swap & cancel
The previous version of `handleSubscriptionUpdated` and
`handleSubscriptionDeleted` were no-ops, so a plan swap or cancellation
on Stripe never reflected in `accounts.plan_id`. Mirrors sendkit's
listener structure and adds full coverage.

Listener:
- `handleSubscriptionCreated` / `handleSubscriptionUpdated` capture the
  previous plan name, resolve the new plan from the subscription items'
  price ids, and update `account.plan_id` if it changed. Pennant
  feature caches are forgotten automatically by `Account::booted()`.
- `handleSubscriptionDeleted` clears `account.plan_id` so the UI and
  authorization checks reflect "no plan" instead of keeping the
  previous one attached. Idempotent.
- Helpers extracted: `resolvePlanFromSubscriptionItems(payload, account)`
  (pure resolver, logs a warning when no plan matches) and
  `trackPlanChange(account, event, previousPlan, payload)` (delegates to
  the queued `TrackBilling` job).
- Restored the `match($type) => handler...` shape with explicit
  protected handler methods for each subscription type.

TrackBilling:
- Adds optional `?string $previousPlan` constructor param. Forwarded as
  `previous_plan` event property so PostHog funnels can tell upgrade
  from downgrade from cancellation.

Tests:
- New: subscription updated/created sync `plan_id` from price ids
  (monthly + yearly), idempotent when price already matches, ignored
  when price ids are unknown, deletion clears plan_id, deletion
  idempotent when already null. Tests override the seeded plans'
  Stripe price ids inline so they don't depend on `.env.testing`
  having `STRIPE_*_MONTHLY/YEARLY` set.
- New: previousPlan is forwarded to `TrackBilling` for updated and
  deleted, and is null for first-activation.
- TrackBilling test: covers the previous_plan property in capture
  payload (both supplied and default-null cases).

Suite: 1438 passed (+11).

Plus a tiny cleanup: replaced the `'PostHog\\SendEvent: ...'`
namespace-look-alike in the SendEvent log warning with the cleaner
`'PostHog SendEvent: ...'`.
2026-05-07 10:10:23 -03:00
.claude/skills chore: remove unused language files and update project configuration files 2026-05-04 14:04:03 -03:00
.github ci: enable parallel execution for test suite in GitHub Actions workflow 2026-05-06 17:28:41 -03:00
app feat: wire StripeEventListener domain logic for plan swap & cancel 2026-05-07 10:10:23 -03:00
bootstrap refactor: standardize UI components, modernize localization structure, and remove legacy appearance management middleware. 2026-05-06 14:26:18 -03:00
config feat: end-to-end PostHog tracking with reactive group metrics 2026-05-07 09:28:02 -03:00
database feat: capture signup UTMs/IP and add GitHub OAuth login 2026-05-04 18:42:25 -03:00
lang refactor: redesign billing settings + upgrade dialog with indies aesthetic 2026-05-06 17:00:25 -03:00
maizzle feat: @mentions in comments, AI Action layer + MCP tools, settings tabs 2026-05-01 20:59:03 -03:00
public fix: use GitHub SVG mark instead of Tabler icon for brand consistency 2026-05-04 18:51:06 -03:00
resources refactor: namespace PostHog jobs + extract billing tracking, add tests 2026-05-07 09:41:36 -03:00
routes revert: keep one OAuth callback URL per provider 2026-05-04 19:42:13 -03:00
storage chore: first commit 2026-01-14 22:13:44 -03:00
stubs feat: implement MCP server with tools, Post API tests, auth middleware 2026-03-29 20:30:36 -03:00
templates refactor: reorganize settings UI, migrate post templates to a file-based registry, and remove legacy video generation features 2026-05-03 13:44:13 -03:00
tests feat: wire StripeEventListener domain logic for plan swap & cancel 2026-05-07 10:10:23 -03:00
.editorconfig chore: first commit 2026-01-14 22:13:44 -03:00
.env.ci feat: adding tests.. 2026-01-18 22:01:55 -03:00
.env.example chore: update .env.example with Anthropic key, AI model configuration, and Stripe billing variables 2026-05-06 19:50:50 -03:00
.env.testing feat: improvements on ui 2026-01-21 20:50:57 -03:00
.gitattributes chore: first commit 2026-01-14 22:13:44 -03:00
.gitignore chore: working 2026-04-02 17:57:06 -03:00
.mcp.json chore: update boost skills and config 2026-03-31 09:36:09 -03:00
.prettierignore chore: first commit 2026-01-14 22:13:44 -03:00
.prettierrc chore: first commit 2026-01-14 22:13:44 -03:00
artisan chore: first commit 2026-01-14 22:13:44 -03:00
boost.json chore: remove unused language files and update project configuration files 2026-05-04 14:04:03 -03:00
CLAUDE.md feat: pass and persist post dates through AI creation wizard and template application flows 2026-05-06 17:21:30 -03:00
components.json chore: first commit 2026-01-14 22:13:44 -03:00
compose.yaml feat: add documentation for connecting social media platforms and getting started guide 2026-01-18 18:57:15 -03:00
composer.json chore: update project license from FSL to AGPL-3.0-only 2026-05-04 15:46:56 -03:00
composer.lock chore: remove unused language files and update project configuration files 2026-05-04 14:04:03 -03:00
eslint.config.js fix: address PR review findings — publish, REST store, SSRF, race 2026-05-04 12:16:39 -03:00
GEMINI.md chore: update config files and remove unused translation files 2026-01-26 12:02:24 -03:00
LICENSE.md chore: update project license from FSL to AGPL-3.0-only 2026-05-04 15:46:56 -03:00
package-lock.json fix: resolve all TypeScript errors 2026-03-31 09:34:39 -03:00
package.json fix: resolve all TypeScript errors 2026-03-31 09:34:39 -03:00
phpunit.xml feat: adding tests 2026-01-18 22:04:34 -03:00
pint.json chore: first commit 2026-01-14 22:13:44 -03:00
README.md chore: update project license from FSL to AGPL-3.0-only 2026-05-04 15:46:56 -03:00
tsconfig.json chore: first commit 2026-01-14 22:13:44 -03:00
vite.config.ts chore: add resources/css/app.css to vite build input 2026-05-03 20:30:34 -03:00

TryPost

The open-source alternative to Buffer, Hootsuite, and Later.

Schedule, write, and publish to every social network from one place.
Self-hosted. Built for teams, agencies, and creators who own their data.

Stars License Release Discussions

Cloud • Documentation • Roadmap • Community


TryPost 1.0 is here

A massive release that turns TryPost into a complete open-source social media platform.

  • MCP Server — connect Claude, Cursor, ChatGPT, and any MCP client. Schedule, publish, and pull metrics with natural language.
  • REST API — Personal Access Tokens, every workflow you can do in the dashboard, available over HTTP.
  • Workspaces & Teams — manage multiple brands or clients in isolated environments. Invite team members with role-based permissions.
  • AI Carousel Generator — type a prompt, get a multi-slide LinkedIn / Instagram carousel back, with images and copy on-brand.
  • Brand Profile — set tone, voice, language, and colors once. Every AI generation respects them automatically.
  • Analytics — per-account engagement metrics from every platform that exposes them, in a single dashboard.

Read the release notes →


Why TryPost

Tired of paying $30–$200/month per user for a scheduler? Tired of your content sitting on someone else's database?

Self-hosted, your data Your posts, drafts, and metrics never leave your server
No artificial limits Unlimited posts, unlimited connected accounts, unlimited workspaces
AI built in Captions, carousels, on-brand voice — using your own keys
Multi-tenant ready Workspaces + roles for agencies managing many clients
API + MCP first-class Automate everything; your AI assistant can post for you
AGPL-licensed Inspect every line, fork it, ship it — forever free

Features

Visual Calendar See every scheduled post at a glance, switch between month/week/day
Multi-Platform Composer One draft → preview & tweak for every network in parallel
AI Generate / Review Draft from a prompt, get inline feedback before you publish
AI Carousel Builder Prompt → multi-slide carousel with images, on-brand
Brand Profile Tone, voice, language, colors — applied to every AI call
Asset Library Reusable workspace media + Unsplash & Giphy search built in
Signatures & Labels Reusable text blocks (hashtags, CTAs) and color-coded post tags
Team Collaboration Owner / Admin / Member roles, comments with @mentions on drafts
Workspaces Isolate brands, clients, or projects in their own spaces
REST API + MCP Full programmatic control; AI assistants integrate natively
Analytics Per-account engagement metrics across every supported platform
Multi-language English, Spanish, Portuguese

Supported Platforms


X (Twitter)

LinkedIn

Facebook

Instagram

TikTok

YouTube

Pinterest

Threads

Bluesky

Mastodon

Get Started

Try it on Cloud The fastest way. Sign up at trypost.it
Self-host Free forever. Installation guide →
Run with AI assistants Connect Claude / Cursor / ChatGPT via MCP →

Contributing

We love contributions, no matter how small. Pick an issue, say hi in Discussions, or just open a PR with what you'd like to see.

If TryPost is useful to you, a star helps more people find it. That's the most valuable contribution if you're short on time.

License

GNU Affero General Public License v3.0 — use, modify, fork, self-host, and redistribute, including commercially. If you run a modified version as a network service, you need to make your changes available to its users (AGPL §13).


Built openly by the community. Star us on GitHub and tell a friend.