PTENES
MODULE 5.1

🖥️ Frontend and packaging

The Factory isn’t an obscure script: it’s a screen with two boxes and a button. Here you launch the web app, track the pipeline in real time, download the assets, and make the package your own—ready to deliver.

6
Topics
~50
Minutes
Practical
Level
Delivery
Type
1

🧾 The minimal interface

The Factory screen has only four elements. This sparseness is intentional: the promise "minimum input, maximum output" needs to feel easy. The client sees two boxes and a button—and gets a consulting package.

localhost:8888 Company name Description (what it does, industry) ⚡ quick / deep Send → 4 elements · 1 click

📊 The four elements

  • •Company name — the target of the analysis (e.g., “Stripe,” “neighborhood bakery”).
  • •Description — brief context: industry, business model, company size.
  • •Depth — quick (~US$0.05) vs. deep (~US$0.50) toggle.
  • •Send button — triggers the 3-phase pipeline.
Name

the target

Description

the context

Depth

the cost

Send

the trigger

2

🚀 Run the web app locally

One command starts a Flask server and opens the browser. From there, the Factory stops being code and becomes a screen where you (or the client, in a demo) can type and click.

// terminal — start the web interface

source venv/bin/activate          # macOS/Linux
python -m strategy_factory.webapp

# abre automaticamente em http://localhost:8888
# porta ocupada? ele acha outra, ou: --port 9000

💡 Practical tip

Don’t know how to run this? Ask Claude Code: "start the Factory web app and open it in the browser." It activates the environment, installs anything missing, and resolves port errors. You just watch the screen appear.

🎬 Why running live matters

In a meeting, typing the client's name and watching the Factory work in real time is irrefutable proof. It’s worth more than any slide explaining "how it works"—because it happens right in front of them.

Flask

local server

8888

default port

Opens automatically

in the browser

Live demo

instant proof

3

📡 Real-Time Progress + Download

While the pipeline runs, the screen doesn’t freeze. The server uses Server-Sent Events (SSE) to push each step to the browser. At the end, all assets are ready to download.

1

POST /start

Submitting triggers the pipeline in a background thread, and the browser is taken to the progress page.

2

GET /progress/{job_id} (SSE)

An event stream displays "researching…", "synthesizing…", "generating…" — the progress bar advances in real time.

3

Results + download

When complete, the files (markdown, PPTX, DOCX, PNGs) are available to download individually or as a package.

💡 Why SSE instead of just "wait"

A progress bar builds trust: the user sees that something real is happening, not a frozen screen. In pipelines that take minutes, live feedback is what separates “professional” from “did it break?”

SSE

live events

job_id

tracks the session

Thread

runs in the background

Download

ready-made assets

4

🗂️ Organize the package into folders

The output isn’t a pile of files: it comes structured as output/{empresa}/ with subfolders by type. An organized package conveys care—and care is part of what the client is buying.

// structure generated for each company

output/stripe/
├── markdown/          # 15 documentos .md
├── presentations/     # 2 decks .pptx
├── documents/         # 2 relatórios .docx (Relatório + SOW)
├── mermaid_images/    # diagramas estado atual vs futuro (.png)
├── research_cache.json
└── state.json         # progresso e custo total

✓ Well-organized package

  • ✓Clear subfolders by deliverable type
  • ✓Numbered names in reading order
  • ✓Decks and reports at the top, appendices below

✗ Disorganized package

  • ✗15 loose files in the same folder
  • ✗Raw technical names (deliverable_07_v2.md)
  • ✗No indication of where to start
markdown/

15 docs

presentations/

2 decks

documents/

report + SOW

state.json

progress

5

🎨 Brand: make it your own

The package is the your product, not the open source tool's. Changing the logo, colors, and cover turns "some generated files" into "the deliverable from [your name] Consulting." The brand is what the client remembers.

1

Logo and cover

Add your logo to the deck’s cover slide and the first page of Word documents. Brand identity from the start.

2

Color palette

No pptx_generator.py, the RGBColor define the slide palette. Adjust them to match your brand colors.

3

Footer and contact information

A footer with your name, website, and contact information on every page. The client knows who to come back to when they want more.

// what to ask Claude Code

No gerador de PPTX, troque a paleta para
azul-marinho (#0B1F3A) e dourado (#C9A24B),
ponha meu logo "logo.png" na capa e um rodapé
com "Acme Consultoria de IA · acme.com.br".
Logo

on the cover

Colors

RGBColor

Footer

your contact

Identity

your product

6

📬 Host / Deliver the Package

The final touch is delivery. Compressing, hosting, and sending it with a short guided-reading note makes the client feel that bought a service, not that they got a folder of files.

🗜️ Compress

A .zip with the organized folder, named with the client and date: acme-estrategia-ia-2026.zip.

☁️ Host

Upload it to a Drive, Notion, or folder with a shareable link. The client can access it from anywhere.

📝 Guided Note

Short message: "start with the Executive Summary, then the roadmap. SOW attached for the proposal."

💡 Delivery tip

Never send "here you go, here's the link." Send a guided walkthrough: where to start, what each piece answers, and what the next step is. Curating the delivery is part of the service—and sets the stage for closing the deal.

Zip

single package

Link

easy access

Note

guided reading

Perception

is a service

✅ Module summary

✓
The interface is minimal by design — two boxes, one toggle, one button.
✓
One command starts the web app at localhost:8888 — and becomes a live demo.
✓
SSE shows progress and makes the download available — feedback that builds confidence.
✓
Organize + flag + deliver well — it’s what makes it feel like a service, not a set of files.

🎯 Mission 5.1 — Package with your identity

Generate and package a bundle that feels like you:

  1. Start the web app and run 1 company in quick mode.
  2. Change the deck's logo, colors, and footer to your brand.
  3. Organize the folder and compress it into a named .zip file.
  4. Write the guided reading note (3-4 lines).

Success: a .zip with your identity and a delivery note. What you gained: a deliverable that already feels like your product — ready to send to a client.

Next module:

5.2 — Positioning, offer, and pricing (niche, productize, and how much to charge)