diff --git a/.env.example b/.env.example index 6d4c3104..fc3ed8b5 100644 --- a/.env.example +++ b/.env.example @@ -102,7 +102,10 @@ SPACES_BUCKET= LINKEDIN_CLIENT_ID= LINKEDIN_CLIENT_SECRET= LINKEDIN_CLIENT_REDIRECT="${APP_URL}/accounts/linkedin/callback" +# LINKEDIN_SCOPES="openid,profile,email,w_member_social" LINKEDIN_PAGE_CLIENT_REDIRECT="${APP_URL}/accounts/linkedin-page/callback" +LINKEDIN_PAGE_CLIENT_REDIRECT="${APP_URL}/accounts/linkedin-page/callback" +# LINKEDIN_PAGE_SCOPES="openid,profile,email,w_organization_social,r_organization_social,rw_organization_admin,w_member_social" # X / Twitter (https://developer.twitter.com) X_CLIENT_ID= diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 451f220d..06984c35 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1 @@ -github: [trypostit] +github: [paulocastellano] diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 00000000..b27105bc --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,45 @@ +# TryPost — Code Review Instructions + +Laravel 13 + Inertia 3 (Vue 3 + TypeScript) + Tailwind 4, PHP 8.4, Pest 4. Flag violations of these project conventions; cite `file:line`. Skip nits the linters (Pint/ESLint) already catch. + +## Backend validation +- Validation MUST live in a `FormRequest` subclass under `app/Http/Requests/App//` (or `Api/`), type-hinted in the controller action. Name `Request` (e.g. `StorePostRequest`). Flag any inline `$request->validate([...])` in a controller. + +## Eloquent & responses +- API JSON MUST go through an Eloquent API Resource (`JsonResource`). Flag `response()->json([...])` that maps models inline. +- Explicit status codes use `Symfony\Component\HttpFoundation\Response` constants — `Response::HTTP_CREATED`, never `201`. + +## PHP idioms +- In Action/service classes use `data_get($data, 'key', $default)` — flag direct `$data['key']` or `$data['k'] ?? $x`. +- Imports at the top via `use`; flag inline refs like `\DB::`, `\Str::uuid()`. +- Double-quoted interpolation with curly braces: `"workspace.{$id}"`, not `'workspace.'.$id`. +- Constructor property promotion; explicit return types + param type hints; `declare(strict_types=1)`; curly braces on every control structure (even one-liners); TitleCase enum keys; prefer PHPDoc (with array-shape types) over inline comments. + +## Migrations (app is in production) +- Schema changes go in NEW migrations. Flag any edit to an existing migration file. + +## Storage & external URLs +- Never pass a disk name to `Storage::` or `->store()` — use the default disk. +- Third-party API hosts / OAuth endpoints come from `config/trypost.php` (`platforms.`), never hardcoded (e.g. `https://api.x.com`). Tests must `Http::fake` the same `config(...)` value, not a literal URL. Only the host is config; protocol path segments (`/oauth2/token`) stay inline. + +## AI agents (`app/Ai/Agents`) +- Never embed prompts in PHP (heredocs / long string literals in `instructions()`). Instruction text lives in Blade under `resources/views/prompts/`; return `view('prompts....', [...])->render()` passing only needed vars. + +## Frontend (Vue / TypeScript) +- Arrow functions only — flag `function` declarations. +- Icons from `@tabler/icons-vue` (Icon-prefixed, e.g. `IconCheck`). Flag `lucide-vue-next`. +- Dates: `@/dayjs` for calculation, `@/date` for display formatting — flag raw `new Date()`. +- Routes: Wayfinder helpers from `@/routes` / `@/actions` — flag hardcoded URLs like `href="/register"`. After route/controller changes, `wayfinder:generate` must be run. +- No HTML5 validation attributes (`required`, `minlength`, `pattern`, …) — rely solely on backend validation. +- Vue components have a single root element. Reuse existing components/composables before adding new ones. +- ``: primary action button FIRST in the markup, then cancel/secondary. + +## Pagination +- Use `->paginate()` only (never `cursorPaginate()`). Paginated lists use Inertia scroll (`Inertia::scroll()` + ``) — flag traditional page-number/link pagination. + +## Tests (required) +- Every behavioral change needs a test, new or updated. Flag logic changes shipped without tests. +- Feature & Dusk tests MUST use named routes via `route('...')` — flag hardcoded URL strings. Dusk interacts/asserts via `@dusk` selectors, never CSS classes, tags, or text. + +## Git +- No `Co-Authored-By` lines or AI attribution in commit messages or PR descriptions. diff --git a/.github/workflows/release-docker.yml b/.github/workflows/release-docker.yml new file mode 100644 index 00000000..9558ca02 --- /dev/null +++ b/.github/workflows/release-docker.yml @@ -0,0 +1,130 @@ +name: Publish Docker image + +# Builds the production image and publishes it to GitHub Container Registry +# (GHCR) on every version tag. amd64 and arm64 are built on native runners, +# then stitched into one multi-arch manifest — no QEMU emulation. + +on: + push: + tags: + - 'v*.*.*' + workflow_dispatch: + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build: + name: Build (${{ matrix.platform }}) + runs-on: ${{ matrix.runner }} + strategy: + fail-fast: false + matrix: + include: + - platform: linux/amd64 + runner: ubuntu-latest + - platform: linux/arm64 + runner: ubuntu-24.04-arm + permissions: + contents: read + packages: write + steps: + - name: Prepare platform slug + run: echo "PLATFORM_PAIR=${platform//\//-}" >> "$GITHUB_ENV" + env: + platform: ${{ matrix.platform }} + + - name: Checkout + uses: actions/checkout@v4 + + - name: Docker metadata (labels) + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to GHCR + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build and push by digest + id: build + uses: docker/build-push-action@v6 + with: + context: . + file: docker/Dockerfile + target: production + platforms: ${{ matrix.platform }} + labels: ${{ steps.meta.outputs.labels }} + build-args: | + VITE_REVERB_APP_KEY=trypost-reverb-key + cache-from: type=gha,scope=${{ env.PLATFORM_PAIR }} + cache-to: type=gha,mode=max,scope=${{ env.PLATFORM_PAIR }} + outputs: type=image,name=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }},push-by-digest=true,name-canonical=true,push=true + + - name: Export digest + run: | + mkdir -p "${{ runner.temp }}/digests" + digest="${{ steps.build.outputs.digest }}" + touch "${{ runner.temp }}/digests/${digest#sha256:}" + + - name: Upload digest + uses: actions/upload-artifact@v4 + with: + name: digests-${{ env.PLATFORM_PAIR }} + path: ${{ runner.temp }}/digests/* + if-no-files-found: error + retention-days: 1 + + merge: + name: Merge multi-arch manifest + runs-on: ubuntu-latest + needs: [build] + permissions: + contents: read + packages: write + steps: + - name: Download digests + uses: actions/download-artifact@v4 + with: + path: ${{ runner.temp }}/digests + pattern: digests-* + merge-multiple: true + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Docker metadata (tags) + id: meta + uses: docker/metadata-action@v5 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} + type=raw,value=latest + + - name: Log in to GHCR + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Create and push manifest list + working-directory: ${{ runner.temp }}/digests + run: | + docker buildx imagetools create \ + $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \ + $(printf '${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@sha256:%s ' *) + + - name: Inspect published image + run: docker buildx imagetools inspect ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ steps.meta.outputs.version }} diff --git a/Caddyfile b/Caddyfile new file mode 100644 index 00000000..add53be2 --- /dev/null +++ b/Caddyfile @@ -0,0 +1,6 @@ +# Caddy serves TryPost on your domain with automatic HTTPS (Let's Encrypt). +# APP_DOMAIN is provided by the caddy service in compose.prod.yaml. +# reverse_proxy transparently passes through WebSocket upgrades (Reverb on /app). +{$APP_DOMAIN} { + reverse_proxy app:80 +} diff --git a/README.md b/README.md index 3e96fdeb..106e5c40 100644 --- a/README.md +++ b/README.md @@ -114,3 +114,15 @@ ## License

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

+ +--- + +## Star History + +

+ + + + Star History Chart + +

diff --git a/app/Actions/Automation/Node/RunGenerateNode.php b/app/Actions/Automation/Node/RunGenerateNode.php index cec14a56..96c8006f 100644 --- a/app/Actions/Automation/Node/RunGenerateNode.php +++ b/app/Actions/Automation/Node/RunGenerateNode.php @@ -198,7 +198,7 @@ private function humanize(Workspace $workspace, array $structured, string $forma * Derive the generator format and slide count from per-account content types. * * Carousel-capable content types: - * - instagram_carousel (Instagram feed carousel) + * - instagram_feed (Instagram feed carousel = multi-image feed post) * - linkedin_carousel (LinkedIn personal carousel PDF) * - linkedin_page_carousel (LinkedIn page carousel PDF) * - pinterest_carousel (Pinterest carousel pin) @@ -215,7 +215,7 @@ private function humanize(Workspace $workspace, array $structured, string $forma public function deriveFormat(array $accountsConfig, array $config): array { $carouselCapable = [ - ContentType::InstagramCarousel->value, + ContentType::InstagramFeed->value, ContentType::LinkedInCarousel->value, ContentType::LinkedInPageCarousel->value, ContentType::PinterestCarousel->value, diff --git a/app/Enums/PostPlatform/AspectRatio.php b/app/Enums/PostPlatform/AspectRatio.php new file mode 100644 index 00000000..89a34e76 --- /dev/null +++ b/app/Enums/PostPlatform/AspectRatio.php @@ -0,0 +1,27 @@ + 4 / 5, + self::Landscape => 16 / 9, + self::Square, self::Original => 1.0, + }; + } +} diff --git a/app/Enums/PostPlatform/ContentType.php b/app/Enums/PostPlatform/ContentType.php index 3dc02193..6fdf0e3d 100644 --- a/app/Enums/PostPlatform/ContentType.php +++ b/app/Enums/PostPlatform/ContentType.php @@ -10,7 +10,6 @@ enum ContentType: string { // Instagram case InstagramFeed = 'instagram_feed'; - case InstagramCarousel = 'instagram_carousel'; case InstagramReel = 'instagram_reel'; case InstagramStory = 'instagram_story'; @@ -51,11 +50,16 @@ enum ContentType: string // Mastodon case MastodonPost = 'mastodon_post'; + /** + * AI generation format for an Instagram carousel. Not a content type — + * carousel posts are persisted as InstagramFeed. + */ + public const CAROUSEL_FORMAT = 'instagram_carousel'; + public function label(): string { return match ($this) { self::InstagramFeed => 'Feed Post', - self::InstagramCarousel => 'Carousel', self::InstagramReel => 'Reel', self::InstagramStory => 'Story', self::LinkedInPost, self::LinkedInPagePost => 'Post', @@ -84,7 +88,7 @@ public function description(): string public function platform(): SocialPlatform { return match ($this) { - self::InstagramFeed, self::InstagramCarousel, self::InstagramReel, self::InstagramStory => SocialPlatform::Instagram, + self::InstagramFeed, self::InstagramReel, self::InstagramStory => SocialPlatform::Instagram, self::LinkedInPost, self::LinkedInCarousel => SocialPlatform::LinkedIn, self::LinkedInPagePost, self::LinkedInPageCarousel => SocialPlatform::LinkedInPage, self::FacebookPost, self::FacebookReel, self::FacebookStory => SocialPlatform::Facebook, @@ -109,7 +113,6 @@ public function aiImageDimensions(): array return match ($this) { // Vertical 4:5 (Instagram preferred portrait, Threads mirrors it) self::InstagramFeed, - self::InstagramCarousel, self::ThreadsPost => ['width' => 1080, 'height' => 1350], // Square 1:1 (LinkedIn, X, Facebook, Bluesky, Mastodon) @@ -135,7 +138,7 @@ public function aiImageDimensions(): array public function aspectRatio(): ?string { return match ($this) { - self::InstagramFeed, self::InstagramCarousel => '4:5', + self::InstagramFeed => '4:5', self::InstagramReel, self::InstagramStory => '9:16', self::FacebookReel, self::FacebookStory => '9:16', self::TikTokVideo, self::YouTubeShort => '9:16', @@ -149,8 +152,7 @@ public function aspectRatio(): ?string public function maxMediaCount(): int { return match ($this) { - self::InstagramFeed => 1, - self::InstagramCarousel => 10, + self::InstagramFeed => 10, self::InstagramReel, self::InstagramStory => 1, self::LinkedInPost, self::LinkedInPagePost => 1, self::LinkedInCarousel, self::LinkedInPageCarousel => 20, @@ -172,7 +174,6 @@ public function supportsVideo(): bool { return match ($this) { self::InstagramFeed, self::InstagramReel, self::InstagramStory => true, - self::InstagramCarousel => false, self::LinkedInPost, self::LinkedInPagePost => true, self::LinkedInCarousel, self::LinkedInPageCarousel => false, self::FacebookPost, self::FacebookReel, self::FacebookStory => true, @@ -237,7 +238,6 @@ public static function aiSupported(): array { return [ self::InstagramFeed, - self::InstagramCarousel, self::InstagramStory, self::LinkedInPost, self::LinkedInPagePost, diff --git a/app/Http/Controllers/Api/PostController.php b/app/Http/Controllers/Api/PostController.php index fefa3d0e..30be5e48 100644 --- a/app/Http/Controllers/Api/PostController.php +++ b/app/Http/Controllers/Api/PostController.php @@ -75,7 +75,10 @@ public function update(UpdatePostRequest $request, Post $post): PostResource|Jso ); } - return new PostResource(data_get($result, 'post')); + $updated = data_get($result, 'post'); + $updated->load(['postPlatforms.socialAccount']); + + return new PostResource($updated); } public function destroy(Request $request, Post $post): JsonResponse diff --git a/app/Http/Controllers/Auth/LinkedInController.php b/app/Http/Controllers/Auth/LinkedInController.php index 4dd59e4e..a493d725 100644 --- a/app/Http/Controllers/Auth/LinkedInController.php +++ b/app/Http/Controllers/Auth/LinkedInController.php @@ -22,14 +22,6 @@ class LinkedInController extends SocialController protected SocialPlatform $platform = SocialPlatform::LinkedIn; - protected array $scopes = [ - 'openid', - 'profile', - 'email', - 'r_basicprofile', - 'w_member_social', - ]; - public function connect(Request $request): Response|RedirectResponse { $this->ensurePlatformEnabled(); @@ -42,7 +34,7 @@ public function connect(Request $request): Response|RedirectResponse $this->authorize('manageAccounts', $workspace); - return $this->redirectToProvider($request, $this->driver, $this->scopes); + return $this->redirectToProvider($request, $this->driver, config('trypost.platforms.linkedin.scopes')); } public function callback(Request $request): View diff --git a/app/Http/Controllers/Auth/LinkedInPageController.php b/app/Http/Controllers/Auth/LinkedInPageController.php index 03d58096..c60c6815 100644 --- a/app/Http/Controllers/Auth/LinkedInPageController.php +++ b/app/Http/Controllers/Auth/LinkedInPageController.php @@ -24,16 +24,6 @@ class LinkedInPageController extends SocialController protected SocialPlatform $platform = SocialPlatform::LinkedInPage; - protected array $scopes = [ - 'openid', - 'profile', - 'email', - 'w_organization_social', - 'r_organization_social', - 'rw_organization_admin', - 'w_member_social', - ]; - public function connect(Request $request): SymfonyResponse|RedirectResponse { $this->ensurePlatformEnabled(); @@ -55,7 +45,7 @@ public function connect(Request $request): SymfonyResponse|RedirectResponse return Inertia::location( Socialite::driver($this->driver) - ->scopes($this->scopes) + ->scopes(config('trypost.platforms.linkedin-page.scopes')) ->with([ 'redirect_uri' => config('services.linkedin-openid.redirect_page'), ]) @@ -80,7 +70,7 @@ public function callback(Request $request): View|RedirectResponse try { $socialUser = Socialite::driver($this->driver) - ->scopes($this->scopes) + ->scopes(config('trypost.platforms.linkedin-page.scopes')) ->with([ 'redirect_uri' => config('services.linkedin-openid.redirect_page'), ]) diff --git a/app/Http/Requests/Api/Post/StorePostRequest.php b/app/Http/Requests/Api/Post/StorePostRequest.php index 309f1ed9..979a448c 100644 --- a/app/Http/Requests/Api/Post/StorePostRequest.php +++ b/app/Http/Requests/Api/Post/StorePostRequest.php @@ -4,6 +4,7 @@ namespace App\Http\Requests\Api\Post; +use App\Enums\PostPlatform\AspectRatio; use App\Enums\PostPlatform\ContentType; use App\Enums\SocialAccount\Platform; use App\Models\SocialAccount; @@ -49,6 +50,8 @@ public function rules(): array Rule::in(array_column(ContentType::cases(), 'value')), new ContentTypeMatchesPlatform, ], + 'platforms.*.meta' => ['sometimes', 'nullable', 'array'], + 'platforms.*.meta.aspect_ratio' => ['sometimes', 'nullable', 'string', Rule::enum(AspectRatio::class)], 'scheduled_at' => ['nullable', 'date', 'after:now'], 'label_ids' => ['sometimes', 'array'], 'label_ids.*' => [ diff --git a/app/Http/Requests/Api/Post/UpdatePostRequest.php b/app/Http/Requests/Api/Post/UpdatePostRequest.php index 95315781..939e4a5d 100644 --- a/app/Http/Requests/Api/Post/UpdatePostRequest.php +++ b/app/Http/Requests/Api/Post/UpdatePostRequest.php @@ -5,6 +5,7 @@ namespace App\Http\Requests\Api\Post; use App\Enums\Post\Status; +use App\Enums\PostPlatform\AspectRatio; use App\Enums\PostPlatform\ContentType; use App\Enums\SocialAccount\Platform; use App\Models\Post; @@ -51,6 +52,7 @@ public function rules(): array new ContentTypeMatchesPostPlatform, ], 'platforms.*.meta' => ['nullable', 'array'], + 'platforms.*.meta.aspect_ratio' => ['sometimes', 'nullable', 'string', Rule::enum(AspectRatio::class)], 'scheduled_at' => [ 'nullable', 'date', diff --git a/app/Http/Requests/App/Ai/StartPostCreationRequest.php b/app/Http/Requests/App/Ai/StartPostCreationRequest.php index 2977f7b1..40fe56a4 100644 --- a/app/Http/Requests/App/Ai/StartPostCreationRequest.php +++ b/app/Http/Requests/App/Ai/StartPostCreationRequest.php @@ -20,11 +20,14 @@ public function authorize(): bool */ public function rules(): array { + $allowedFormats = array_map(fn (ContentType $t) => $t->value, ContentType::aiSupported()); + $allowedFormats[] = ContentType::CAROUSEL_FORMAT; + return [ 'format' => [ 'required', 'string', - Rule::in(array_map(fn (ContentType $t) => $t->value, ContentType::aiSupported())), + Rule::in($allowedFormats), ], 'social_account_id' => ['nullable', 'uuid'], 'image_count' => ['nullable', 'integer', 'min:0', 'max:10'], diff --git a/app/Http/Requests/App/Post/UpdatePostRequest.php b/app/Http/Requests/App/Post/UpdatePostRequest.php index eaa2d2af..47941085 100644 --- a/app/Http/Requests/App/Post/UpdatePostRequest.php +++ b/app/Http/Requests/App/Post/UpdatePostRequest.php @@ -6,6 +6,7 @@ use App\Enums\Media\Source; use App\Enums\Post\Status; +use App\Enums\PostPlatform\AspectRatio; use App\Enums\PostPlatform\ContentType; use App\Enums\SocialAccount\Platform; use App\Rules\ContentFitsPlatformLimits; @@ -70,7 +71,7 @@ public function rules(): array Rule::when($enforcesMediaCompatibility, [new ContentTypeCompatibleWithMedia]), ], 'platforms.*.meta' => ['nullable', 'array'], - 'platforms.*.meta.aspect_ratio' => ['sometimes', 'nullable', 'string', Rule::in(['1:1', '4:5', '16:9', 'original'])], + 'platforms.*.meta.aspect_ratio' => ['sometimes', 'nullable', 'string', Rule::enum(AspectRatio::class)], 'platforms.*.meta.privacy_level' => ['sometimes', 'nullable', 'string', Rule::in(['PUBLIC_TO_EVERYONE', 'MUTUAL_FOLLOW_FRIENDS', 'FOLLOWER_OF_CREATOR', 'SELF_ONLY'])], 'platforms.*.meta.auto_add_music' => ['sometimes', 'boolean'], 'platforms.*.meta.allow_comments' => ['sometimes', 'boolean'], diff --git a/app/Http/Requests/App/Workspace/UpdateWorkspaceRequest.php b/app/Http/Requests/App/Workspace/UpdateWorkspaceRequest.php index 3abeec7f..40514942 100644 --- a/app/Http/Requests/App/Workspace/UpdateWorkspaceRequest.php +++ b/app/Http/Requests/App/Workspace/UpdateWorkspaceRequest.php @@ -29,8 +29,8 @@ public function rules(): array 'brand_color' => $hex, 'background_color' => $hex, 'text_color' => $hex, - 'brand_font' => ['required', 'string', Rule::in(BrandFont::values())], - 'image_style' => ['required', 'string', Rule::in(ImageStyle::values())], + 'brand_font' => ['sometimes', 'required', 'string', Rule::in(BrandFont::values())], + 'image_style' => ['sometimes', 'required', 'string', Rule::in(ImageStyle::values())], 'content_language' => ['sometimes', 'string', 'in:en,pt-BR,es'], ]; } diff --git a/app/Http/Resources/Api/PostPlatformResource.php b/app/Http/Resources/Api/PostPlatformResource.php index 147179e9..3995c87c 100644 --- a/app/Http/Resources/Api/PostPlatformResource.php +++ b/app/Http/Resources/Api/PostPlatformResource.php @@ -18,6 +18,7 @@ public function toArray(Request $request): array 'id' => $this->id, 'platform' => $this->platform?->value, 'content_type' => $this->content_type?->value, + 'meta' => $this->meta, 'status' => $this->status?->value, 'enabled' => $this->enabled, 'platform_url' => $this->platform_url, diff --git a/app/Jobs/Ai/StreamPostCreation.php b/app/Jobs/Ai/StreamPostCreation.php index 780a32a2..1406c11c 100644 --- a/app/Jobs/Ai/StreamPostCreation.php +++ b/app/Jobs/Ai/StreamPostCreation.php @@ -52,7 +52,7 @@ public function handle(): void $workspace = Workspace::findOrFail($this->workspaceId); $socialAccount = $this->socialAccountId ? SocialAccount::find($this->socialAccountId) : null; - $isCarousel = $this->format === 'instagram_carousel'; + $isCarousel = $this->format === ContentType::CAROUSEL_FORMAT; $agentFormat = $isCarousel ? 'carousel' : 'single'; $slideCount = $isCarousel && $this->imageCount > 0 ? $this->imageCount : 1; @@ -120,13 +120,26 @@ public function handle(): void */ private function dimensionsForFormat(): array { - $type = ContentType::tryFrom($this->format); + $type = $this->resolvedContentType(); return $type ? $type->aiImageDimensions() : ['width' => TemplateImageGenerator::DEFAULT_WIDTH, 'height' => TemplateImageGenerator::DEFAULT_HEIGHT]; } + /** + * The stored content type for the requested generation format. The carousel + * generation format is persisted as an Instagram feed post. + */ + private function resolvedContentType(): ?ContentType + { + if ($this->format === ContentType::CAROUSEL_FORMAT) { + return ContentType::InstagramFeed; + } + + return ContentType::tryFrom($this->format); + } + private function humanize(Workspace $workspace, array $structured, string $format): array { try { @@ -277,23 +290,20 @@ private function createPost(Workspace $workspace, string $content, array $media, 'date' => $this->date, ]); - $contentType = ContentType::tryFrom($this->format); + $contentType = $this->resolvedContentType(); if ($contentType && $socialAccount) { $aspectRatio = $this->aspectRatioFor($contentType); - $platformContentType = $contentType === ContentType::InstagramCarousel - ? ContentType::InstagramFeed - : $contentType; $post->postPlatforms() ->where('social_account_id', $socialAccount->id) - ->each(function ($platform) use ($aspectRatio, $platformContentType): void { + ->each(function ($platform) use ($aspectRatio, $contentType): void { $meta = $platform->meta ?? []; if ($aspectRatio !== null) { $meta['aspect_ratio'] = $aspectRatio; } $platform->meta = $meta; - $platform->content_type = $platformContentType->value; + $platform->content_type = $contentType->value; $platform->enabled = true; $platform->save(); }); diff --git a/app/Mcp/Tools/Post/CreatePostTool.php b/app/Mcp/Tools/Post/CreatePostTool.php index 1709dbc5..35437834 100644 --- a/app/Mcp/Tools/Post/CreatePostTool.php +++ b/app/Mcp/Tools/Post/CreatePostTool.php @@ -5,6 +5,7 @@ namespace App\Mcp\Tools\Post; use App\Actions\Post\CreatePost; +use App\Enums\PostPlatform\AspectRatio; use App\Enums\PostPlatform\ContentType; use App\Http\Resources\Api\PostResource; use App\Rules\ContentTypeMatchesPlatform; @@ -37,6 +38,8 @@ public function handle(Request $request): ResponseFactory ->where('is_active', true), ], 'platforms.*.content_type' => ['required', 'string', Rule::in(array_column(ContentType::cases(), 'value')), new ContentTypeMatchesPlatform], + 'platforms.*.meta' => ['sometimes', 'array'], + 'platforms.*.meta.aspect_ratio' => ['sometimes', 'nullable', 'string', Rule::enum(AspectRatio::class)], ]); $post = CreatePost::execute($workspace, $request->user(), $validated); @@ -58,6 +61,7 @@ public function schema(JsonSchema $schema): array ->items($schema->object(fn ($p) => [ 'social_account_id' => $p->string()->required()->description('UUID of the connected social account.'), 'content_type' => $p->string()->required()->description('Format for this platform (e.g. linkedin_post, x_post, instagram_feed).'), + 'meta' => $p->object()->description('Per-platform metadata (e.g. aspect_ratio: 1:1|4:5|16:9|original for Instagram/Facebook feed images).'), ])) ->description('Platforms to publish on. Accounts not listed remain available but disabled.'), ]; diff --git a/app/Mcp/Tools/Post/UpdatePostTool.php b/app/Mcp/Tools/Post/UpdatePostTool.php index 564e633f..c3e26aae 100644 --- a/app/Mcp/Tools/Post/UpdatePostTool.php +++ b/app/Mcp/Tools/Post/UpdatePostTool.php @@ -7,6 +7,7 @@ use App\Actions\Post\UpdatePost; use App\Enums\Post\Action as PostAction; use App\Enums\Post\Status; +use App\Enums\PostPlatform\AspectRatio; use App\Enums\PostPlatform\ContentType; use App\Http\Resources\Api\PostResource; use App\Models\Post; @@ -49,6 +50,7 @@ public function handle(Request $request): Response|ResponseFactory ], 'platforms.*.content_type' => ['sometimes', 'string', Rule::in(array_column(ContentType::cases(), 'value')), new ContentTypeMatchesPostPlatform], 'platforms.*.meta' => ['sometimes', 'array'], + 'platforms.*.meta.aspect_ratio' => ['sometimes', 'nullable', 'string', Rule::enum(AspectRatio::class)], ]); $payload = collect($validated)->except('post_id')->all(); diff --git a/app/Services/Social/Concerns/CropsImageForAspectRatio.php b/app/Services/Social/Concerns/CropsImageForAspectRatio.php new file mode 100644 index 00000000..ae4cefdb --- /dev/null +++ b/app/Services/Social/Concerns/CropsImageForAspectRatio.php @@ -0,0 +1,63 @@ +aspectRatioToFloat($aspectRatio); + + $tempInput = tempnam(sys_get_temp_dir(), 'crop_in_'); + + try { + $download = Http::sink($tempInput)->timeout(120)->get($imageUrl); + + if ($download->failed()) { + throw $this->cropFailureException('Failed to download image for cropping'); + } + + $cropped = app(MediaOptimizer::class)->cropToAspectRatio($tempInput, $ratio); + + $path = self::CROP_DIRECTORY.'/'.Str::uuid()->toString().'.jpg'; + Storage::put($path, file_get_contents($cropped)); + + @unlink($cropped); + + return Storage::url($path); + } finally { + @unlink($tempInput); + } + } + + protected function aspectRatioToFloat(string $ratio): float + { + return AspectRatio::tryFrom($ratio)?->toFloat() ?? 1.0; + } + + /** + * The platform-specific exception thrown when the source image cannot be + * downloaded for cropping. + */ + abstract protected function cropFailureException(string $message): SocialPublishException; +} diff --git a/app/Services/Social/FacebookPublisher.php b/app/Services/Social/FacebookPublisher.php index b7133e36..9816fc9d 100644 --- a/app/Services/Social/FacebookPublisher.php +++ b/app/Services/Social/FacebookPublisher.php @@ -7,7 +7,9 @@ use App\Enums\PostPlatform\ContentType; use App\Exceptions\Social\ErrorCategory; use App\Exceptions\Social\FacebookPublishException; +use App\Exceptions\Social\SocialPublishException; use App\Models\PostPlatform; +use App\Services\Social\Concerns\CropsImageForAspectRatio; use App\Services\Social\Concerns\HasSocialHttpClient; use Illuminate\Http\Client\PendingRequest; use Illuminate\Http\Client\Response; @@ -16,6 +18,7 @@ class FacebookPublisher { + use CropsImageForAspectRatio; use HasSocialHttpClient; private string $baseUrl; @@ -46,16 +49,17 @@ public function publish(PostPlatform $postPlatform): array $media = $postPlatform->post->mediaItems; $contentType = $postPlatform->content_type; + $aspectRatio = data_get($postPlatform->meta, 'aspect_ratio'); return match ($contentType) { ContentType::FacebookReel => $this->publishReel($pageId, $accessToken, $content, $media->first()), ContentType::FacebookStory => $this->publishStory($pageId, $accessToken, $media->first()), - ContentType::FacebookPost => $this->publishPost($pageId, $accessToken, $content, $media), + ContentType::FacebookPost => $this->publishPost($pageId, $accessToken, $content, $media, $aspectRatio), default => throw new \Exception("Unsupported Facebook content type: {$contentType?->value}"), }; } - private function publishPost(string $pageId, string $accessToken, ?string $content, $media): array + private function publishPost(string $pageId, string $accessToken, ?string $content, $media, ?string $aspectRatio): array { // Text only post if ($media->isEmpty()) { @@ -77,10 +81,10 @@ private function publishPost(string $pageId, string $accessToken, ?string $conte if ($isImage) { // Single or multiple images if ($media->count() === 1) { - return $this->publishSingleImagePost($pageId, $accessToken, $content, $firstMedia); + return $this->publishSingleImagePost($pageId, $accessToken, $content, $firstMedia, $aspectRatio); } - return $this->publishMultiImagePost($pageId, $accessToken, $content, $media); + return $this->publishMultiImagePost($pageId, $accessToken, $content, $media, $aspectRatio); } throw new \Exception('Unsupported media type for Facebook'); @@ -110,10 +114,10 @@ private function publishTextPost(string $pageId, string $accessToken, string $co ]; } - private function publishSingleImagePost(string $pageId, string $accessToken, ?string $content, $media): array + private function publishSingleImagePost(string $pageId, string $accessToken, ?string $content, $media, ?string $aspectRatio): array { $payload = [ - 'url' => $media->url, + 'url' => $this->cropImageForAspectRatio($media->url, $aspectRatio), 'access_token' => $accessToken, ]; @@ -140,7 +144,7 @@ private function publishSingleImagePost(string $pageId, string $accessToken, ?st ]; } - private function publishMultiImagePost(string $pageId, string $accessToken, ?string $content, $mediaCollection): array + private function publishMultiImagePost(string $pageId, string $accessToken, ?string $content, $mediaCollection, ?string $aspectRatio): array { // Upload each image as unpublished $attachedMedia = []; @@ -151,7 +155,7 @@ private function publishMultiImagePost(string $pageId, string $accessToken, ?str } $uploadResponse = $this->facebookHttp()->post("{$this->baseUrl}/{$pageId}/photos", [ - 'url' => $media->url, + 'url' => $this->cropImageForAspectRatio($media->url, $aspectRatio), 'published' => 'false', 'access_token' => $accessToken, ]); @@ -392,4 +396,12 @@ private function handleApiError(Response $response): never { throw FacebookPublishException::fromApiResponse($response); } + + protected function cropFailureException(string $message): SocialPublishException + { + return new FacebookPublishException( + userMessage: $message, + category: ErrorCategory::ServerError, + ); + } } diff --git a/app/Services/Social/InstagramPublisher.php b/app/Services/Social/InstagramPublisher.php index c22bef71..23e684d8 100644 --- a/app/Services/Social/InstagramPublisher.php +++ b/app/Services/Social/InstagramPublisher.php @@ -7,17 +7,16 @@ use App\Enums\PostPlatform\ContentType; use App\Exceptions\Social\ErrorCategory; use App\Exceptions\Social\InstagramPublishException; +use App\Exceptions\Social\SocialPublishException; use App\Models\PostPlatform; -use App\Services\Media\MediaOptimizer; +use App\Services\Social\Concerns\CropsImageForAspectRatio; use App\Services\Social\Concerns\HasSocialHttpClient; use Illuminate\Http\Client\Response; -use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Log; -use Illuminate\Support\Facades\Storage; -use Illuminate\Support\Str; class InstagramPublisher { + use CropsImageForAspectRatio; use HasSocialHttpClient; private string $baseUrl; @@ -80,7 +79,7 @@ private function publishFeed(string $instagramId, string $accessToken, ?string $ private function publishSingleImage(string $instagramId, string $accessToken, ?string $content, $media, ?string $aspectRatio): array { - $imageUrl = $this->cropForFeed($media->url, $aspectRatio); + $imageUrl = $this->cropImageForAspectRatio($media->url, $aspectRatio); // Step 1: Create container $containerResponse = $this->socialHttp()->post("{$this->baseUrl}/{$instagramId}/media", [ @@ -206,7 +205,7 @@ private function publishCarousel(string $instagramId, string $accessToken, ?stri $params['video_url'] = $media->url; $params['media_type'] = 'VIDEO'; } else { - $params['image_url'] = $this->cropForFeed($media->url, $aspectRatio); + $params['image_url'] = $this->cropImageForAspectRatio($media->url, $aspectRatio); } $containerResponse = $this->socialHttp()->post("{$this->baseUrl}/{$instagramId}/media", $params); @@ -311,52 +310,12 @@ private function publishContainer(string $instagramId, string $accessToken, stri ]; } - /** - * Crop the image to the user-selected aspect ratio and return a public URL - * Instagram can fetch. Returns the original URL untouched when no ratio is - * set or 'original' is selected (caller has already validated the original - * fits IG's 4:5 to 1.91:1 range). - */ - private function cropForFeed(string $imageUrl, ?string $aspectRatio): string + protected function cropFailureException(string $message): SocialPublishException { - if (! $aspectRatio || $aspectRatio === 'original') { - return $imageUrl; - } - - $ratio = $this->aspectRatioToFloat($aspectRatio); - - $tempInput = tempnam(sys_get_temp_dir(), 'ig_crop_in_'); - - try { - $download = Http::sink($tempInput)->timeout(120)->get($imageUrl); - - if ($download->failed()) { - throw new InstagramPublishException( - userMessage: 'Failed to download image for cropping', - category: ErrorCategory::ServerError, - ); - } - - $cropped = app(MediaOptimizer::class)->cropToAspectRatio($tempInput, $ratio); - - $path = 'instagram-crops/'.Str::uuid()->toString().'.jpg'; - Storage::put($path, file_get_contents($cropped)); - - @unlink($cropped); - - return Storage::url($path); - } finally { - @unlink($tempInput); - } - } - - private function aspectRatioToFloat(string $ratio): float - { - return match ($ratio) { - '4:5' => 4 / 5, - '16:9' => 16 / 9, - default => 1.0, - }; + return new InstagramPublishException( + userMessage: $message, + category: ErrorCategory::ServerError, + ); } private function waitForMediaProcessing(string $containerId, string $accessToken, int $maxAttempts = 30): void diff --git a/app/Services/Social/TikTokPublisher.php b/app/Services/Social/TikTokPublisher.php index d26a8a8a..55d08c84 100644 --- a/app/Services/Social/TikTokPublisher.php +++ b/app/Services/Social/TikTokPublisher.php @@ -108,7 +108,7 @@ private function buildVideoPostInfo(PostPlatform $postPlatform, ?string $content 'title' => $content ?? '', 'privacy_level' => $this->resolveRequiredPrivacyLevel($postPlatform), 'disable_duet' => ! data_get($meta, 'allow_duet', false), - 'disable_comment' => ! data_get($meta, 'allow_comments', true), + 'disable_comment' => ! data_get($meta, 'allow_comments', false), 'disable_stitch' => ! data_get($meta, 'allow_stitch', false), ]; @@ -142,7 +142,7 @@ private function buildPhotoPostInfo(PostPlatform $postPlatform, ?string $content $postInfo = [ 'description' => $content ?? '', 'privacy_level' => $this->resolveRequiredPrivacyLevel($postPlatform), - 'disable_comment' => ! data_get($meta, 'allow_comments', true), + 'disable_comment' => ! data_get($meta, 'allow_comments', false), ]; if (data_get($meta, 'brand_content_toggle', false)) { diff --git a/compose.prod.yaml b/compose.prod.yaml new file mode 100644 index 00000000..d5bafaab --- /dev/null +++ b/compose.prod.yaml @@ -0,0 +1,176 @@ +# TryPost — self-hosted production stack. +# +# 1. Generate an app key: docker compose -f compose.prod.yaml run --rm app php artisan key:generate --show +# Paste the value into APP_KEY below. +# 2. Edit APP_URL and the passwords marked "change me". +# 3. Start: docker compose -f compose.prod.yaml up -d +# +# This pulls the published image — no local build. Postgres, Redis, the queue +# workers, the scheduler and the WebSocket server all run for you. + +services: + app: + image: ghcr.io/trypostit/trypost:latest + container_name: trypost + restart: unless-stopped + environment: + # ===== Required ===== + APP_NAME: TryPost + APP_ENV: production + APP_DEBUG: "false" + APP_KEY: "" # <- run key:generate (see header) and paste here + APP_URL: http://localhost:8000 # <- your public URL, e.g. https://post.yourdomain.com + SELF_HOSTED: "true" + TRYPOST_TARGET: production + + # ===== Database (bundled postgres service below) ===== + DB_CONNECTION: pgsql + DB_HOST: pgsql + DB_PORT: "5432" + DB_DATABASE: trypost + DB_USERNAME: trypost + DB_PASSWORD: trypost-password # <- change me (must match POSTGRES_PASSWORD below) + + # ===== Redis / queue / cache / broadcasting ===== + REDIS_HOST: redis + REDIS_PORT: "6379" + QUEUE_CONNECTION: redis + CACHE_STORE: redis + SESSION_DRIVER: database + BROADCAST_CONNECTION: reverb + + # ===== WebSockets (Reverb) ===== + # The published image bakes the client at localhost:8080. For a custom + # domain, rebuild the image with --build-arg VITE_REVERB_HOST= + # VITE_REVERB_PORT=443 VITE_REVERB_SCHEME=https. + REVERB_APP_ID: "1001" + REVERB_APP_KEY: trypost-reverb-key # must match the key baked into the published image + REVERB_APP_SECRET: change-me-reverb-secret # <- change me + REVERB_HOST: localhost + REVERB_PORT: "8080" + REVERB_SCHEME: http + + # ===== Storage ===== + # Default: local disk, persisted in the "storage" volume below. + FILESYSTEM_DISK: public + # + # --- Cloudflare R2: set FILESYSTEM_DISK=r2 and fill these --- + # R2_ACCESS_KEY_ID: "" + # R2_SECRET_ACCESS_KEY: "" + # R2_ENDPOINT: "" + # R2_BUCKET: "" + # R2_URL: "" # public bucket URL (needed for media to display) + # + # --- AWS S3: set FILESYSTEM_DISK=s3 and fill these --- + # AWS_ACCESS_KEY_ID: "" + # AWS_SECRET_ACCESS_KEY: "" + # AWS_DEFAULT_REGION: us-east-1 + # AWS_BUCKET: "" + # AWS_URL: "" + + # ===== Mail ===== + # Defaults to "log" (emails written to the container log). Configure SMTP + # for real password-reset / team-invite emails. + MAIL_MAILER: log + MAIL_FROM_ADDRESS: hello@example.com + MAIL_FROM_NAME: TryPost + # MAIL_MAILER: smtp + # MAIL_HOST: "" + # MAIL_PORT: "587" + # MAIL_USERNAME: "" + # MAIL_PASSWORD: "" + # MAIL_SCHEME: tls + + # ===== Social platforms (fill in when you connect each network) ===== + # Redirect URI in each portal: ${APP_URL}/accounts//callback + # LINKEDIN_CLIENT_ID: "" + # LINKEDIN_CLIENT_SECRET: "" + # X_CLIENT_ID: "" + # X_CLIENT_SECRET: "" + # FACEBOOK_CLIENT_ID: "" + # FACEBOOK_CLIENT_SECRET: "" + # INSTAGRAM_CLIENT_ID: "" + # INSTAGRAM_CLIENT_SECRET: "" + # THREADS_CLIENT_ID: "" + # THREADS_CLIENT_SECRET: "" + # TIKTOK_CLIENT_ID: "" + # TIKTOK_CLIENT_SECRET: "" + # PINTEREST_CLIENT_ID: "" + # PINTEREST_CLIENT_SECRET: "" + # GOOGLE_CLIENT_ID: "" # YouTube + Google login + # GOOGLE_CLIENT_SECRET: "" + + # ===== AI (optional — leave blank to disable AI features) ===== + # OPENAI_API_KEY: "" + # ANTHROPIC_API_KEY: "" + # GEMINI_API_KEY: "" + ports: + - "8000:80" # app (nginx) + - "8080:8080" # Reverb WebSocket + volumes: + - storage:/var/www/html/storage/app + depends_on: + pgsql: + condition: service_healthy + redis: + condition: service_healthy + + pgsql: + image: postgres:16-alpine + container_name: trypost-pgsql + restart: unless-stopped + environment: + POSTGRES_DB: trypost + POSTGRES_USER: trypost + POSTGRES_PASSWORD: trypost-password # <- must match DB_PASSWORD above + volumes: + - pgdata:/var/lib/postgresql/data + healthcheck: + test: ['CMD-SHELL', 'pg_isready -U trypost -d trypost'] + interval: 10s + timeout: 5s + retries: 5 + + redis: + image: redis:7-alpine + container_name: trypost-redis + restart: unless-stopped + command: redis-server --appendonly yes + volumes: + - redisdata:/data + healthcheck: + test: ['CMD', 'redis-cli', 'ping'] + interval: 10s + timeout: 3s + retries: 5 + + # Optional reverse proxy with automatic HTTPS (Let's Encrypt). + # To serve on a domain: + # 1. Point the domain's DNS at this host. + # 2. Set APP_DOMAIN below and APP_URL above to https://. + # 3. Start with the proxy profile: + # docker compose -f compose.prod.yaml --profile proxy up -d + # Without the profile, the app is served directly on http://localhost:8000. + caddy: + image: caddy:2-alpine + container_name: trypost-caddy + restart: unless-stopped + profiles: [proxy] + environment: + APP_DOMAIN: post.example.com # <- your domain + ports: + - "80:80" + - "443:443" + volumes: + - ./Caddyfile:/etc/caddy/Caddyfile:ro + - caddy-data:/data + - caddy-config:/config + depends_on: + - app + +volumes: + pgdata: + redisdata: + storage: + caddy-data: + caddy-config: diff --git a/composer.lock b/composer.lock index 87a52d7c..4f28b729 100644 --- a/composer.lock +++ b/composer.lock @@ -8062,16 +8062,16 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.6.0", + "version": "v3.7.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62" + "reference": "50f59d1f3ca46d41ac911f97a78626b6756af35b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62", - "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/50f59d1f3ca46d41ac911f97a78626b6756af35b", + "reference": "50f59d1f3ca46d41ac911f97a78626b6756af35b", "shasum": "" }, "require": { @@ -8084,7 +8084,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.6-dev" + "dev-main": "3.7-dev" } }, "autoload": { @@ -8109,7 +8109,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.7.0" }, "funding": [ { @@ -8120,29 +8120,33 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-25T14:21:43+00:00" + "time": "2026-04-13T15:52:40+00:00" }, { "name": "symfony/dom-crawler", - "version": "v8.0.8", + "version": "v8.1.0", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "284ace90732b445b027728b5e0eec6418a17a364" + "reference": "77ca351474ea018daba5f2e473cbf1b9b8e72ac6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/284ace90732b445b027728b5e0eec6418a17a364", - "reference": "284ace90732b445b027728b5e0eec6418a17a364", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/77ca351474ea018daba5f2e473cbf1b9b8e72ac6", + "reference": "77ca351474ea018daba5f2e473cbf1b9b8e72ac6", "shasum": "" }, "require": { - "php": ">=8.4", + "php": ">=8.4.1", "symfony/polyfill-ctype": "^1.8", "symfony/polyfill-mbstring": "^1.0" }, @@ -8175,7 +8179,7 @@ "description": "Eases DOM navigation for HTML and XML documents", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dom-crawler/tree/v8.0.8" + "source": "https://github.com/symfony/dom-crawler/tree/v8.1.0" }, "funding": [ { @@ -8195,24 +8199,24 @@ "type": "tidelift" } ], - "time": "2026-03-30T15:14:47+00:00" + "time": "2026-05-29T05:06:50+00:00" }, { "name": "symfony/error-handler", - "version": "v8.0.8", + "version": "v8.1.0", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", - "reference": "c1119fe8dcfc3825ec74ec061b96ef0c8f281517" + "reference": "d8aeb1abd3fef84795567850d3a567bdb5945ee5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/error-handler/zipball/c1119fe8dcfc3825ec74ec061b96ef0c8f281517", - "reference": "c1119fe8dcfc3825ec74ec061b96ef0c8f281517", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/d8aeb1abd3fef84795567850d3a567bdb5945ee5", + "reference": "d8aeb1abd3fef84795567850d3a567bdb5945ee5", "shasum": "" }, "require": { - "php": ">=8.4", + "php": ">=8.4.1", "psr/log": "^1|^2|^3", "symfony/polyfill-php85": "^1.32", "symfony/var-dumper": "^7.4|^8.0" @@ -8256,7 +8260,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v8.0.8" + "source": "https://github.com/symfony/error-handler/tree/v8.1.0" }, "funding": [ { @@ -8276,24 +8280,25 @@ "type": "tidelift" } ], - "time": "2026-03-30T15:14:47+00:00" + "time": "2026-05-29T05:06:50+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v8.0.9", + "version": "v8.1.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "0c3c1a17604c4dbbec4b93fe162c538482096e1f" + "reference": "f249ae3f680958b6f1f9dd76e5747cf0695b4102" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/0c3c1a17604c4dbbec4b93fe162c538482096e1f", - "reference": "0c3c1a17604c4dbbec4b93fe162c538482096e1f", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/f249ae3f680958b6f1f9dd76e5747cf0695b4102", + "reference": "f249ae3f680958b6f1f9dd76e5747cf0695b4102", "shasum": "" }, "require": { - "php": ">=8.4", + "php": ">=8.4.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/event-dispatcher-contracts": "^2.5|^3" }, "conflict": { @@ -8341,7 +8346,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v8.0.9" + "source": "https://github.com/symfony/event-dispatcher/tree/v8.1.0" }, "funding": [ { @@ -8361,20 +8366,20 @@ "type": "tidelift" } ], - "time": "2026-04-18T13:51:42+00:00" + "time": "2026-05-29T05:06:50+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v3.6.0", + "version": "v3.7.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "59eb412e93815df44f05f342958efa9f46b1e586" + "reference": "ccba7060602b7fed0b03c85bf025257f76d9ef32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/59eb412e93815df44f05f342958efa9f46b1e586", - "reference": "59eb412e93815df44f05f342958efa9f46b1e586", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/ccba7060602b7fed0b03c85bf025257f76d9ef32", + "reference": "ccba7060602b7fed0b03c85bf025257f76d9ef32", "shasum": "" }, "require": { @@ -8388,7 +8393,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.6-dev" + "dev-main": "3.7-dev" } }, "autoload": { @@ -8421,7 +8426,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.6.0" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.7.0" }, "funding": [ { @@ -8432,12 +8437,16 @@ "url": "https://github.com/fabpot", "type": "github" }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, { "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", "type": "tidelift" } ], - "time": "2024-09-25T14:21:43+00:00" + "time": "2026-01-05T13:30:16+00:00" }, { "name": "symfony/filesystem", @@ -8579,20 +8588,21 @@ }, { "name": "symfony/http-foundation", - "version": "v8.0.8", + "version": "v8.1.0", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "02656f7ebeae5c155d659e946f6b3a33df24051b" + "reference": "af11474600f06718086c2cda4fa6fa8d0a672e7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/02656f7ebeae5c155d659e946f6b3a33df24051b", - "reference": "02656f7ebeae5c155d659e946f6b3a33df24051b", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/af11474600f06718086c2cda4fa6fa8d0a672e7e", + "reference": "af11474600f06718086c2cda4fa6fa8d0a672e7e", "shasum": "" }, "require": { - "php": ">=8.4", + "php": ">=8.4.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "^1.1" }, "conflict": { @@ -8635,7 +8645,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v8.0.8" + "source": "https://github.com/symfony/http-foundation/tree/v8.1.0" }, "funding": [ { @@ -8655,34 +8665,38 @@ "type": "tidelift" } ], - "time": "2026-03-30T15:14:47+00:00" + "time": "2026-05-29T05:06:50+00:00" }, { "name": "symfony/http-kernel", - "version": "v8.0.8", + "version": "v8.1.0", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "1770f6818d83b2fddc12185025b93f39a90cb628" + "reference": "cefeb37c82eed3e0c42fa25ba64cd3a908d90f39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/1770f6818d83b2fddc12185025b93f39a90cb628", - "reference": "1770f6818d83b2fddc12185025b93f39a90cb628", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/cefeb37c82eed3e0c42fa25ba64cd3a908d90f39", + "reference": "cefeb37c82eed3e0c42fa25ba64cd3a908d90f39", "shasum": "" }, "require": { - "php": ">=8.4", + "php": ">=8.4.1", "psr/log": "^1|^2|^3", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/error-handler": "^7.4|^8.0", "symfony/event-dispatcher": "^7.4|^8.0", "symfony/http-foundation": "^7.4|^8.0", "symfony/polyfill-ctype": "^1.8" }, "conflict": { + "symfony/dependency-injection": "<8.1", "symfony/flex": "<2.10", "symfony/http-client-contracts": "<2.5", "symfony/translation-contracts": "<2.5", + "symfony/var-dumper": "<8.1", + "symfony/web-profiler-bundle": "<8.1", "twig/twig": "<3.21" }, "provide": { @@ -8695,13 +8709,14 @@ "symfony/config": "^7.4|^8.0", "symfony/console": "^7.4|^8.0", "symfony/css-selector": "^7.4|^8.0", - "symfony/dependency-injection": "^7.4|^8.0", + "symfony/dependency-injection": "^8.1", "symfony/dom-crawler": "^7.4|^8.0", "symfony/expression-language": "^7.4|^8.0", "symfony/finder": "^7.4|^8.0", "symfony/http-client-contracts": "^2.5|^3", "symfony/process": "^7.4|^8.0", "symfony/property-access": "^7.4|^8.0", + "symfony/rate-limiter": "^7.4|^8.0", "symfony/routing": "^7.4|^8.0", "symfony/serializer": "^7.4|^8.0", "symfony/stopwatch": "^7.4|^8.0", @@ -8709,7 +8724,7 @@ "symfony/translation-contracts": "^2.5|^3", "symfony/uid": "^7.4|^8.0", "symfony/validator": "^7.4|^8.0", - "symfony/var-dumper": "^7.4|^8.0", + "symfony/var-dumper": "^8.1", "symfony/var-exporter": "^7.4|^8.0", "twig/twig": "^3.21" }, @@ -8739,7 +8754,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v8.0.8" + "source": "https://github.com/symfony/http-kernel/tree/v8.1.0" }, "funding": [ { @@ -8759,25 +8774,25 @@ "type": "tidelift" } ], - "time": "2026-03-31T21:14:05+00:00" + "time": "2026-05-29T08:46:08+00:00" }, { "name": "symfony/mailer", - "version": "v8.0.8", + "version": "v8.1.0", "source": { "type": "git", "url": "https://github.com/symfony/mailer.git", - "reference": "ca5f6edaf8780ece814404b58a4482b22b509c56" + "reference": "9418d772df3a03a142e3bc06f602adb2b8724877" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mailer/zipball/ca5f6edaf8780ece814404b58a4482b22b509c56", - "reference": "ca5f6edaf8780ece814404b58a4482b22b509c56", + "url": "https://api.github.com/repos/symfony/mailer/zipball/9418d772df3a03a142e3bc06f602adb2b8724877", + "reference": "9418d772df3a03a142e3bc06f602adb2b8724877", "shasum": "" }, "require": { "egulias/email-validator": "^2.1.10|^3|^4", - "php": ">=8.4", + "php": ">=8.4.1", "psr/event-dispatcher": "^1", "psr/log": "^1|^2|^3", "symfony/event-dispatcher": "^7.4|^8.0", @@ -8819,7 +8834,7 @@ "description": "Helps sending emails", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/mailer/tree/v8.0.8" + "source": "https://github.com/symfony/mailer/tree/v8.1.0" }, "funding": [ { @@ -8839,24 +8854,24 @@ "type": "tidelift" } ], - "time": "2026-03-30T15:14:47+00:00" + "time": "2026-05-29T05:06:50+00:00" }, { "name": "symfony/mime", - "version": "v8.0.9", + "version": "v8.1.0", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "a9fcb293650c054b62a5b406f4e92e7b711ea333" + "reference": "b164ae7e3f7915aacfe9ee155f2f358502440664" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/a9fcb293650c054b62a5b406f4e92e7b711ea333", - "reference": "a9fcb293650c054b62a5b406f4e92e7b711ea333", + "url": "https://api.github.com/repos/symfony/mime/zipball/b164ae7e3f7915aacfe9ee155f2f358502440664", + "reference": "b164ae7e3f7915aacfe9ee155f2f358502440664", "shasum": "" }, "require": { - "php": ">=8.4", + "php": ">=8.4.1", "symfony/polyfill-intl-idn": "^1.10", "symfony/polyfill-mbstring": "^1.0" }, @@ -8905,7 +8920,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v8.0.9" + "source": "https://github.com/symfony/mime/tree/v8.1.0" }, "funding": [ { @@ -8925,7 +8940,7 @@ "type": "tidelift" } ], - "time": "2026-04-29T15:02:55+00:00" + "time": "2026-05-29T05:06:50+00:00" }, { "name": "symfony/polyfill-ctype", @@ -9182,16 +9197,16 @@ }, { "name": "symfony/polyfill-intl-idn", - "version": "v1.37.0", + "version": "v1.38.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-idn.git", - "reference": "9614ac4d8061dc257ecc64cba1b140873dce8ad3" + "reference": "dc21118016c039a66235cf93d96b435ffb282412" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/9614ac4d8061dc257ecc64cba1b140873dce8ad3", - "reference": "9614ac4d8061dc257ecc64cba1b140873dce8ad3", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/dc21118016c039a66235cf93d96b435ffb282412", + "reference": "dc21118016c039a66235cf93d96b435ffb282412", "shasum": "" }, "require": { @@ -9245,7 +9260,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.37.0" + "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.38.1" }, "funding": [ { @@ -9265,20 +9280,20 @@ "type": "tidelift" } ], - "time": "2024-09-10T14:38:51+00:00" + "time": "2026-05-25T15:22:23+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.37.0", + "version": "v1.38.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "3833d7255cc303546435cb650316bff708a1c75c" + "reference": "2d446c214bdbe5b71bde5011b060a05fece3ae6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c", - "reference": "3833d7255cc303546435cb650316bff708a1c75c", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/2d446c214bdbe5b71bde5011b060a05fece3ae6b", + "reference": "2d446c214bdbe5b71bde5011b060a05fece3ae6b", "shasum": "" }, "require": { @@ -9330,7 +9345,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.37.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.38.0" }, "funding": [ { @@ -9350,20 +9365,20 @@ "type": "tidelift" } ], - "time": "2024-09-09T11:45:10+00:00" + "time": "2026-05-25T13:48:31+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.37.0", + "version": "v1.38.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "6a21eb99c6973357967f6ce3708cd55a6bec6315" + "reference": "14c5439eec4ccff081ac14eca2dc57feb2a66d92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6a21eb99c6973357967f6ce3708cd55a6bec6315", - "reference": "6a21eb99c6973357967f6ce3708cd55a6bec6315", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/14c5439eec4ccff081ac14eca2dc57feb2a66d92", + "reference": "14c5439eec4ccff081ac14eca2dc57feb2a66d92", "shasum": "" }, "require": { @@ -9415,7 +9430,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.37.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.38.1" }, "funding": [ { @@ -9435,7 +9450,7 @@ "type": "tidelift" } ], - "time": "2026-04-10T17:25:58+00:00" + "time": "2026-05-26T12:51:13+00:00" }, { "name": "symfony/polyfill-php80", @@ -9523,16 +9538,16 @@ }, { "name": "symfony/polyfill-php83", - "version": "v1.37.0", + "version": "v1.38.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php83.git", - "reference": "3600c2cb22399e25bb226e4a135ce91eeb2a6149" + "reference": "8339098cae28673c15cce00d80734af0453054e2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/3600c2cb22399e25bb226e4a135ce91eeb2a6149", - "reference": "3600c2cb22399e25bb226e4a135ce91eeb2a6149", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/8339098cae28673c15cce00d80734af0453054e2", + "reference": "8339098cae28673c15cce00d80734af0453054e2", "shasum": "" }, "require": { @@ -9579,7 +9594,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php83/tree/v1.37.0" + "source": "https://github.com/symfony/polyfill-php83/tree/v1.38.1" }, "funding": [ { @@ -9599,7 +9614,7 @@ "type": "tidelift" } ], - "time": "2026-04-10T17:25:58+00:00" + "time": "2026-05-26T12:51:13+00:00" }, { "name": "symfony/polyfill-php84", @@ -9683,16 +9698,16 @@ }, { "name": "symfony/polyfill-php85", - "version": "v1.37.0", + "version": "v1.38.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php85.git", - "reference": "fcfa4973a9917cef23f2e38774da74a2b7d115ee" + "reference": "ba2ba04f3352cfa2dcbbcb90aee13ed967f505b1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php85/zipball/fcfa4973a9917cef23f2e38774da74a2b7d115ee", - "reference": "fcfa4973a9917cef23f2e38774da74a2b7d115ee", + "url": "https://api.github.com/repos/symfony/polyfill-php85/zipball/ba2ba04f3352cfa2dcbbcb90aee13ed967f505b1", + "reference": "ba2ba04f3352cfa2dcbbcb90aee13ed967f505b1", "shasum": "" }, "require": { @@ -9739,7 +9754,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php85/tree/v1.37.0" + "source": "https://github.com/symfony/polyfill-php85/tree/v1.38.1" }, "funding": [ { @@ -9759,7 +9774,7 @@ "type": "tidelift" } ], - "time": "2026-04-26T13:10:57+00:00" + "time": "2026-05-26T02:25:22+00:00" }, { "name": "symfony/polyfill-php86", @@ -10078,20 +10093,20 @@ }, { "name": "symfony/routing", - "version": "v8.0.9", + "version": "v8.1.0", "source": { "type": "git", "url": "https://github.com/symfony/routing.git", - "reference": "75d1bd8e5da3424e4db2fc3ff0222cb4d0c73038" + "reference": "fe0bfec72c8a806109fb9c3a5f2b898fe0c76eb3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/routing/zipball/75d1bd8e5da3424e4db2fc3ff0222cb4d0c73038", - "reference": "75d1bd8e5da3424e4db2fc3ff0222cb4d0c73038", + "url": "https://api.github.com/repos/symfony/routing/zipball/fe0bfec72c8a806109fb9c3a5f2b898fe0c76eb3", + "reference": "fe0bfec72c8a806109fb9c3a5f2b898fe0c76eb3", "shasum": "" }, "require": { - "php": ">=8.4", + "php": ">=8.4.1", "symfony/deprecation-contracts": "^2.5|^3" }, "require-dev": { @@ -10134,7 +10149,7 @@ "url" ], "support": { - "source": "https://github.com/symfony/routing/tree/v8.0.9" + "source": "https://github.com/symfony/routing/tree/v8.1.0" }, "funding": [ { @@ -10154,20 +10169,20 @@ "type": "tidelift" } ], - "time": "2026-04-29T15:02:55+00:00" + "time": "2026-05-29T05:06:50+00:00" }, { "name": "symfony/service-contracts", - "version": "v3.6.1", + "version": "v3.7.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43" + "reference": "d25d82433a80eba6aa0e6c24b61d7370d99e444a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/45112560a3ba2d715666a509a0bc9521d10b6c43", - "reference": "45112560a3ba2d715666a509a0bc9521d10b6c43", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d25d82433a80eba6aa0e6c24b61d7370d99e444a", + "reference": "d25d82433a80eba6aa0e6c24b61d7370d99e444a", "shasum": "" }, "require": { @@ -10185,7 +10200,7 @@ "name": "symfony/contracts" }, "branch-alias": { - "dev-main": "3.6-dev" + "dev-main": "3.7-dev" } }, "autoload": { @@ -10221,7 +10236,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v3.6.1" + "source": "https://github.com/symfony/service-contracts/tree/v3.7.0" }, "funding": [ { @@ -10241,7 +10256,7 @@ "type": "tidelift" } ], - "time": "2025-07-15T11:30:57+00:00" + "time": "2026-03-28T09:44:51+00:00" }, { "name": "symfony/string", @@ -10588,20 +10603,20 @@ }, { "name": "symfony/var-dumper", - "version": "v8.0.8", + "version": "v8.1.0", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "cfb7badd53bf4177f6e9416cfbbccc13c0e773a1" + "reference": "c2c4df1d21477cc21c9f6dc1b14d07c3abc4963e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/cfb7badd53bf4177f6e9416cfbbccc13c0e773a1", - "reference": "cfb7badd53bf4177f6e9416cfbbccc13c0e773a1", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c2c4df1d21477cc21c9f6dc1b14d07c3abc4963e", + "reference": "c2c4df1d21477cc21c9f6dc1b14d07c3abc4963e", "shasum": "" }, "require": { - "php": ">=8.4", + "php": ">=8.4.1", "symfony/polyfill-mbstring": "^1.0" }, "conflict": { @@ -10651,7 +10666,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v8.0.8" + "source": "https://github.com/symfony/var-dumper/tree/v8.1.0" }, "funding": [ { @@ -10671,31 +10686,32 @@ "type": "tidelift" } ], - "time": "2026-03-31T07:15:36+00:00" + "time": "2026-05-29T05:06:50+00:00" }, { "name": "symfony/yaml", - "version": "v8.0.8", + "version": "v8.1.0", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "54174ab48c0c0f9e21512b304be17f8150ccf8f1" + "reference": "efb42bd2c6f4f3ccfd4683583449938b5fc146b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/54174ab48c0c0f9e21512b304be17f8150ccf8f1", - "reference": "54174ab48c0c0f9e21512b304be17f8150ccf8f1", + "url": "https://api.github.com/repos/symfony/yaml/zipball/efb42bd2c6f4f3ccfd4683583449938b5fc146b0", + "reference": "efb42bd2c6f4f3ccfd4683583449938b5fc146b0", "shasum": "" }, "require": { - "php": ">=8.4", + "php": ">=8.4.1", "symfony/polyfill-ctype": "^1.8" }, "conflict": { "symfony/console": "<7.4" }, "require-dev": { - "symfony/console": "^7.4|^8.0" + "symfony/console": "^7.4|^8.0", + "yaml/yaml-test-suite": "*" }, "bin": [ "Resources/bin/yaml-lint" @@ -10726,7 +10742,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v8.0.8" + "source": "https://github.com/symfony/yaml/tree/v8.1.0" }, "funding": [ { @@ -10746,7 +10762,7 @@ "type": "tidelift" } ], - "time": "2026-03-30T15:14:47+00:00" + "time": "2026-05-29T05:06:50+00:00" }, { "name": "tijsverkoyen/css-to-inline-styles", diff --git a/config/trypost.php b/config/trypost.php index 0b1788ae..a541cd47 100644 --- a/config/trypost.php +++ b/config/trypost.php @@ -80,10 +80,14 @@ 'api' => env('LINKEDIN_API', 'https://api.linkedin.com'), // OAuth host is different from the data API (api.linkedin.com). 'oauth_api' => env('LINKEDIN_OAUTH_API', 'https://www.linkedin.com'), + // Scopes for LinkedIn authentication + 'scopes' => array_values(array_filter(array_map('trim', explode(',', (string) env('LINKEDIN_SCOPES', 'openid,profile,email,w_member_social'))))), ], 'linkedin-page' => [ 'enabled' => env('LINKEDIN_PAGE_ENABLED', true), 'api' => env('LINKEDIN_PAGE_API', 'https://api.linkedin.com'), + // Scopes for LinkedIn Page authentication + 'scopes' => array_values(array_filter(array_map('trim', explode(',', (string) env('LINKEDIN_PAGE_SCOPES', 'openid,profile,email,w_organization_social,r_organization_social,rw_organization_admin,w_member_social'))))), ], 'x' => [ 'enabled' => env('X_ENABLED', true), diff --git a/docker/.env.docker.example b/docker/.env.docker.example index aaacd5fd..5d8e48b6 100644 --- a/docker/.env.docker.example +++ b/docker/.env.docker.example @@ -89,7 +89,9 @@ R2_URL= LINKEDIN_CLIENT_ID= LINKEDIN_CLIENT_SECRET= LINKEDIN_CLIENT_REDIRECT="${APP_URL}/accounts/linkedin/callback" +# LINKEDIN_SCOPES="openid,profile,email,w_member_social" LINKEDIN_PAGE_CLIENT_REDIRECT="${APP_URL}/accounts/linkedin-page/callback" +# LINKEDIN_PAGE_SCOPES="openid,profile,email,w_organization_social,r_organization_social,rw_organization_admin,w_member_social" X_CLIENT_ID= X_CLIENT_SECRET= diff --git a/lang/en/posts.php b/lang/en/posts.php index 8488c29a..b078650f 100644 --- a/lang/en/posts.php +++ b/lang/en/posts.php @@ -61,7 +61,7 @@ ], 'posting_to' => 'Posting to', 'privacy_level' => 'Who can see this video?', - 'privacy_placeholder' => 'Select visibility', + 'privacy_placeholder' => 'Select who can view this post', 'privacy' => [ 'public' => 'Public to everyone', 'friends' => 'Mutual follow friends', @@ -87,7 +87,7 @@ 'compliance_incomplete' => 'You need to indicate if your content promotes yourself, a third party, or both.', 'privacy_required' => 'TikTok privacy level is required when publishing.', 'branded_cleared_private' => 'Privacy was cleared because Branded Content cannot be private.', - 'interaction_disabled_by_creator' => 'Disabled by your TikTok account settings.', + 'interaction_disabled_by_creator' => 'Turned off in your TikTok account settings', 'max_duration_exceeded' => 'Video is :duration s long but this account can only post videos up to :max s.', 'processing_hint' => 'After publishing, it may take a few minutes for the content to process and appear on your TikTok profile.', 'brand_organic' => 'Your brand', @@ -127,6 +127,13 @@ 'reel' => 'Reel', 'story' => 'Story', ], + 'aspect_label' => 'Aspect ratio', + 'aspect' => [ + 'square' => 'Square (1:1)', + 'portrait' => 'Portrait (4:5)', + 'landscape' => 'Landscape (16:9)', + 'original' => 'Original', + ], ], 'linkedin' => [ 'settings' => 'LinkedIn Settings', @@ -313,7 +320,7 @@ 'tabs' => [ 'preview' => 'Preview', - 'schedule' => 'Schedule', + 'channels' => 'Channels', 'comments' => 'Comments', 'comments_empty' => 'No comments yet.', ], diff --git a/lang/es/posts.php b/lang/es/posts.php index cf988ea8..e04c19e0 100644 --- a/lang/es/posts.php +++ b/lang/es/posts.php @@ -61,7 +61,7 @@ ], 'posting_to' => 'Publicando en', 'privacy_level' => '¿Quién puede ver este video?', - 'privacy_placeholder' => 'Selecciona la visibilidad', + 'privacy_placeholder' => 'Selecciona quién puede ver esta publicación', 'privacy' => [ 'public' => 'Público para todos', 'friends' => 'Amigos mutuos', @@ -87,7 +87,7 @@ 'compliance_incomplete' => 'Debes indicar si tu contenido promociona a ti mismo, a un tercero o a ambos.', 'privacy_required' => 'La visibilidad de TikTok es obligatoria al publicar.', 'branded_cleared_private' => 'La visibilidad se borró porque el contenido de marca no puede ser privado.', - 'interaction_disabled_by_creator' => 'Desactivado por la configuración de tu cuenta TikTok.', + 'interaction_disabled_by_creator' => 'Desactivado en la configuración de tu cuenta TikTok', 'max_duration_exceeded' => 'El video dura :duration s pero esta cuenta solo permite videos de hasta :max s.', 'processing_hint' => 'Después de publicar, puede tardar unos minutos en procesarse y aparecer en tu perfil de TikTok.', 'brand_organic' => 'Tu marca', @@ -127,6 +127,13 @@ 'reel' => 'Reel', 'story' => 'Historia', ], + 'aspect_label' => 'Proporción', + 'aspect' => [ + 'square' => 'Cuadrado (1:1)', + 'portrait' => 'Vertical (4:5)', + 'landscape' => 'Horizontal (16:9)', + 'original' => 'Original', + ], ], 'linkedin' => [ 'settings' => 'Configuración de LinkedIn', @@ -313,7 +320,7 @@ 'tabs' => [ 'preview' => 'Vista previa', - 'schedule' => 'Programación', + 'channels' => 'Canales', 'comments' => 'Comentarios', 'comments_empty' => 'Todavía no hay comentarios.', ], diff --git a/lang/pt-BR/posts.php b/lang/pt-BR/posts.php index 6dc86360..299bcfcc 100644 --- a/lang/pt-BR/posts.php +++ b/lang/pt-BR/posts.php @@ -61,7 +61,7 @@ ], 'posting_to' => 'Publicando em', 'privacy_level' => 'Quem pode ver este vídeo?', - 'privacy_placeholder' => 'Selecione a visibilidade', + 'privacy_placeholder' => 'Selecione quem pode ver este post', 'privacy' => [ 'public' => 'Público para todos', 'friends' => 'Amigos em comum', @@ -87,7 +87,7 @@ 'compliance_incomplete' => 'Você precisa indicar se o conteúdo promove você mesmo, terceiros ou ambos.', 'privacy_required' => 'A visibilidade do TikTok é obrigatória ao publicar.', 'branded_cleared_private' => 'A visibilidade foi limpa porque conteúdo de marca não pode ser privado.', - 'interaction_disabled_by_creator' => 'Desativado pelas configurações da sua conta TikTok.', + 'interaction_disabled_by_creator' => 'Desativado nas configurações da sua conta TikTok', 'max_duration_exceeded' => 'Vídeo tem :duration s mas esta conta só permite vídeos de até :max s.', 'processing_hint' => 'Após publicar, pode levar alguns minutos para o conteúdo ser processado e aparecer no seu perfil TikTok.', 'brand_organic' => 'Sua marca', @@ -127,6 +127,13 @@ 'reel' => 'Reel', 'story' => 'Story', ], + 'aspect_label' => 'Proporção', + 'aspect' => [ + 'square' => 'Quadrado (1:1)', + 'portrait' => 'Retrato (4:5)', + 'landscape' => 'Paisagem (16:9)', + 'original' => 'Original', + ], ], 'linkedin' => [ 'settings' => 'Configurações do LinkedIn', @@ -313,7 +320,7 @@ 'tabs' => [ 'preview' => 'Pré-visualização', - 'schedule' => 'Agendamento', + 'channels' => 'Canais', 'comments' => 'Comentários', 'comments_empty' => 'Nenhum comentário ainda.', ], diff --git a/releases/v1.0.1/changelog.md b/releases/v1.0.1/changelog.md new file mode 100644 index 00000000..0d1d3db8 --- /dev/null +++ b/releases/v1.0.1/changelog.md @@ -0,0 +1,6 @@ +## What's Changed +* docs: add Star History section to README by @paulocastellano in https://github.com/trypostit/trypost/pull/63 +* feat(docker): publish multi-arch image to GHCR + self-host compose by @paulocastellano in https://github.com/trypostit/trypost/pull/65 + + +**Full Changelog**: https://github.com/trypostit/trypost/compare/v1.0.0...v1.0.1 diff --git a/releases/v1.0.1/email.md b/releases/v1.0.1/email.md new file mode 100644 index 00000000..033758e9 --- /dev/null +++ b/releases/v1.0.1/email.md @@ -0,0 +1,25 @@ +--- +subject: "Changelog: TryPost v1.0.1 — Self-host with the official Docker image" +--- + +# Changelog: TryPost v1.0.1 — Self-host with the official Docker image + +By Paulo Castellano • Release v1.0.1 + +Hello! Welcome to this week's update. Here's what's new in TryPost. + +## Self-host TryPost with one command + +You can now run TryPost from an official Docker image. Every release builds one (Intel and ARM), so you pull it and go, no building from source. The compose setup brings up TryPost with its database and Redis alongside it, and your posts, drafts and uploads stay in volumes on your own machine. + +Want it on a real domain? There's a built-in option that sorts out HTTPS for you, so you don't have to fight with certificates to get a secure install. And if you'd rather not keep uploads on the box, you can point storage at S3 or Cloudflare R2. + +## New features + +- An official Docker image you can pull and run (Intel + ARM). +- A one-command self-host stack with PostgreSQL and Redis included. +- Automatic HTTPS for your own domain. +- Media storage on S3 or Cloudflare R2. + +Cheers, +Paulo Castellano from TryPost.it diff --git a/resources/js/app.ts b/resources/js/app.ts index c63c45ea..de757e69 100644 --- a/resources/js/app.ts +++ b/resources/js/app.ts @@ -1,7 +1,7 @@ import '../css/app.css'; +import './echo'; import { createInertiaApp, router } from '@inertiajs/vue3'; -import { configureEcho } from '@laravel/echo-vue'; import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers'; import { i18nVue } from 'laravel-vue-i18n'; import type { DefineComponent } from 'vue'; @@ -12,10 +12,6 @@ import dayjs from './dayjs'; import { capturePageview, initializePostHog, syncPostHogContext } from './posthog'; import type { Auth } from './types'; -configureEcho({ - broadcaster: 'reverb', -}); - const appName = import.meta.env.VITE_APP_NAME || 'TryPost.it'; createInertiaApp({ diff --git a/resources/js/components/automations/config/GenerateNodeConfig.vue b/resources/js/components/automations/config/GenerateNodeConfig.vue index 9ec02456..a937e875 100644 --- a/resources/js/components/automations/config/GenerateNodeConfig.vue +++ b/resources/js/components/automations/config/GenerateNodeConfig.vue @@ -197,10 +197,10 @@ const getCreatorInfo = (account: SocialAccount): TikTokCreatorInfo | null => const getBoards = (account: SocialAccount): PinterestBoard[] => pinterestBoards.value[account.id] ?? []; -// Carousel-capable content types: instagram_carousel, linkedin_carousel, +// Carousel-capable content types: instagram_feed, linkedin_carousel, // linkedin_page_carousel, pinterest_carousel, tiktok_photo. const carouselCapableContentTypes = new Set([ - ContentType.InstagramCarousel, + ContentType.InstagramFeed, ContentType.LinkedInCarousel, ContentType.LinkedInPageCarousel, ContentType.PinterestCarousel, diff --git a/resources/js/components/posts/create/AiPostWizard.vue b/resources/js/components/posts/create/AiPostWizard.vue index 54dff4de..8d5bb037 100644 --- a/resources/js/components/posts/create/AiPostWizard.vue +++ b/resources/js/components/posts/create/AiPostWizard.vue @@ -42,8 +42,11 @@ const emit = defineEmits<{ cancel: []; }>(); +const CAROUSEL_FORMAT = 'instagram_carousel' as const; +type AiFormat = ContentTypeValue | typeof CAROUSEL_FORMAT; + // Selections -const selectedFormat = ref(null); +const selectedFormat = ref(null); const selectedAccountId = ref(null); const includeImages = ref(true); const imageCount = ref(2); @@ -59,9 +62,9 @@ const httpStart = useHttp<{ date: string | null; }>({ format: null, social_account_id: null, image_count: 0, prompt: '', date: null }); -const AI_FORMATS: Array<{ value: ContentTypeValue; platforms: string[] }> = [ +const AI_FORMATS: Array<{ value: AiFormat; platforms: string[] }> = [ { value: ContentType.InstagramFeed, platforms: ['instagram', 'instagram-facebook'] }, - { value: ContentType.InstagramCarousel, platforms: ['instagram', 'instagram-facebook'] }, + { value: CAROUSEL_FORMAT, platforms: ['instagram', 'instagram-facebook'] }, { value: ContentType.InstagramStory, platforms: ['instagram', 'instagram-facebook'] }, { value: ContentType.LinkedInPost, platforms: ['linkedin'] }, { value: ContentType.LinkedInPagePost, platforms: ['linkedin-page'] }, @@ -95,7 +98,7 @@ const accountsForFormat = computed(() => { return props.socialAccounts.filter((a) => format.platforms.includes(a.platform)); }); -const isCarousel = computed(() => selectedFormat.value === ContentType.InstagramCarousel); +const isCarousel = computed(() => selectedFormat.value === CAROUSEL_FORMAT); const requiresImage = computed(() => selectedFormat.value === ContentType.FacebookPost || selectedFormat.value === ContentType.PinterestPin || @@ -140,11 +143,11 @@ watch(accountsForFormat, (accounts) => { } }); -const selectFormat = (format: ContentTypeValue) => { +const selectFormat = (format: AiFormat) => { selectedFormat.value = format; // Sensible default per format. Picking a format always pre-selects an // image option so the user sees a chip highlighted on arrival. - if (format === ContentType.InstagramCarousel) { + if (format === CAROUSEL_FORMAT) { imageCount.value = 5; } else if (format === ContentType.InstagramFeed) { imageCount.value = 1; diff --git a/resources/js/components/posts/editor/FacebookSettings.vue b/resources/js/components/posts/editor/FacebookSettings.vue index cdd1a785..1f7352bd 100644 --- a/resources/js/components/posts/editor/FacebookSettings.vue +++ b/resources/js/components/posts/editor/FacebookSettings.vue @@ -5,6 +5,7 @@ import { computed, ref } from 'vue'; import { Avatar } from '@/components/ui/avatar'; import { getMediaValidationWarning } from '@/composables/useMedia'; import { getPlatformLogo } from '@/composables/usePlatformLogo'; +import { ContentType } from '@/enums/content-type'; import type { MediaItem } from '@/types/media'; interface SocialAccount { @@ -19,6 +20,7 @@ interface Props { socialAccount: SocialAccount | null; contentType: string; media: MediaItem[]; + meta?: Record; disabled?: boolean; previewOnly?: boolean; } @@ -26,25 +28,42 @@ interface Props { const props = withDefaults(defineProps(), { disabled: false, previewOnly: false, + meta: () => ({}), }); const emit = defineEmits<{ 'update:contentType': [value: string]; + 'update:meta': [meta: Record]; }>(); const open = ref(false); const variants = [ - { value: 'facebook_post', labelKey: 'posts.form.facebook.variant.post' }, - { value: 'facebook_reel', labelKey: 'posts.form.facebook.variant.reel' }, - { value: 'facebook_story', labelKey: 'posts.form.facebook.variant.story' }, + { value: ContentType.FacebookPost, labelKey: 'posts.form.facebook.variant.post' }, + { value: ContentType.FacebookReel, labelKey: 'posts.form.facebook.variant.reel' }, + { value: ContentType.FacebookStory, labelKey: 'posts.form.facebook.variant.story' }, ]; +const aspectRatios = [ + { value: '1:1', labelKey: 'posts.form.facebook.aspect.square' }, + { value: '4:5', labelKey: 'posts.form.facebook.aspect.portrait' }, + { value: '16:9', labelKey: 'posts.form.facebook.aspect.landscape' }, + { value: 'original', labelKey: 'posts.form.facebook.aspect.original' }, +]; + +const isFeed = computed(() => props.contentType === ContentType.FacebookPost); +const selectedAspectRatio = computed(() => props.meta.aspect_ratio ?? 'original'); + const pickVariant = (value: string) => { if (props.disabled) return; emit('update:contentType', value); }; +const pickAspectRatio = (value: string) => { + if (props.disabled) return; + emit('update:meta', { ...props.meta, aspect_ratio: value }); +}; + const warning = computed(() => getMediaValidationWarning(props.contentType, props.media)); @@ -101,6 +120,25 @@ const warning = computed(() => getMediaValidationWarning(props.contentType, prop +
+

{{ $t('posts.form.facebook.aspect_label') }}

+
+ +
+
+

{{ $t('posts.edit.tabs.preview') }} - {{ $t('posts.edit.tabs.schedule') }} + {{ $t('posts.edit.tabs.channels') }} {{ $t('posts.edit.tabs.comments') }} @@ -107,7 +107,7 @@ defineExpose({ /> - + { -

+
{ :social-account="pp.social_account" :content-type="platformContentTypes[pp.id] ?? ''" :media="media ?? []" + :meta="platformMeta[pp.id] ?? {}" :disabled="isReadOnly" @update:content-type="emit('update:platformContentType', pp.id, $event)" + @update:meta="emit('update:platformMeta', pp.id, $event)" />
diff --git a/resources/js/components/posts/editor/TikTokSettings.vue b/resources/js/components/posts/editor/TikTokSettings.vue index 5fd13810..2c794796 100644 --- a/resources/js/components/posts/editor/TikTokSettings.vue +++ b/resources/js/components/posts/editor/TikTokSettings.vue @@ -399,6 +399,11 @@ watch( {{ $t('posts.form.tiktok.compliance.music_usage') }}

+ + +

+ {{ $t('posts.form.tiktok.processing_hint') }} +

diff --git a/resources/js/components/posts/previews/FacebookPreview.vue b/resources/js/components/posts/previews/FacebookPreview.vue index bb5c4422..f0302ae2 100644 --- a/resources/js/components/posts/previews/FacebookPreview.vue +++ b/resources/js/components/posts/previews/FacebookPreview.vue @@ -18,6 +18,7 @@ interface Props { content: string; media: MediaItem[]; contentType?: string; + meta?: Record; charCount?: number; maxLength?: number; isValid?: boolean; @@ -31,6 +32,21 @@ const isReel = computed(() => props.contentType === 'facebook_reel'); const isStory = computed(() => props.contentType === 'facebook_story'); const isFeed = computed(() => !isReel.value && !isStory.value); +// Padding-bottom percentage = height/width. Reflects the user's chosen crop in +// the feed preview. `null` (original / unset) keeps the natural fill layout. +const ASPECT_PADDING: Record = { + '1:1': 100, + '4:5': 125, + '16:9': 56.25, +}; +const feedAspectPadding = computed(() => ASPECT_PADDING[props.meta?.aspect_ratio ?? ''] ?? null); + +const feedMediaProps = { + placeholderIcon: IconPhoto, + dotActiveClass: 'bg-[#1877f2]', + placeholderClass: 'w-full h-full flex items-center justify-center bg-[#f0f2f5] dark:bg-[#3a3b3c]', +}; + // Format numbers like Facebook const formatNumber = (num: number): string => { if (num >= 1000000) { @@ -122,14 +138,18 @@ const displayName = computed(() => props.socialAccount.display_name || props.soc

- -
- + +
+
+ +
+
+
+
diff --git a/resources/js/echo.ts b/resources/js/echo.ts new file mode 100644 index 00000000..9c5d42c7 --- /dev/null +++ b/resources/js/echo.ts @@ -0,0 +1,11 @@ +import { configureEcho } from '@laravel/echo-vue'; + +configureEcho({ + broadcaster: 'reverb', + key: import.meta.env.VITE_REVERB_APP_KEY, + wsHost: import.meta.env.VITE_REVERB_HOST, + wsPort: import.meta.env.VITE_REVERB_PORT ?? 80, + wssPort: import.meta.env.VITE_REVERB_PORT ?? 443, + forceTLS: (import.meta.env.VITE_REVERB_SCHEME ?? 'https') === 'https', + enabledTransports: ['ws', 'wss'], +}); diff --git a/resources/js/pages/posts/Calendar.vue b/resources/js/pages/posts/Calendar.vue index 1d93b385..e68e8f6b 100644 --- a/resources/js/pages/posts/Calendar.vue +++ b/resources/js/pages/posts/Calendar.vue @@ -18,7 +18,6 @@ import { PostStatus } from '@/types/post'; interface PostPlatform { id: string; platform: string; - content: string; status: string; social_account: { id: string; @@ -31,6 +30,7 @@ interface PostPlatform { interface Post { id: string; status: string; + content: string | null; scheduled_at: string; post_platforms: PostPlatform[]; } @@ -297,7 +297,7 @@ const formatTime = (scheduledAt: string): string => {
@@ -334,7 +334,7 @@ const formatTime = (scheduledAt: string): string => {

- {{ post.post_platforms[0]?.content || $t('calendar.no_content') }} + {{ post.content?.trim() || $t('calendar.no_content') }}

@@ -383,7 +383,7 @@ const formatTime = (scheduledAt: string): string => {
@@ -418,7 +418,7 @@ const formatTime = (scheduledAt: string): string => {

- {{ post.post_platforms[0]?.content || $t('calendar.no_content') }} + {{ post.content?.trim() || $t('calendar.no_content') }}

@@ -479,12 +479,13 @@ const formatTime = (scheduledAt: string): string => {
-
+
+
{{ formatTime(post.scheduled_at) }}
{ +{{ post.post_platforms.length - 3 }}
+
+

+ {{ post.content?.trim() || $t('calendar.no_content') }} +

{ const initialHighlightCommentId = queryParams?.get('comment') ?? null; const activeTab = ref(initialTabFromQuery); const deleteModal = ref | null>(null); -const editorSidebarRef = ref | null>(null); +const editorTabsRef = ref | null>(null); const snapToCompatibleVariant = (platformId: string) => { const pp = post.value.post_platforms.find((p) => p.id === platformId); @@ -339,9 +339,9 @@ usePostEcho(post.value.id, '.post.platform.status.updated', () => { // Echo: listen for real-time comments usePostEcho(post.value.id, '.post.comment.created', (e: any) => { if (e.mentioned_users) { - editorSidebarRef.value?.registerMentionedUsers(e.mentioned_users); + editorTabsRef.value?.registerMentionedUsers(e.mentioned_users); } - editorSidebarRef.value?.addCommentFromBroadcast(e.comment); + editorTabsRef.value?.addCommentFromBroadcast(e.comment); }); @@ -402,8 +402,8 @@ usePostEcho(post.value.id, '.post.comment.created', (e: any) => {