Build Help Scout
KINDAreplaces $25/mosaves $300/yrback to the verdict
Build a small support inbox over manually imported email and explicit replies.
Before step 1
Everything below is assumed from the first step. Tick each one when you actually have it, not when you plan to.
- installPython is free; this local prototype requires no hosting subscription.
Why The local backend, tests and storage use Python.
Get it Install Python from python.org. Open a terminal in a new empty project folder. On Windows, use py -3 where this guide says python if python is not on PATH; on macOS/Linux use python3 if needed. Create .venv and activate it before installing packages. open ↗
Verify
python --version reports 3.12+ and python -c "import sqlite3" succeeds. - installNo paid service required for this local step.
Why You need to view the local interface and edit generated project files.
Get it Use an installed Chrome, Firefox or Edge browser. Open the empty project folder in your editor; open the terminal there, not in this catalog repository.
Verify
You can create a text file in the project folder and open browser developer tools. - have readyNo paid service required for this local step.
Why This fixture makes the first end-to-end check reproducible.
Get it Create synthetic sample data before implementation: Two .eml messages in one thread, an internal note and a failed outbound reply. Save it under fixtures/ with the expected results in fixtures/README.md; use no real credentials or customer records.
Verify
The fixture files and expected outcomes exist and can be inspected without a vendor account. - decideNo paid service required for this local step.
Why The full commercial product is larger than this guide.
Get it The deliverable is a small support inbox over manually imported email and explicit replies. Read every exclusion below. Indie mode runs locally; any public or shared use requires the product access and deployment gates first.
Verify
You can name the primary workflow and the vendor features this version deliberately leaves out. - accountProvider-specific relay fees and domain costs; no free tier or delivery guarantee is assumed.
Why Outbound confirmations or replies need a delivery provider; a fake adapter covers automated tests.
Get it Obtain SMTP host, port, username and password from your chosen relay dashboard under SMTP settings. Verify the sender/domain using that provider DNS instructions. Use only your own test recipient initially and record the actual plan and rate limit in OPERATIONS.md.
Verify
The supplied smtp_probe.py sends one labelled test message to your own inbox and reports the relay response without logging credentials.
Data model
Create these before the first phase that stores anything. Changing a table later is the expensive kind of change.
- conversations(id,subject,status,assignee) - messages(id,conversation_id,message_id,in_reply_to,direction,body,at) - notes(id,conversation_id,author,body) - replies(id,conversation_id,state,message_id) - articles(id,slug,title,body,published) - Use stable ids and explicit relationships; add auxiliary tables named by the phases before those phases use them. - Acceptance fixture: Two .eml messages in one thread, an internal note and a failed outbound reply.
Environment variables
These go in a .env file the app reads at startup. The pack's .env.example is this table as a file · copy it, never commit the filled-in version.
| Variable | Needed | Example | Where the value comes from |
|---|---|---|---|
DATA_DIR | required | ./data/help-scout | A new private folder this application creates on first run; never serve it as static files. |
SECRET_KEYsecret | required | replace-with-a-random-secret | Generate with python -c "import secrets; print(secrets.token_hex(32))" and save only in .env. |
APP_MODE | required | indie | Use indie for loopback-only personal work. Product mode must refuse to start until owner login and the deployment gates are configured. |
SITE_URL | required | http://127.0.0.1:5000 | The origin used for local forms and links; replace with the chosen HTTPS origin in product mode. |
SMTP_HOST | required | replace-with-relay-host | Copy the SMTP hostname from the relay dashboard. |
SMTP_PORT | required | 587 | Use a relay supporting STARTTLS on this port; confirm it in its setup instructions. |
SMTP_USERsecret | required | replace-with-smtp-user | Copy the relay username; it may differ from your sign-in email. |
SMTP_PASSWORDsecret | required | replace-with-smtp-password | Create SMTP credentials in the relay dashboard, not your personal mailbox password. |
MAIL_FROM | required | owner@example.com | Your relay-verified sender address; replace before real sends. |
MAIL_TEST_TO | required | owner@example.com | An inbox you control for the explicit preflight test. |
The build, in order
Local foundation and data contract
Create the runnable local foundation for a small support inbox over manually imported email and explicit replies, including the real schema and acceptance fixture.
Run the venv command first, then stop and activate it before running the remaining commands. Use your OS instructions: Windows .venv\Scripts\activate.bat in cmd, or .venv\Scripts\Activate.ps1 in PowerShell; macOS/Linux source .venv/bin/activate. Then install the listed packages. Create app.py exposing app, load .env with python-dotenv, and add a /healthz route. Freeze tested dependency versions to requirements.txt. Create .env manually from .env.example; replace SECRET_KEY before launch.
Files
app.pyrequirements.txt.env.example.gitignoreterminalpython -m venv .venv python -m pip install Flask Flask-WTF python-dotenv waitress tzdata python -m pip freeze > requirements.txt python -m flask --app app run --host 127.0.0.1
For database-backed state create schema.sql and db.py using this model: conversations(id,subject,status,assignee); messages(id,conversation_id,message_id,in_reply_to,direction,body,at); notes(id,conversation_id,author,body); replies(id,conversation_id,state,message_id); articles(id,slug,title,body,published). Add the auxiliary relationships explicitly used in later phases; use stable ids, foreign keys, parameterized values and transactions. For canonical files use atomic replacement and hashes instead. Implement python manage.py init and python manage.py seed to create only synthetic data: Two .eml messages in one thread, an internal note and a failed outbound reply. Re-running init must not erase data.
Files
schema.sqldb.pymanage.pyfixtures/README.mdterminalpython manage.py init python manage.py seed
Install Flask-WTF CSRF protection for forms and same-origin fetches, validate Host and Origin against SITE_URL, bound inputs and escape output. Deliberately public intake endpoints get bounded validation and rate limits; signed provider webhooks use signature checks instead of browser CSRF tokens. All other admin routes stay local until product authentication exists. When a later phase tests viewer/member permissions, implement the users, hashed passwords, expiring server sessions and role checks in this foundation first; product mode must never use a fabricated identity from request input. Add error, empty, keyboard-focus and retry states now.
Files
app.pytemplates/base.htmltest/test_foundation.pyCreate providers/mail.py using smtplib with a timeout, verified TLS/STARTTLS and an EmailMessage. Refuse placeholder credentials and non-test recipients until the owner enables sending. Implement scripts/smtp_probe.py to send one labelled message only to MAIL_TEST_TO, and provide a fake adapter for tests. Store no password or full message body in logs.
Files
providers/mail.pyscripts/smtp_probe.pyterminalpython scripts/smtp_probe.py
done when · tick each as it passeswatch out- The Flask development server is for local development only. Loopback binding alone does not replace CSRF and origin validation.
Email import and threading
Email import and threading for Help Scout: Parse user-exported .eml files with the Python email package and normalize text bodies; preserve original Message-ID.
Parse user-exported .eml files with the Python email package and normalize text bodies; preserve original Message-ID.
Files
features/email_import_and_threading.pytemplates/email_import_and_threading.htmlThread by In-Reply-To/References with explicit manual merge for ambiguous messages; deduplicate Message-ID.
Files
features/email_import_and_threading.pyUse Two .eml messages in one thread, an internal note and a failed outbound reply. Check: Importing the same .eml twice creates one message. Then check: Two unrelated messages with the same subject are not automatically merged. Add a focused regression for the failure case under test/ using a temporary database or folder and fake external services; also perform the visible workflow in a browser.
Files
test/test_email_import_and_threading.pyterminalpython -m unittest discover -s test
done when · tick each as it passeswatch out- Subject text alone is an unsafe conversation identity.
Assignment and replies
Assignment and replies for Help Scout: Add open/pending/closed states, assignee and internal notes; keep notes separate from outbound message bodies.
Add open/pending/closed states, assignee and internal notes; keep notes separate from outbound message bodies.
Files
features/assignment_and_replies.pytemplates/assignment_and_replies.htmlCompose and preview a reply then explicitly submit via SMTP, preserving thread headers and an accepted/failed/unknown ledger.
Files
features/assignment_and_replies.pyUse Two .eml messages in one thread, an internal note and a failed outbound reply. Check: The internal note never appears in a sent reply. Then check: An ambiguous send failure remains unknown and requires review before resend. Add a focused regression for the failure case under test/ using a temporary database or folder and fake external services; also perform the visible workflow in a browser.
Files
test/test_assignment_and_replies.pyterminalpython -m unittest discover -s test
done when · tick each as it passeswatch out- The guide uses manual email imports; always-on inbound mailbox synchronization is not implied.
Help center and exchange
Help center and exchange for Help Scout: Publish a small sanitized article library with search and draft visibility controls.
Publish a small sanitized article library with search and draft visibility controls.
Files
features/help_center_and_exchange.pytemplates/help_center_and_exchange.htmlExport conversations with their raw imported messages, notes and reply ledger; provide a per-conversation deletion workflow.
Files
features/help_center_and_exchange.pyUse Two .eml messages in one thread, an internal note and a failed outbound reply. Check: A draft article is unavailable at its guessed public URL. Then check: Export/import preserves the two-message thread and internal-note distinction. Add a focused regression for the failure case under test/ using a temporary database or folder and fake external services; also perform the visible workflow in a browser.
Files
test/test_help_center_and_exchange.pyterminalpython -m unittest discover -s test
done when · tick each as it passeswatch out- This is a small-team inbox, not an omnichannel helpdesk or vendor-operated email service.
Portable delivery and clean-start proof
Finish the Help Scout replacement with a documented first-run path and a recoverable export.
Document prerequisites, every configuration variable, data locations and the three domain workflows: Email import and threading; Assignment and replies; Help center and exchange. Include the exclusions, actual costs and source check date 2026-09-05. Commands shown earlier that reference project files are files the builder must implement before running them.
Files
README.md.env.exampleUse sqlite3.Connection.backup for the database in DATA_DIR and pause writers while taking the matching attachment snapshot. Keep schema version, hashes and a manifest for help-scout. Restore into a separate empty directory or isolated deployment, with all outbound actions and schedules disabled. Recreate this proof: Two .eml messages in one thread, an internal note and a failed outbound reply. Compare ids/counts and open the result before recording the restore date. Never test a restore over the only live copy.
Files
OPERATIONS.mdscripts/backup.pyUse a new folder and only README instructions to reach the fixture outcome. Install from requirements.txt, initialize storage, run the tests and exercise the UI at 375px and 1280px; use keyboard-only controls and inspect browser errors. Record exactly what passed; do not mark unrun checks complete.
Files
README.mdverification.mdterminalpython -m pip install -r requirements.txt python -m unittest discover -s test
done when · tick each as it passeswatch out- Export without an import or restore rehearsal is not verified portability.
Operate and share with access controlsproduct builder
Product-builder only: make a small support inbox over manually imported email and explicit replies operable for its stated audience before allowing remote access.
Add owner/member/viewer authorization as appropriate, password hashes through Werkzeug, expiring server-side sessions, CSRF and login rate limits. Add users, sessions and audit schema migrations plus an owner-init command prompting securely for its password. Enforce ownership on every private read/write/download and fail closed when product setup is incomplete. Existing learner or admin identities must use this same boundary.
Files
ARCHITECTURE.mdOPERATIONS.mdServe app:app with Waitress on loopback behind Caddy HTTPS. Configure trusted proxy headers narrowly, Secure/HttpOnly/SameSite cookies, upload limits, request ids and structured logs without private content. Run background jobs as a separate supervised process when the domain workflow requires them.
Files
CaddyfileOPERATIONS.mdterminalwaitress-serve --listen=127.0.0.1:5000 app:app
Add a scheduled encrypted off-host backup using this procedure: Use sqlite3.Connection.backup for the database in DATA_DIR and pause writers while taking the matching attachment snapshot. Keep schema version, hashes and a manifest for help-scout. Monitor health, disk space, failed jobs and backup age. Stop the service to test an alert; rehearse recovery with outbound effects disabled and record recovery time. Rotate any exposed credentials and require reconciliation before resuming queues.
Files
OPERATIONS.mdrelease-checklist.md
done when · tick each as it passeswatch out- Product mode is additional engineering, not a switch that makes a local prototype production-ready.
That is the whole plan for Help Scout. What it deliberately does not cover is below · check the gaps before you call it a replacement.
- This is a small-team inbox, not an omnichannel helpdesk or vendor-operated email service.
- This is a small support inbox over manually imported email and explicit replies; full Help Scout feature parity, vendor hosting and support are not included.
- email threading, customer context, docs, workflows, reporting, and support polish
- omnichannel integrations
- large-scale deliverability
- AI resolution tuning
- enterprise routing and compliance
- Extend help center and exchange only after the fixture and recovery checks pass.
- Before adding another integration, document its credentials, limits, cost and failure behavior with primary-source links.
Need the files? The project pack on the verdict page hands your agent the whole brief · more customer support.