Three things in one move:
1. Centralize per-type size caps in config/trypost.php under media.max_size_mb.
The MediaType enum now reads from there:
MediaType::Image->maxSizeInMb() // 10 (env: MEDIA_IMAGE_MAX_SIZE_MB)
MediaType::Video->maxSizeInMb() // 1024 (env: MEDIA_VIDEO_MAX_SIZE_MB)
Plus convenience helpers maxSizeInBytes() and maxSizeInKb() so callers
don't have to multiply themselves. StoreAssetRequest now uses
MediaType::Video->maxSizeInKb() in its 'max:' rule and mimes derived
from MediaType::{Image,Video}->allowedMimeTypes(). storeChunked
validation moved to the new StoreChunkedAssetRequest FormRequest
(also reads from the enum). MediaAttacher uses
MediaType::Video->maxSizeInBytes() as the streaming-abort threshold
and enforces the per-type cap after MIME resolution.
2. Drop MediaType::Document. We never accepted PDFs anywhere — the
StoreAssetRequest mimes list excluded them, the storeChunked
extension regex excluded them, MediaAttacher excluded them. The only
places that referenced Document were:
- Platform::allowedMediaTypes for LinkedIn/LinkedInPage (declared
but unreachable)
- HasMedia::getMediaType fallback when MIME wasn't image/video/*
Both now cleaned up. HasMedia::getMediaType throws
InvalidArgumentException for unsupported MIMEs instead of silently
returning a fake 'document' type. Platform::LinkedIn now matches
every other social platform: [Image, Video].
3. Add MediaType::fromMime($mime): ?self — replaces the inline mime →
type loop that MediaAttacher used to roll. Returns null for
unsupported MIMEs (caller decides how to react).
Tests:
- MediaTypeTest rewritten for the new shape (no Document, config-driven
sizes, fromMime + size-helper coverage).
- PlatformTest no longer asserts Document on LinkedIn.
- HasMediaTest replaces the 'detects document type' case with one that
asserts the throw on unsupported MIMEs. The 'add media from path'
test now uses real PNG bytes from the fixture.
- AssetControllerTest chunked tests use real PNG bytes and assert 422
(FormRequest unprocessable) for malformed Content-Range headers,
matching the new validation layer.
|
||
|---|---|---|
| .claude/skills | ||
| .github | ||
| app | ||
| bootstrap | ||
| config | ||
| database | ||
| lang | ||
| maizzle | ||
| public | ||
| resources | ||
| routes | ||
| storage | ||
| stubs | ||
| templates | ||
| tests | ||
| .editorconfig | ||
| .env.ci | ||
| .env.example | ||
| .env.testing | ||
| .gitattributes | ||
| .gitignore | ||
| .mcp.json | ||
| .prettierignore | ||
| .prettierrc | ||
| artisan | ||
| boost.json | ||
| CLAUDE.md | ||
| components.json | ||
| compose.yaml | ||
| composer.json | ||
| composer.lock | ||
| eslint.config.js | ||
| GEMINI.md | ||
| LICENSE.md | ||
| package-lock.json | ||
| package.json | ||
| phpunit.xml | ||
| pint.json | ||
| README.md | ||
| tsconfig.json | ||
| vite.config.ts | ||
The open-source social media scheduling platform
Schedule, manage, and publish content to all your social media accounts from one place.
Self-hosted. Privacy-focused. No limits.
Documentation • Roadmap • Community
Why TryPost?
Tired of paying expensive monthly fees for social media scheduling tools? Want full control over your data? TryPost is the solution.
| 100% Open Source | Inspect the code, contribute, make it yours |
| Self-Hosted | Your data stays on your servers |
| No Limits | Schedule unlimited posts, connect unlimited accounts |
| Privacy First | No tracking, no analytics, no data selling |
Features
| Visual Calendar | Drag and drop posts across your content calendar |
| Post Composer | Create and preview posts for multiple platforms at once |
| Media Library | Upload images and videos with automatic optimization |
| Team Collaboration | Invite team members with role-based permissions (Owner, Admin, Member) |
| Workspaces | Manage multiple brands or clients separately |
| REST API | Full API with Bearer token authentication |
| MCP Server | AI-ready with Model Context Protocol support |
| Google Login | Sign up and log in with Google OAuth |
| Notifications | In-app and email notifications for post status |
| i18n | Available in English, Spanish, and Portuguese |
Supported Platforms
X (Twitter) |
TikTok |
|||
YouTube |
Threads |
Bluesky |
Mastodon |
Tech Stack
| Layer | Technology |
|---|---|
| Backend | Laravel 13, PHP 8.4 |
| Frontend | Vue 3, Inertia.js v3, Tailwind CSS v4 |
| Database | PostgreSQL |
| Queue | Redis + Laravel Horizon |
| WebSockets | Laravel Reverb |
| API | REST with Bearer token auth |
| MCP | Laravel MCP for AI integrations |
| Payments | Laravel Cashier (Stripe) |
Getting Started
Get TryPost running in minutes:
| Installation Guide | Step-by-step setup |
| Docker Setup | Run with Laravel Sail |
| Configuration | Environment setup |
| Platform Setup | Connect your social accounts |
Quick Start
git clone https://github.com/trypost-it/trypost.git
cd trypost
cp .env.example .env
composer install
npm install
php artisan key:generate
php artisan migrate
npm run build
API
TryPost includes a REST API for programmatic access. All endpoints are under /api and require a Bearer token.
curl -H "Authorization: Bearer tp_your_token" \
https://your-domain.com/api/posts
See the API documentation for all available endpoints.
MCP Server
TryPost ships with a Model Context Protocol (MCP) server at /mcp/trypost, enabling AI assistants to manage your social media directly.
Contributing
We love contributions! Check the issues for open tasks.
- Discussions - Ask questions, share ideas
- Issues - Report bugs, request features
License
TryPost is licensed under the Functional Source License (FSL).
You can: Use for personal or business use, self-host, modify and contribute.
You cannot: Offer as a competing SaaS, white-label and resell.
If TryPost helps you, please give us a star