Skip to content

PatrickFrankAIU/APA-Coach

Repository files navigation

APA Coach

APA Coach

A client-side tool for checking APA 7 formatting in Word documents. Upload a .docx file and get an instant report. Runs entirely within the browser — your paper never leaves your device. Report can be printed to a PDF.

Note: APA Coach is in active development. Always review your paper manually before submitting.

Version 1.4.0 — Last updated June 27, 2026

Contact pfrank@aiuniv.edu with questions, comments, or bug reports.

Licensed under the GNU General Public License v3.0. You are free to use, modify, and distribute this software, but any distributed version — including modified versions — must also be released under the GPL v3.0 with source code available. It may not be used as the basis for proprietary closed-source software.


What it does

APA Coach reads the formatting metadata inside a .docx file and checks it against APA 7th edition requirements. It produces a report organized into three categories:

  • Failed — formatting errors that should be corrected before submission
  • Review — items that may be correct but couldn't be fully verified from the file alone (e.g., a DOI that resolves to a different source, or a page break that couldn't be confirmed)
  • Passed — items that meet APA expectations

Each result card explains what was found, what APA expects, and (for failures) step-by-step instructions for fixing the issue in Microsoft Word.

The report can be printed or saved as a PDF directly from the browser using the Print / Save as PDF button in the Report Summary card.


Checks

Check What it verifies
Page numbering Plain page number in the upper-right header on every page, starting at 1 on the title page; no "Page" or "Pg" label
Title page Detects a standard APA title page at the start of the document
Heading numbering Flags section numbers (1, 3.1, 3.1.1, …) on headings — APA headings are not numbered
Heading capitalization Headings use Title Case, not sentence case
Heading bold Level 1–3 headings are bold
Heading level alignment Level 1 headings are centered; lower levels are flush left
References page Detects a References page near the end of the document
References start on new page References section begins on a new page (hard page break before the heading)
References numbered Flags automatic list numbering or bullets on reference entries — APA uses plain hanging indents
In-text citations At least one (Author, Year) citation found in the body
Personal communication Flags personal communication citations and confirms they are not listed in References
Secondary citations Flags "as cited in" usage; APA discourages secondary citations
Citation ampersand Inside parenthetical citations, "&" must be used between authors; "and" is used in narrative citations
Citation et al. format "et al." must be spelled with a period after "al" and no period after "et"
Citation comma Commas are present between author and year: (Author, Year); no trailing commas after year
Citation no-date format "n.d." must be lowercase with periods after each letter when a source has no date
Citation page format Uses "p." for a single page and "pp." for a page range — not "pg." or "pgs."
Citation multiple sources Multiple sources in one parenthetical are separated by semicolons: (Smith, 2020; Jones, 2021)
Citation year suffix When two works by the same author share a year, both citation and reference entry carry the same letter suffix (2020a, 2020b)
References heading alignment "References" heading is centered
Reference hanging indent Hanging indents on reference entries; flags broken or bare-URL entries
Uncited references Every reference entry has a matching in-text citation
Unmatched citations Every in-text citation has a matching reference entry
Reference DOI/URL Each reference includes a visible DOI or URL
Reference DOI format DOIs use the full https://doi.org/ URL format; flags bare DOIs (10.xxxx/...) and old doi: prefix
Reference forbidden phrases References do not use non-APA phrases such as "Available at" or "accessed [date]"
Reference short link Reference URLs link to a specific page, not just a domain homepage
Unapproved source References do not use sources on AIU's list of 145+ unapproved domains
Reference authors Author names use Last, F. M. format with correct initials, spacing, and separators
Reference year format Publication year is in parentheses immediately after the author(s), followed by a period
Reference title capitalization Article and chapter titles use sentence case; flags titles where multiple mid-sentence words are capitalized
Reference italics Book and report titles are italicized; journal article titles are not; journal name and volume number are italicized
Reference punctuation Flags incorrect page-range prefixes ("pp." not used in journal references), missing volume/issue spacing, and hyphen vs. en dash in page ranges
Reference link verification DOIs are verified against CrossRef — flags mismatches where the DOI resolves to a different source than the reference claims; URLs cannot be verified from the browser (status codes are inaccessible via cross-origin fetch) and are noted for manual review
Unconverted markup symbols Flags markdown asterisks (*word*, **word**) left in the document from AI-generated or pasted content that should be converted to Word formatting
Margins 1-inch margins on all four sides
Body line spacing Double spacing throughout body paragraphs
Heading line spacing Double spacing on heading paragraphs
References line spacing Double spacing on reference entries
Body paragraph spacing 0 pt before and after body paragraphs
Heading paragraph spacing 0 pt before and after headings
Body first-line indents 0.5-inch first-line indent on body paragraphs
Body alignment Left alignment on body text
Font 12pt Times New Roman throughout; flags mixed sizes or families

How it works

APA Coach runs entirely in the browser using three layers:

  1. Extraction (src/docx/extractDocxFormatting.js) — A .docx file is a ZIP archive containing XML. JSZip unpacks it and fast-xml-parser reads word/document.xml, word/styles.xml, and the header XML files referenced in word/_rels/document.xml.rels. The extractor walks every paragraph and resolves its formatting (margins, spacing, indents, alignment) by merging direct formatting, applied styles, and Word defaults into a single resolved value with a known source.

  2. Checking (src/checks/checkApaFormatting.js) — Each APA rule is implemented as a separate deterministic function. Checks produce a structured result object with a status (fail, review, or pass), human-readable found/expected text, diagnostic details, and how-to-fix steps. No AI or heuristic guessing — only values that can be read from the file are evaluated; anything else is flagged as unverifiable rather than assumed.

  3. Reference link verification (src/checks/verifyReferenceLinks.js) — After formatting checks complete, each reference's DOI or URL is verified asynchronously. DOIs are checked against the CrossRef API; if the returned title, author, or year disagrees with the reference, an orange warning card is shown. URLs cannot be verified for status codes from the browser (cross-origin fetches return opaque responses with no status), so they are noted for manual review. Up to 5 references are verified concurrently, bounded by a 13-second global timeout. Results are cached for the session so re-uploading the same paper doesn't repeat network requests.

  4. UI (src/browser/main.jsx) — A React interface renders the structured report. Results are grouped by status, with color-coded badges and expandable fix instructions. A print stylesheet produces a clean paginated PDF when the student uses the Print / Save as PDF button.


Privacy

Files are processed locally in your browser using the File API. Nothing is uploaded, stored, or transmitted. Closing the tab clears everything.


Running locally

Students: You don't need to install anything. Just open APA Coach in your browser and upload your paper. This section is for developers who want to run or modify the source code.

npm install
npm run dev

Then open http://localhost:5173/APA-Coach/ and upload a .docx file.

To build for production:

npm run build

Tech stack


Project rules

See AGENTS.md. The short version: no LLMs in application logic, all checks are deterministic, each APA rule is a separate function, output is structured JSON before rendering.


License

Copyright (C) 2026 Patrick Frank

APA Coach is licensed under the GNU General Public License v3.0 (GPL-3.0).

See the LICENSE file for details.


Changelog

v1.4.0 — June 27, 2026 Added 9 new checks based on library reviewer testing: heading numbering, heading capitalization, heading bold, heading level alignment, references start on new page, references numbered, citation comma, reference DOI format, and reference forbidden phrases. Fixed false positives in citation matching, reference italics, and title-case detection. Renamed "Inline citations" to "In-text citations". Full details in edgecases.md and CHANGELOG.md.

v1.3.0–1.3.2 — May 23, 2026 Report Summary navigation index with per-category counts and clickable links. Color-coded summary cards. Category headings with Back to top links. Fixed paragraph spacing false positive when only one spacing side is explicitly set.

v1.2.0 — May 23, 2026 Reference author checks expanded: detects missing space between initials, first-name-first order, lowercase name particles, all-caps last names, and full first names instead of initials. Per-reference callouts in author, year, and title capitalization cards. Fixed run boundary spaces and book-chapter classification.

v1.1.0 — May 22, 2026 Added reference author format checks, reference title capitalization, unconverted markup symbols detection, and broken reference merging. Renamed "References formatting" to "Reference hanging indent."

v1.0.0 — May 21, 2026 First stable release. Added CITATION.cff. Removed Beta label.

v0.9.x — May 11–20, 2026 PWA support and offline mode, print/save as PDF, reference link verification via CrossRef API, GoatCounter analytics, and session restore.

v0.8.x — May 10–11, 2026 Reference link verification (DOI via CrossRef, URL liveness). Fixed URL verification false positive for CORP-blocked sites.

v0.1.0–0.7.x — May 1–9, 2026 Initial release through PWA launch. Core APA checks, visual examples on fail cards, page numbering check, unapproved source check, compact header, and session restore.