Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.
PHP ai-agentsblueskyfacebookinstagramlaravellinkedinmastodonmcpmcp-serveropen-sourcerest-apiself-hostedsocial-mediasocial-media-managementsocial-media-schedulerthreadstiktokvuejsxyoutube
import '@/echo';
import { createInertiaApp, router } from '@inertiajs/vue3';
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
import { i18nVue } from 'laravel-vue-i18n';
import { ConfigProvider } from 'reka-ui';
import type { DefineComponent } from 'vue';
import { createApp, h } from 'vue';
import { initializeDataLayer } from '@/datalayer';
import { bootLocale, i18nConfig, syncLocale, textDirection } from '@/language';
import { syncContentTypeMediaRules } from '@/lib/contentTypeMediaRules';
import { trackInAppPushes } from '@/lib/inAppHistory';
import { capturePageview, initializePostHog, syncPostHogContext } from '@/posthog';
import { syncPreferences } from '@/preferences';
import type { Auth } from '@/types';
const appName = import.meta.env.VITE_APP_NAME || 'TryPost.it';
createInertiaApp({
title: (title) => (title ? `${title} - ${appName}` : appName),
resolve: (name) =>
resolvePageComponent(
`./pages/${name}.vue`,
import.meta.glob<DefineComponent>('./pages/**/*.vue'),
),
setup({ el, App, props, plugin }) {
const locale = bootLocale(props.initialPage.props);
syncPreferences(props.initialPage.props);
const auth = props.initialPage.props.auth as Auth | undefined;
const flash = props.initialPage.props.flash as
| { conversion_event?: string; [key: string]: unknown }
| undefined;
initializeDataLayer(
auth,
flash,
props.initialPage.props.applicationUrl as string,
props.initialPage.props.env as string,
);
// Initial PostHog identify + dual-group context + first pageview.
// The same hooks fire on every Inertia navigation below so the
// account group counts stay reactive and workspace switches
// re-attach the right workspace group.
initializePostHog();
syncPostHogContext(props.initialPage);
syncContentTypeMediaRules(props.initialPage);
capturePageview();
// `success`, not `navigate`: switching language answers with `back()`,
// which keeps the same URL, so Inertia updates the props without
// reporting a navigation.
router.on('success', (event) => {
syncLocale(event.detail.page.props);
syncPreferences(event.detail.page.props);
});
trackInAppPushes();
router.on('navigate', (event) => {
syncPostHogContext(event.detail.page);
syncContentTypeMediaRules(event.detail.page);
capturePageview();
});
let mounted = false;
const app = createApp({
render: () =>
h(ConfigProvider, { dir: textDirection.value }, () =>
h(App, props),
),
});
app.use(i18nVue, {
...i18nConfig(locale),
onLoad: () => {
if (mounted) {
return;
}
mounted = true;
app.mount(el);
},
}).use(plugin);
},
progress: {
color: '#4B5563',
},
});