Skip to content

Instantly share code, notes, and snippets.

View vojtaholik's full-sized avatar
:shipit:
waiting for better models ;)

Vojta Holik vojtaholik

:shipit:
waiting for better models ;)
View GitHub Profile

Cross-App Bundle Sync System

Overview

Enable product bundling across apps (e.g., Total TypeScript + AI Hero bundles) using Inngest as an event-driven sync engine. Each app maintains its own database, tech stack, and codebase while Inngest coordinates entitlement grants.

Key Point: This is NOT a migration. TT stays on products-2 repo, AI Hero stays on course-builder. Inngest bridges them.


Total TypeScript Migration Plan

Strategy: Fork ai-hero → total-typescript

Copy ai-hero as the starting point, remove what's not needed, add total-typescript specific features.


Phase 0: Initial Setup (Day 1)

// Name: Save to MyMind
// Description: Save bookmarks, notes, or images to MyMind
// Shortcut: cmd+shift+s
import "@johnlindquist/kit";
import { readFile } from "node:fs/promises";
import { extname, basename } from "node:path";
const MYMIND_URL = "http://localhost:1234";

Fuck yeah, Nuxt makes perfect sense for your use case! Since you’re planning Vue integration later, this gives you a smooth migration path from static to dynamic. Here’s how your current setup would look in Nuxt:

Nuxt Configuration

// nuxt.config.ts
export default defineNuxtConfig({
  devtools: { enabled: true },
  
  // Generate static files
export const cohortProductFieldsSchema = z.object({
// Defaults
body: z.string().nullable().optional(),
description: z.string().optional(),
slug: z.string(),
state: ResourceStateSchema.default('draft'),
visibility: ResourceVisibilitySchema.default('unlisted'),
type: z.literal('live'),
// Cohort Details
@vojtaholik
vojtaholik / page.tsx
Last active December 13, 2023 14:50
feat: resizable panels
import ResizablePanels from '../_components/resizable-panels'
import {cookies} from 'next/headers'
const EditorLayout = () => {
const defaultLayout = getDefaultLayout()
return (
<div className="flex h-full flex-grow flex-col">
<ResizablePanels defaultLayout={defaultLayout} />
</div>
)
// Name: Watch Screenshots Dir
// Watch: ~/Desktop/screenshots
// Description: Don't forget to run following command in your terminal to set default screenshot directory in macOSX: defaults write com.apple.screencapture location ~/Desktop/screenshots
import "@johnlindquist/kit";
import cloudinary from "cloudinary";
import trash from "trash";
const DIR = "screenshots";
const NOTIFY_SOUND_FILE_PATH = false; // home("Desktop/come-here-notification.mp3");
// Menu: Record Screen
// Shortcut: shift cmd 5
/** @type {import("@johnlindquist/kit")} */
await applescript(`
-- # Setup to do a screen recording.
# tell application "QuickTime Player" to new screen recording
import {Button} from '@package/ui/button'
import {ThemeProvider} from '@package/ui/use-theme'
import {appUniqueTheme} from './theme'
const Page = () => {
return (
<ThemeProvider theme={appUniqueTheme} />
<Button />
</ThemeProvider>
)
// Menu: Tinify
// Description: Compress selected images with Tinify
// Author: Vojta Holik
// Twitter: @vjthlk
let tinify = await npm("tinify");
let fs = await import("fs");
let selectedFiles = await getSelectedFile();
tinify.key = await env("TINIFY_API_KEY", {