launchmaxxing/PLAN-2026-10-23-DEEP.md
caelum0x b415779e7c docs: add architecture/strategy build docs, sync PLAN with 0.2.6
ARCHITECTURE-2026-10-23.md (system diagram, data flow, risks, prioritized
build list) and STRATEGY-2026-10-23.md (competitors, ICP, growth moves)
were written earlier this session but never committed. Commit them, and
update PLAN-2026-10-23-DEEP.md's "shipped this session" section plus
ARCHITECTURE's risk list to reflect the 0.2.6 atomic-write fix.
2026-10-23 06:29:27 +03:00

8.5 KiB

launchmaxxing — internal build spec (2026-10-23)

Internal doc. No pages/screens exist (pure CLI, no server) — route/UI sections are replaced with argparse subcommand + I/O spec per the actual architecture. Competitive/ICP/journey planning lives in STRATEGY-2026-10-23.md / ARCHITECTURE-2026-10-23.md; not duplicated here.

0. Shipped this session (0.2.5, 0.2.6)

0.2.5 — backlinks --category/--account-free: src/launchmaxxing/backlinks.py (fetch, _fallback gained category/account_free_only params, narrow fallback_directories via catalog.platforms_for_category/ platforms_account_free, ignored once a live provider answers) + src/launchmaxxing/cli.py (_cmd_backlinks, p_back parser). 6 new tests (tests/test_backlinks.py, tests/test_cli.py). 212/212 passing.

0.2.6 — atomic state.save(): temp file (tempfile.mkstemp in the same directory) + fsync + os.replace() instead of a direct write_text(), closing the crash-mid-write corruption risk flagged as top priority in ARCHITECTURE-2026-10-23.md §4.1. On error the temp file is removed and the original state.json is left untouched. 2 new tests (tests/test_state.py). 214/214 passing. Bumped pyproject.toml/ __init__.py to 0.2.6, CHANGELOG.md synced.

1. CLI surface (every subcommand, exact contract)

Entry: launchmaxxing <command> [args] (src/launchmaxxing/cli.py:build_parser). Global flags on every subcommand (_add_common): --state-file PATH (else LAUNCHMAXXING_STATE env, else ~/.launchmaxxing/state.json), --db-file PATH (else LAUNCHMAXXING_DB env, else ~/.launchmaxxing/launchmaxxing.db), --json (machine-readable). launchmaxxing --version prints __version__ (must stay synced with pyproject.toml's version — regression-tested in test_cli.py).

Command Args / flags Data touched Exit non-zero on
directories --category C, --account-free, --check-links reads catalog.PLATFORMS only --check-links + any broken URL
directories --check-links + --category live GET to all (or one category's) submit URLs via linkcheck.check_all any LinkCheckResult.ok is False
platform-status (deprecated alias of submit) product platform_id status [--note] state.json platform bucket unknown platform_id/status
submit product [platform_id] [status] [--note] [--history] state.set_platform_status (current) + db.log_submission_event (append-only history); --history reads db.list_submission_events —
checklist product checklist.build (reads state steps + platform submissions) —
checklist-step product step_key status [--note] state.set_step_status unknown step_key
backlinks domain [--allow-live] [--category C] [--account-free] fallback: catalog; live: CrawlGraph/DataForSEO over network, env-key gated invalid domain
pain-points query [--subreddit S...] [--product P] [--limit N] live read-only Reddit search.json; saves to state.pain_point_drafts Reddit unreachable/429/5xx
drafts [--status S] [--product P] reads state.pain_point_drafts —
draft-status draft_id status state.set_draft_status (drafted/approved/dismissed — never "posted") draft not found
content product {product_hunt,show_hn,twitter,reddit,linkedin,all} --tagline --problem --audience --differentiator [--url] [--pricing] [--subreddit] [--profile-file] [--save] pure function of ProductProfile; --save writes db.content_drafts missing required profile field
outreach add product name {creator,press,community,user} [--handle] [--status] [--note] db.add_outreach_contact invalid channel/status
outreach list product [--status S] [--csv PATH] db.list_outreach_contacts; --csv → outreach.write_contacts_csv —
outreach status contact_id status [--note] db.update_outreach_status contact not found
outreach draft product channel [--contact-name] + profile flags pure outreach.draft_message —
utm build product base_url [--platform-id] [--source] [--medium] [--campaign] [--content] utm.build_url (defaults from utm.PLATFORM_UTM_DEFAULTS) + db.add_utm_link missing base_url
utm list product [--csv PATH] db.list_utm_links; --csv → utm.write_links_csv —
track product [--stale-days N] track.build: merges state (directories/checklist) + db (outreach/content/utm) —
report product [--stale-days N] [--out PATH] report.render_markdown(track.build(...)) —
init product [--category C] reads catalog + writes initial state bucket via first touch —

No command ever posts/submits/emails on the user's behalf — every "do the thing" step prints a draft or opens a known URL; a human executes it. This is a deliberate invariant, not a gap — do not add auto-posting.

2. Data model (all local, no server)

~/.launchmaxxing/state.json (state.py, one JSON blob, json.dumps(..., sort_keys=True)):

{"products": {"<name>": {"platforms": {"<platform_id>": {status, note,
  submitted_at, updated_at}}, "steps": {"<step_key>": {status, note,
  updated_at}}, "created_at}}, "pain_point_drafts": [{id, product_name,
  query, subreddit, thread_url, thread_title, snippet, upvotes, age_days,
  draft_reply, status, created_at}]}

~/.launchmaxxing/launchmaxxing.db (db.py, SQLite, 4 tables, each id TEXT PRIMARY KEY = uuid4().hex):

  • submission_events(product_name, platform_id, status, note, created_at) — append-only.
  • outreach_contacts(product_name, name, channel, handle, status, note, created_at, updated_at).
  • content_drafts(product_name, platform, kind, body, created_at).
  • utm_links(product_name, platform_id, base_url, source, medium, campaign, content, full_url, created_at).

Both stores are independent; track.build is the only place that joins them for a single product.

3. Catalog (catalog.py) — static reference data, no network

24 PLATFORMS rows (id, name, url, categories, account_free, note, verified_at). 13 account-free, 11 account-gated (re-verified 2026-10-18: peerpush/turbo0/smol_launch/startupbase/findly_tools flipped account_free: False after live re-check despite being added as "account-free" directories — do not re-flip without a fresh live check). 5 permanently fail --check-links (Cloudflare/DataDome JS walls, not dead): indie_hackers, alternativeto, there_is_an_ai_for_that, g2, capterra — documented in each entry's note, expected behavior. 10-step PLAYBOOK_STEPS (static). platforms_for_category, platforms_account_free, all_categories are the only query functions — backlinks.py now reuses both (see §0).

4. What remains to build (ranked)

  1. Catalog breadth vs. competitors. OpenLaunch (239 platforms) / SubmitFleet (339) dwarf our 24. Any new entry needs: real submit URL, live-verified account_free (plain HTTP GET + read the form, not just the homepage), category tags, verified_at. Do this in small batches (5-10 at a time) with --check-links re-run after each batch — do not bulk-import an unverified list, 5 of 24 already needed correction after initial add.
  2. report --format json. report.render_markdown only emits Markdown; track.build's dict is already JSON-serializable via --json on track itself, so report's only gap is the --out file path not having a JSON sibling. Low effort, add if a consumer (e.g. a future status-page generator) needs it — no current caller needs it, do not build speculatively.
  3. backlinks --allow-live end-to-end verification. CrawlGraph/ DataForSEO paths are unit-tested against a fake transport only; no owner credential exists to exercise either live path for real. Owner blocker: sign up for CrawlGraph's free tier (15 calls/month, no card — not a spend, but still an owner account-creation step) if this is ever worth doing.
  4. PyPI publish. Owner blocker per RELEASE.md: PyPI account + 2FA + API token/trusted publisher. No code change possible from this side; pip install git+https://github.com/caelum0x/launchmaxxing.git@v0.2.5 is the only install path until then.
  5. Lint nits (non-blocking). ruff check src tests → 2 pre-existing findings, neither touched this session: catalog.py's __all__ not isort-sorted (cosmetic), linkcheck.py:48 blind except Exception (intentional — catches any transport failure mode uniformly, matches reddit_search.py's same pattern; leave as-is, do not add noqa).