# Package manifest — every path, marked folder or file

**29 folders · 122 files.** Nothing else.

## Read this first

**`SearchConsole` is a FILE, not a folder.** It is `src/Providers/SearchConsole.php` —
a PHP class that talks to the Google Search Console API. The same applies to
`RobotsTxt`, `UrlNormalizer`, `PageParser`, `Crawler`, `AiAccessProbe`,
`CheckRunner`, `Scorer`, `AuditService`, `WordPress`, `Shopify`, `Wix` and
`Publisher`: all of them are `.php` files, not directories.

**You do not need to create any of these folders by hand.** They all exist inside
the zip. Extract it and the structure is there.

**`.env` is deliberately absent.** Your credentials are not in this archive, so
extracting over your existing folder cannot destroy them — as long as you
overwrite rather than delete the folder first.

## Full listing

| Type | Path | Size | Web-accessible? | What it is |
|---|---|---|---|---|
| file | `.env.example` | 6 KB | NO | Template for your credentials file. Copy to .env and fill in. NEVER commit .env. Now also carries the Anthropic and OpenAI keys and their daily caps. |
| file | `.gitignore` | 1 KB | NO | Keeps .env, vendor/, node_modules/ and logs out of git. |
| file | `.htaccess` | 4 KB | NO | Apache rules for when the front controller sits AT the app root — YOUR layout. Blocks source, config, bin, var and every numbered folder. |
| file | `CHANGELOG.md` | 40 KB | NO | What changed in each build and why, with the measurements and the costs. Build 3.0 is at the top. |
| file | `INTEGRATION-GUIDE.md` | 36 KB | NO | Full deployment and API wiring guide. Read section 1 for paths, 2 for MySQL. |
| file | `MANIFEST.md` | 21 KB | NO | This file. Every path in the package. |
| file | `README.md` | 8 KB | NO | Quick start, the commands, the role table and the content pipeline in one paragraph. |
| file | `START-HERE.md` | 4 KB | NO | **Read this first.** Which document to read when, the three-minute upload, and what everything costs. |
| file | `UI-UX-REVIEW.md` | 23 KB | NO | The interface review: every screen, why it is shaped that way, what was wrong and is now not, and a ranked list of what to do next. |
| file | `UPLOAD-TO-GODADDY.md` | 11 KB | NO | Step-by-step cPanel upload: back up, extract, two migrations, three API keys, connect each CMS, delete the installers. |
| file | `bootstrap.php` | 10 KB | NO | THE ANCHOR. Autoloader + .env + error handling. Every entry point requires this one file, and AISEO_ROOT is the folder that holds it. |
| file | `migrate-web.php` | 16 KB | NO | **Creates and updates the database tables from a browser.** Lists what is pending, runs the migrations on a confirmed POST. Refuses anonymous visitors once any account exists. DELETE after use. |
| file | `preflight.php` | 15 KB | NO | **Blank-500 diagnostic.** PHP 5.4-compatible so it runs on ANY version. **DELETE it after use — it prints server paths and the error-log tail to anyone who asks.** |
| file | `setup-env.php` | 23 KB | NO | **Creates .env from a browser.** Tests the DB connection first, generates APP_KEY, sets 0600. **DELETE after use — it can rewrite your database credentials and cannot be put behind the login.** |
| **FOLDER** | `bin/` |  | NO | CLI scripts. Run from the shell or cron. Never from a browser. |
| file | `bin/audit.php` | 5 KB | NO | CLI: run an audit now. php bin/audit.php --site=1 --type=canary |
| file | `bin/doctor.php` | 15 KB | NO | CLI: environment check. RUN THIS FIRST. Prints resolved paths, diagnoses MySQL, probes whether .env is web-readable. |
| file | `bin/migrate.php` | 2 KB | NO | CLI: apply the SQL migrations. php bin/migrate.php |
| file | `bin/worker.php` | 10 KB | NO | CLI: the cron process that runs every queued job — crawls, analyses, drafts, images and publishes. **Nothing happens without it.** Takes a comma-separated --queue. |
| **FOLDER** | `config/` |  | NO | Path configuration. Not web-accessible. |
| file | `config/installer-guard.php` | 7 KB | NO | Shared gate for the three installer files. PHP 5.4-compatible. Opens only before the first account exists, or for a signed-in administrator. |
| file | `config/path-resolver.php` | 9 KB | NO | Finds your folders wherever they are. Runs before the autoloader exists, which is why it is not in src/. |
| file | `config/paths.php` | 2 KB | NO | Optional: set your folder paths explicitly here instead of in .env. |
| **FOLDER** | `db/` |  | NO | Container for migrations. |
| **FOLDER** | `deploy/` |  | NO | Alternative .htaccess files and deployment notes. |
| file | `deploy/DEPLOY.md` | 8 KB | NO | Deployment notes. |
| file | `deploy/ENV-SETUP.md` | 7 KB | NO | Environment setup notes. |
| file | `deploy/htaccess-A-separate-folder.txt` | 4 KB | NO | Apache rules for a separate public/ web root. |
| file | `deploy/htaccess-B-front-controller-at-root.txt` | 3 KB | NO | Apache rules for the front controller at the app root. |
| **FOLDER** | `public/` |  | NO | THE ONLY WEB-ACCESSIBLE FOLDER. In your layout its contents sit at /aiseo/ directly. |
| file | `public/.htaccess` | 2 KB | YES | Front-controller rewrite and the header set, for when public/ is its own web root. |
| file | `public/index.php` | 115 KB | YES | The front controller and every route. |
| file | `public/styleguide.html` | 31 KB | YES | Every component in both themes, in a browser. Open it to see what exists before building anything new. |
| **FOLDER** | `render-service/` |  | NO | Optional Node + Playwright render plane. |
| file | `render-service/package.json` | 1 KB | NO | Node dependencies for the optional render plane. |
| file | `render-service/server.mjs` | 13 KB | NO | Playwright render service. Optional — without it the crawl plane still covers ~85% of the checks. |
| **FOLDER** | `src/` |  | NO | All PHP classes. NOT web-accessible. |
| **FOLDER** | `templates/` |  | NO | PHP templates. NOT web-accessible. |
| **FOLDER** | `tests/` |  | NO | Test suites. Run with php tests/<name>.php |
| file | `tests/auth_test.php` | 4 KB | NO | 25 assertions. Roles, capabilities, lockout, password rules, redirect safety. No database. |
| file | `tests/content_test.php` | 45 KB | NO | 154 assertions. Markdown, parsing, clustering, calendar dates, encryption, the brand stripper, the duplicate-post decision. No database. |
| file | `tests/env_test.php` | 5 KB | NO | 20 assertions. .env parsing and typed accessors. |
| file | `tests/integration_test.php` | 13 KB | NO | Assertions that need a real database: publish safety, queue de-duplication, and that PHP and MySQL normalise a URL identically. |
| file | `tests/robots_test.php` | 6 KB | NO | 33 assertions. robots.txt parsing. |
| file | `tests/scorer_test.php` | 6 KB | NO | Scoring and banding. |
| **FOLDER** | `var/` |  | NO | Ships empty. Created by the package; its contents are written at runtime and are never part of a release. |
| file | `var/.gitkeep` | 1 KB | NO | An empty placeholder. A zip cannot hold an empty directory, so this file is what makes var/ exist after extraction. |
| **FOLDER** | `db/migrations/` |  | NO | The .sql files. Applied in filename order, once each. |
| file | `db/migrations/001_core.sql` | 27 KB | NO | Database schema. 34 tables. |
| file | `db/migrations/002_seed.sql` | 39 KB | NO | Reference data: check definitions, AI crawler registry, country config, directory blocklist. This is CONFIG — edit and re-run to tune weights. |
| file | `db/migrations/003_inconclusive.sql` | 2 KB | NO | Adds the `inconclusive` run state and retires scores published for runs which fetched nothing. |
| file | `db/migrations/004_check_coverage.sql` | 2 KB | NO | Adds `check_definition.implemented` and flags the checks that have a working evaluator. |
| file | `db/migrations/005_info_weight.sql` | 1 KB | NO | Sets info-severity checks to weight 0 so a deliberate GPTBot block stops costing score. |
| file | `db/migrations/006_users.sql` | 4 KB | NO | Accounts: `app_user`, `auth_event`, `user_pref`. New tables only. No seed account, on purpose. |
| file | `db/migrations/007_analyze_content.sql` | 15 KB | NO | **NEW.** The analysis and content pipeline: `site_country`, `analysis_run`, `keyword_gap`, `content_calendar`, `article`, `article_revision`, `article_image`, `cms_connection`, `publish_attempt`. New tables only. |
| file | `db/migrations/008_publish_safety.sql` | 5 KB | NO | **NEW.** The idempotency key and the publish-safety columns, as guarded ALTERs that run on MySQL and MariaDB alike — plus the data repair that makes the new unique index creatable on a database that already ran an earlier 007. |
| file | `db/migrations/009_settings_content.sql` | 16 KB | NO | Adds settings, documents, offerings, internal links, article feedback, backlink snapshots and Search Console caching. Every column addition is guarded, so it runs on MySQL as well as MariaDB and is safe to run twice. |
| **FOLDER** | `public/assets/` |  | NO | CSS and JS. Served directly. |
| **FOLDER** | `src/Analyze/` |  | NO | Competitor and keyword analysis, per country. |
| file | `src/Analyze/BacklinkComparer.php` | 19 KB | NO | Compares your referring domains with each competitor's and writes a dated snapshot. Explains the gap in plain English. Deliberately not a link exchange — see the class docblock. |
| file | `src/Analyze/Clusterer.php` | 10 KB | NO | Groups keywords into the articles that should cover them, so the same article is not commissioned three times. |
| file | `src/Analyze/CompetitorFinder.php` | 14 KB | NO | Two-pass competitor discovery, then classification: directory, marketplace, publisher, OEM principal or a real rival. A manual classification is never overwritten. |
| file | `src/Analyze/Countries.php` | 7 KB | NO | Loads every country DataForSEO supports from its free locations endpoint. Nothing is hardcoded. |
| file | `src/Analyze/KeywordHarvester.php` | 15 KB | NO | Our rankings, their rankings, and the gap between them — enriched with volume, difficulty, CPC and intent. |
| file | `src/Analyze/PagePerformance.php` | 14 KB | NO | Search Console clicks, impressions and position per published article, cached locally. Refuses to judge an article under 21 days old or to report an "AI traffic" figure that does not exist. |
| file | `src/Analyze/SiteAnalyzer.php` | 25 KB | NO | The analysis orchestrator. Queues, runs, scores and explains. Every recommendation carries a sentence saying why. |
| **FOLDER** | `src/Audit/` |  | NO | The crawler and the checks. Every name here is a FILE, not a folder. |
| file | `src/Audit/AiAccessProbe.php` | 20 KB | NO | Cross-checks robots.txt against a live user-agent probe. A 403 to GPTBot while Chrome gets 200 is invisible in robots.txt. |
| file | `src/Audit/AuditService.php` | 13 KB | NO | The audit orchestrator. |
| file | `src/Audit/CheckRunner.php` | 26 KB | NO | Runs the check definitions against a crawl. |
| file | `src/Audit/Crawler.php` | 19 KB | NO | The crawler. Polite, budgeted, per-host rate limited. |
| file | `src/Audit/PageParser.php` | 18 KB | NO | HTML parsing: titles, headings, canonicals, schema, links. |
| file | `src/Audit/RobotsTxt.php` | 14 KB | NO | robots.txt parser, per-agent. |
| file | `src/Audit/Scorer.php` | 20 KB | NO | Weighted scoring and the severity bands. |
| file | `src/Audit/UrlNormalizer.php` | 8 KB | NO | URL normalisation, so one page is not counted as four. |
| **FOLDER** | `src/Content/` |  | NO | Briefs, articles, images, the calendar and publishing. |
| file | `src/Content/ArticleWriter.php` | 30 KB | NO | Turns a brief into an article via Anthropic. Hard rules: never invent a statistic, never claim anything about the client company, no raw HTML. |
| file | `src/Content/BriefBuilder.php` | 20 KB | NO | Builds the brief from the actual analysis: demand, the pages to beat, an outline, the questions, the internal links that genuinely exist, and the SEO and AI-SEO requirements. |
| file | `src/Content/CalendarPlanner.php` | 14 KB | NO | Lays out the publishing slots for a month at the site's own cadence (7, 5, 3, 2 or 1 a week) and builds the month grid the calendar renders. |
| file | `src/Content/DocumentExtractor.php` | 28 KB | NO | Reads uploaded company documents so the writer can be grounded in them. Handles .txt, .md, .pdf (filter chains and /ToUnicode CMaps), .doc and .docx. |
| file | `src/Content/Exporter.php` | 18 KB | NO | Exports one article as HTML, Markdown or a genuine .docx (a zip of OOXML parts, not HTML wearing a .doc extension). |
| file | `src/Content/ImageMaker.php` | 8 KB | NO | Generates the hero image and strips the client name out of the scene first. No text, logos, brand names or signage. |
| file | `src/Content/Markdown.php` | 13 KB | NO | Markdown to HTML. Escapes first, then emits tags; rejects any href that is not http(s) or relative. |
| file | `src/Content/Mindmap.php` | 13 KB | NO | The content strategy as one radial SVG: a circle per keyword cluster, sized by demand, coloured by how far the work has got. Server-rendered so it prints and pastes into a deck. |
| file | `src/Content/Publisher.php` | 21 KB | NO | The one action that changes something outside this app, and the most conservative code here. Approval, a tested connection, an atomic claim, and evidence written before the request leaves. |
| **FOLDER** | `src/Core/` |  | NO | Env, Logger, Queue, Auth, Crypto, Arr. |
| file | `src/Core/Arr.php` | 3 KB | NO | Tolerant field extraction for API responses. Unknown is never zero. |
| file | `src/Core/Auth.php` | 21 KB | NO | Roles, capabilities, lockout, session handling. |
| file | `src/Core/Crypto.php` | 6 KB | NO | AES-256-GCM for the CMS credentials, keyed from APP_KEY. |
| file | `src/Core/Env.php` | 7 KB | NO | .env reader and typed accessors. |
| file | `src/Core/Logger.php` | 3 KB | NO | Structured logging with secret redaction. |
| file | `src/Core/Queue.php` | 10 KB | NO | The job queue. Idempotency keys with a unique index behind them, and a claim that survives two workers. |
| file | `src/Core/Settings.php` | 10 KB | NO | Per-website article settings: cadence, length, furniture, what the company sells and does not sell, house rules, byline. One row per site. |
| **FOLDER** | `src/Db/` |  | NO | PDO wrapper and the migrator. |
| file | `src/Db/Database.php` | 11 KB | NO | PDO wrapper with real error diagnosis — "wrong password", not "connection failed". |
| file | `src/Db/Migrator.php` | 5 KB | NO | File-based migrator. Quote- and comment-aware statement splitting. |
| **FOLDER** | `src/Http/` |  | NO | HTTP client, router, views. |
| file | `src/Http/HttpClient.php` | 16 KB | NO | Retries with full jitter, response cache, per-provider cost metering and hard daily budget caps. |
| file | `src/Http/HttpResponse.php` | 5 KB | NO | The response object, including the certificate and robots helpers. |
| file | `src/Http/Router.php` | 2 KB | NO | The router. |
| file | `src/Http/View.php` | 6 KB | NO | Template rendering, escaping helpers and URL building. |
| **FOLDER** | `src/Providers/` |  | NO | External APIs. Every name here is a FILE, not a folder. |
| file | `src/Providers/Anthropic.php` | 10 KB | NO | Messages API. Writes the articles. Priced, metered and capped. |
| file | `src/Providers/DataForSeo.php` | 23 KB | NO | SERP, Labs and keyword endpoints. Reports a budget stop as a budget stop, never as an empty result. |
| file | `src/Providers/GoogleOAuth.php` | 7 KB | NO | OAuth for Search Console and GA4. |
| file | `src/Providers/GooglePerformance.php` | 11 KB | NO | PageSpeed Insights and CrUX. |
| file | `src/Providers/OpenAiImages.php` | 11 KB | NO | Image generation. The no-text/no-logo/no-brand exclusion lives here as a constant. |
| file | `src/Providers/SearchConsole.php` | 11 KB | NO | Search Console queries. |
| **FOLDER** | `templates/layout/` |  | NO | The page shell. |
| file | `templates/layout/app.php` | 10 KB | NO | The shell: sidebar, top bar, toasts, the theme script that runs before first paint. |
| **FOLDER** | `templates/pages/` |  | NO | One file per screen. |
| file | `templates/pages/analytics.php` | 15 KB | NO | The Analytics screen: per-article performance with a verdict, and the link profile comparison. |
| file | `templates/pages/analyze.php` | 12 KB | NO | Pick the markets, see the cost, run the analysis. |
| file | `templates/pages/article.php` | 35 KB | NO | Review, edit, illustrate and publish one article. Every numeric claim is listed for checking. |
| file | `templates/pages/articles.php` | 8 KB | NO | **NEW.** Every article, filterable. The calendar shows six weeks; this shows everything. |
| file | `templates/pages/calendar.php` | 10 KB | NO | Two slots a week per site, six weeks at a time. |
| file | `templates/pages/competitors.php` | 10 KB | NO | Who you are actually competing with, and the one judgement you have to make yourself. |
| file | `templates/pages/dashboard.php` | 20 KB | NO | The portfolio view. |
| file | `templates/pages/error.php` | 1 KB | NO | Errors, said in English. |
| file | `templates/pages/integrations.php` | 6 KB | NO | Google and Bing connections. |
| file | `templates/pages/login.php` | 8 KB | NO | Sign in, first-administrator setup, and forced password change. |
| file | `templates/pages/opportunities.php` | 9 KB | NO | The ranked article ideas, each with the sentence that explains it. |
| file | `templates/pages/publishing.php` | 10 KB | NO | Where each site publishes, and the receiver code for a custom site. |
| file | `templates/pages/settings.php` | 34 KB | NO | Article settings — eight tabs, each its own form so one save cannot clobber another. |
| file | `templates/pages/setup.php` | 8 KB | NO | Shown when migrations are outstanding. |
| file | `templates/pages/site.php` | 28 KB | NO | One site: score, findings, evidence. |
| file | `templates/pages/users.php` | 11 KB | NO | Accounts and roles. |
| **FOLDER** | `templates/partials/` |  | NO | Shared fragments. |
| file | `templates/partials/sidebar.php` | 9 KB | NO | Navigation, the site list worst-first, and the review badge. |
| **FOLDER** | `var/cache/` |  | NO | Ships empty. Created by the package; its contents are written at runtime and are never part of a release. |
| file | `var/cache/.gitkeep` | 1 KB | NO | Placeholder so var/cache/ survives extraction. |
| **FOLDER** | `var/html/` |  | NO | Ships empty. Created by the package; its contents are written at runtime and are never part of a release. |
| file | `var/html/.gitkeep` | 1 KB | NO | Placeholder so var/html/ survives extraction. |
| **FOLDER** | `var/logs/` |  | NO | Ships empty. Created by the package; its contents are written at runtime and are never part of a release. |
| file | `var/logs/.gitkeep` | 1 KB | NO | Placeholder so var/logs/ survives extraction. |
| **FOLDER** | `var/media/` |  | NO | Ships empty. Created by the package; its contents are written at runtime and are never part of a release. |
| file | `var/media/.gitkeep` | 1 KB | NO | Placeholder so var/media/ survives extraction. |
| **FOLDER** | `public/assets/css/` |  | NO | Two files: tokens, then components. |
| file | `public/assets/css/app.css` | 76 KB | YES | The component layer. Uses only the tokens; contains no raw colour values. |
| file | `public/assets/css/tokens.css` | 12 KB | YES | The ONLY file with raw colours. Validated contrast and colour-blindness deltas are recorded in it. |
| **FOLDER** | `public/assets/js/` |  | NO | One file. |
| file | `public/assets/js/app.js` | 48 KB | YES | All front-end behaviour. No framework, no build step, no dependencies. Every page works with it blocked. |
| **FOLDER** | `src/Content/Cms/` |  | NO | One file per publishing platform. |
| file | `src/Content/Cms/Bundle.php` | 8 KB | NO | The fallback: a zip with the HTML, the JSON-LD, the Markdown and the image, for a platform with no API. |
| file | `src/Content/Cms/CmsDriver.php` | 3 KB | NO | What a publishing target has to be able to do. Two-step by necessity — every platform wants the media uploaded before the post. |
| file | `src/Content/Cms/PostOutcome.php` | 4 KB | NO | Decides whether a failed post-creation might still have created the post. The one question that matters after a publish goes wrong. |
| file | `src/Content/Cms/Shopify.php` | 14 KB | NO | Admin GraphQL: articleCreate, plus stagedUploadsCreate/fileCreate for the image. |
| file | `src/Content/Cms/Squarespace.php` | 3 KB | NO | Explains, at length, why Squarespace cannot be published to by anything. It has no blog API and no permission to grant. |
| file | `src/Content/Cms/Webhook.php` | 10 KB | NO | Your own PHP or static site. A JSON POST close to the Micropub shape, with a bearer token and an HMAC signature. The receiver code is printed in the UI. |
| file | `src/Content/Cms/Wix.php` | 10 KB | NO | Wix Draft Posts, including the HTML-to-Ricos conversion. Drafts only: Wix has no publish path in its API. |
| file | `src/Content/Cms/WordPress.php` | 16 KB | NO | REST + Application Passwords. Uploads the image and verifies it actually attached. |
