Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
6d2609b
Merge pull request #7 from Abdulmuiz44/codex/build-foundation-for-lau…
Abdulmuiz44 Apr 8, 2026
7c3f02a
Merge pull request #8 from Abdulmuiz44/codex/build-foundation-for-lau…
Abdulmuiz44 Apr 8, 2026
1bb744c
Merge pull request #9 from Abdulmuiz44/codex/build-foundation-for-lau…
Abdulmuiz44 Apr 8, 2026
854fe13
Merge pull request #10 from Abdulmuiz44/codex/build-foundation-for-la…
Abdulmuiz44 Apr 8, 2026
e297487
Merge pull request #11 from Abdulmuiz44/codex/build-foundation-for-la…
Abdulmuiz44 Apr 11, 2026
de9eb26
Merge pull request #12 from Abdulmuiz44/codex/build-foundation-for-la…
Abdulmuiz44 Apr 23, 2026
fc5a20b
Merge pull request #13 from Abdulmuiz44/codex/build-foundation-for-la…
Abdulmuiz44 Apr 23, 2026
1bfa9f0
Merge pull request #14 from Abdulmuiz44/codex/build-foundation-for-la…
Abdulmuiz44 Apr 23, 2026
51eb1f7
Merge pull request #15 from Abdulmuiz44/codex/design-system-generatio…
Abdulmuiz44 Apr 23, 2026
256c635
Merge pull request #16 from Abdulmuiz44/codex/design-system-generatio…
Abdulmuiz44 Apr 24, 2026
6bf671b
Merge pull request #17 from Abdulmuiz44/codex/design-system-generatio…
Abdulmuiz44 Apr 25, 2026
6121780
Merge pull request #18 from Abdulmuiz44/codex/design-system-generatio…
Abdulmuiz44 Apr 25, 2026
f7a34c2
Merge pull request #19 from Abdulmuiz44/codex/design-system-generatio…
Abdulmuiz44 Apr 25, 2026
702d1a8
Merge pull request #20 from Abdulmuiz44/codex/design-system-generatio…
Abdulmuiz44 Apr 25, 2026
ae7d874
Merge pull request #21 from Abdulmuiz44/codex/resend-email-automations
Abdulmuiz44 Apr 25, 2026
ed7e1ba
Merge pull request #22 from Abdulmuiz44/codex/design-system-generatio…
Abdulmuiz44 Apr 25, 2026
755d9bb
Merge pull request #23 from Abdulmuiz44/codex/frontend-conversion-the…
Abdulmuiz44 Apr 26, 2026
3a8bde9
Merge pull request #24 from Abdulmuiz44/codex/resend-email-automations
Abdulmuiz44 Apr 26, 2026
fe1d0ee
Merge pull request #25 from Abdulmuiz44/codex/frontend-conversion-the…
Abdulmuiz44 Apr 26, 2026
f074fca
Merge pull request #26 from Abdulmuiz44/codex/nextauth-google-auth-flow
Abdulmuiz44 Apr 28, 2026
1fd7fb2
Merge pull request #27 from Abdulmuiz44/codex/frontend-conversion-the…
Abdulmuiz44 Apr 28, 2026
544e9c5
Merge pull request #29 from Abdulmuiz44/codex/nextauth-google-auth-flow
Abdulmuiz44 Apr 29, 2026
fe8adea
Add detailed about and legal pages
Apr 29, 2026
65c28b1
Improve Lemon Squeezy checkout errors
Apr 29, 2026
687c08a
Improve generated asset result screen
Apr 29, 2026
3f4e3ab
Merge pull request #31 from Abdulmuiz44/codex/lemon-squeezy-credit-bi…
Abdulmuiz44 Apr 29, 2026
db2d80c
Generate assets with Mistral image agent
Apr 29, 2026
da8a871
Merge pull request #32 from Abdulmuiz44/codex/lemon-squeezy-credit-bi…
Abdulmuiz44 Apr 29, 2026
e25e595
Harden billing and generation workflow
May 1, 2026
c6d7180
Merge pull request #33 from Abdulmuiz44/codex/product-hardening-and-g…
Abdulmuiz44 May 1, 2026
a1c4b13
Stabilize mobile nav, checkout, and generation QA flows
May 6, 2026
9546f86
Harden generation auth/session error handling
May 6, 2026
adf76d5
Merge pull request #34 from Abdulmuiz44/codex/mvp-qa-mobile-checkout
Abdulmuiz44 May 6, 2026
d2e7ea0
Add generation quality checks before export
May 14, 2026
004b1a4
Merge pull request #35 from Abdulmuiz44/codex/generation-quality-cont…
Abdulmuiz44 May 14, 2026
cae5df8
Surface quality warnings and track warning analytics
May 14, 2026
6ad4876
Fix missing quality warning type for deploy build
May 15, 2026
14dcdda
Add structured quality report to generation panel
May 16, 2026
41f9afa
Refine monochrome talocode design
Jun 3, 2026
f3a28de
Merge pull request #36 from talocode/codex/qc-warning-visibility
Abdulmuiz44 Jun 3, 2026
2c512de
Fix generation quality warning handling
Jun 3, 2026
aab820f
Merge pull request #38 from talocode/codex/qc-warning-visibility
Abdulmuiz44 Jun 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Public app URL used for auth/billing callbacks
NEXT_PUBLIC_APP_URL=http://localhost:3000
NEXTAUTH_SECRET=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=

# Supabase client config
NEXT_PUBLIC_SUPABASE_URL=
Expand All @@ -9,12 +12,18 @@ NEXT_PUBLIC_SUPABASE_ANON_KEY=
SUPABASE_SERVICE_ROLE_KEY=
DATABASE_URL=

# Mistral AI (structured planning)
# Mistral AI (structured planning + image generation)
MISTRAL_API_KEY=
# Default: mistral-small-2506
MISTRAL_MODEL_VISION=mistral-small-2506
# Default: mistral-small-2506
MISTRAL_MODEL_TEXT=mistral-small-2506
# Default: mistral-medium-latest
MISTRAL_IMAGE_MODEL=mistral-medium-latest
# Optional: pre-created Mistral agent with the image_generation tool enabled.
# If omitted, LaunchPix creates one at runtime.
MISTRAL_IMAGE_AGENT_ID=
LAUNCHPIX_API_KEY=

# Lemon Squeezy credit billing
LEMON_SQUEEZY_API_KEY=
Expand All @@ -23,6 +32,9 @@ LEMON_SQUEEZY_WEBHOOK_SECRET=
LEMON_SQUEEZY_STARTER_CREDITS_VARIANT_ID=
LEMON_SQUEEZY_CREATOR_CREDITS_VARIANT_ID=
LEMON_SQUEEZY_STUDIO_CREDITS_VARIANT_ID=
RESEND_API_KEY=
RESEND_FROM_EMAIL=
RESEND_WEBHOOK_SECRET=

# Storage buckets
STORAGE_BUCKET_ASSETS=launchpix-assets
Expand Down
2 changes: 1 addition & 1 deletion PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Goal: reduce deployment risk and tighten operational readiness.

- Verify all production env vars are documented and correctly used
- Confirm Netlify build and runtime settings are stable
- Confirm Paystack webhook behavior in production
- Confirm Lemon Squeezy checkout and webhook behavior in production
- Verify Supabase storage buckets, RLS, and auth settings in production
- Review fallback behavior for missing external provider responses

Expand Down
158 changes: 55 additions & 103 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,122 +1,74 @@
# LaunchPix
# Talocode LaunchPix

LaunchPix is a Mistral-assisted, deterministic asset generator for product launches.
It turns raw screenshots into polished listing visuals, promo tiles, and hero banners.
Talocode LaunchPix is an API-first, open-source launch visual engine.
It turns product screenshots into listing frames, promo tiles, and hero banners with deterministic fallback rendering.

## Design system
- `DESIGN.md` is the canonical design brain for the product UI.
- `docs/design-md/google-designmd-spec.md` is a local copy of the Google DESIGN.md specification.
- `docs/design-md/README.md` explains how to use both files in this repo.
## Repository
- Canonical repo: `https://github.com/talocode/launchpix`

## Tech stack
- Next.js App Router + TypeScript
- Tailwind CSS + reusable UI primitives
- Supabase (Auth, Postgres, Storage)
- Mistral (structured planning only)
- Deterministic SVG -> PNG rendering (`@resvg/resvg-js`)
- Lemon Squeezy credit-pack billing and webhook fulfillment

## Core product flow
1. Sign in
2. Create project and upload screenshots
3. Generate structured asset plan via Mistral
4. Render deterministic asset pack (5 listing + promo + hero)
5. Preview/download assets while credits remain
## Product direction
- API first: developer endpoints live under `/api/v1/*`.
- Open source core: code is public, but API usage requires `LAUNCHPIX_API_KEY`.
- Credits model: users start with free credits, then buy one-time credit packs.

## Pricing model implemented
- Every account starts with 300 credits.
- Existing accounts are raised to at least 300 credits by `0004_credit_balance_model.sql`.
- Billing is credit based, not subscription based.
- Users buy one-time Lemon Squeezy credit packs after exhausting their included credits.

## Required environment variables
## Core stack
- Next.js App Router + TypeScript
- Supabase (Postgres, Storage)
- Mistral (planning + image generation)
- Lemon Squeezy (credit-pack checkout + webhook fulfillment)
- Resend (transactional email)

## API authentication
Every `/api/v1/*` request must include:
- `x-launchpix-api-key: <LAUNCHPIX_API_KEY>`
- `x-launchpix-user-id: <owner-user-uuid>`

Supported alternatives:
- `x-api-key`
- `Authorization: Bearer <LAUNCHPIX_API_KEY>`

## Developer API endpoints
- `GET /api/v1/projects`
- `POST /api/v1/projects`
- `GET /api/v1/projects/:projectId/generate`
- `POST /api/v1/projects/:projectId/generate`

## Environment variables
See `.env.example`.
Minimum required:

Critical keys:
- `NEXT_PUBLIC_APP_URL`
- `NEXT_PUBLIC_SUPABASE_URL`
- `NEXT_PUBLIC_SUPABASE_ANON_KEY`
- `SUPABASE_SERVICE_ROLE_KEY`
- `DATABASE_URL`
- `NEXTAUTH_SECRET`
- `GOOGLE_CLIENT_ID`
- `GOOGLE_CLIENT_SECRET`
- `MISTRAL_API_KEY`
- `MISTRAL_MODEL_VISION`
- `MISTRAL_MODEL_TEXT`
- `LEMON_SQUEEZY_API_KEY`
- `LEMON_SQUEEZY_STORE_ID`
- `LEMON_SQUEEZY_WEBHOOK_SECRET`
- `LEMON_SQUEEZY_STARTER_CREDITS_VARIANT_ID`
- `LEMON_SQUEEZY_CREATOR_CREDITS_VARIANT_ID`
- `LEMON_SQUEEZY_STUDIO_CREDITS_VARIANT_ID`

Optional for Supabase CLI workflows:
- `SUPABASE_ACCESS_TOKEN`
- `SUPABASE_DB_PASSWORD`
- `MISTRAL_MODEL_VISION`
- `MISTRAL_IMAGE_MODEL`
- `MISTRAL_IMAGE_AGENT_ID` (optional)
- `LAUNCHPIX_API_KEY`
- `LEMON_SQUEEZY_*`
- `RESEND_API_KEY`

## Local setup
1. Copy env:
- `cp .env.example .env.local`
2. Install dependencies:
- `npm install`
4. Apply database migrations using one of these options:
- Supabase CLI: `npx supabase db push --linked`
- or run the SQL files in `supabase/migrations/` in order
5. Start dev server:
- `npm run dev`
1. Copy env file: `cp .env.example .env.local`
2. Install: `npm install`
3. Apply DB migrations: `npx supabase db push --linked`
4. Start app: `npm run dev`

Recommended validation commands:
Validation:
- `npm run typecheck`
- `npm run build`

## Supabase notes
- Enable email auth.
- Ensure storage buckets exist:
- `project-uploads-raw`
- `project-uploads-normalized`
- `launchpix-assets`
- Apply RLS policies from migrations.
- If you use the Supabase CLI, link the project first with `npx supabase link`.

## Mistral notes
- Mistral is used for structured product/copy/layout planning.
- Rendering remains deterministic and template-driven.
- Default model: `mistral-small-2506` (configurable via env).
- The app currently uses the text model for schema-constrained planning and does not rely on image-vision inputs during generation.

## Lemon Squeezy notes
- Checkout init: `POST /api/billing/checkout`
- Verification: purchases are fulfilled by webhook after Lemon Squeezy confirms the order
- Webhook: `POST /api/billing/webhook`
- Configure Lemon Squeezy webhook URL to point to `/api/billing/webhook`.
- Select the `order_created` event for credit fulfillment.
- Create three Lemon Squeezy variants and map them to the variant ID env vars in `.env.example`.

## Commands
- `npm run dev`
- `npm run lint`
- `npm run typecheck`
- `npm run build`
- `npm run video:studio`
- `npm run video:render`
- `npm run video:render:chrome` on Windows if Remotion cannot download Chrome Headless Shell

## Demo video
- The Remotion demo composition lives in `remotion/`.
- Rendered output is written to `output/launchpix-demo.mp4`.
- The video explains the core LaunchPix story: project brief, screenshot uploads, Mistral planning, deterministic rendering, exports, credits, and billing.

## Deployment notes
- Set all env vars in hosting provider.
- `NEXT_PUBLIC_APP_URL` must be set in the hosting provider's production environment to your live domain; `.env.local` is only used locally.
- Use HTTPS and production callback URLs for Lemon Squeezy.
- Auth confirmation and billing redirects are built from `NEXT_PUBLIC_APP_URL`, so production must not point this to localhost.
- Keep `package-lock.json` committed so CI and hosting builds install the same dependency tree.
- Confirm webhook signature secret matches deployment env.

## Netlify notes
- Build command: `npm run build`
- Install command: `npm install` or `npm ci`
- The app relies on `@resvg/resvg-js` during server rendering, so the current `next.config.ts` must be preserved in deployments.
## Render deployment
- Render config is in [`render.yaml`](/C:/Users/Hp/Documents/Github/LaunchPix/render.yaml).
- Build command: `npm ci && npm run build`
- Start command: `npm run start`
- Set all required env vars in Render dashboard.

## Known MVP constraints
- Rate limiting is lightweight (in-memory).
- Credit packs are one-time purchases; subscription renewal automation is intentionally not used.
- Visual templates are production-capable baseline and can be expanded further.
## Legacy note
Previous Netlify-specific deployment notes were removed in favor of Render as the primary target.
Loading