Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: false
max-parallel: 2
matrix:
java: ['21', '22', '23', '24', '25', '26', '27']
java: ['21', '22', '23', '24', '25', '26']
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v6
Expand All @@ -36,6 +36,12 @@ jobs:
if: matrix.java == '21'
run: node --test src/test/js/*.test.cjs

- name: Build static browser demo
- name: Build approved homepage and static browser demo
if: matrix.java == '21'
run: node scripts/build-web-demo.mjs
run: |
node scripts/build-website.mjs
test -f website-dist/index.html
test -f website-dist/styles.css
test -f website-dist/demo/index.html
test -f website-dist/demo/retro.css
node scripts/verify-website-build.mjs
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ Thumbs.db

# Generated browser demo (built from tracked sources)
/demo-dist/
/website-dist/
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ All notable Doc2FAQ changes are recorded here. Version numbers follow semantic v

### Added
- Browser PDF/Word (.docx) import and paginated export with local processing, PDF page/file/text limits, bounded DOCX XML decompression, optional references, and clear unsupported-file/font errors.
- Browser PDF exports now embed bundled DejaVu Sans regular/bold font subsets instead of standard Helvetica, fixing Turkish and extended-Unicode text copied from web pages; unchanged Word exports continue to preserve the source characters.
- Browser-only website demo built from the shared frontend, with simplified text drafting, explicit PDF/Word limitations, homepage navigation, and text exports.
- Approved Doc2FAQ landing page and matching browser/Java workbench theme, with original document mascot, responsive illustrated cards, accessible focus styles, reduced-motion support, and a reproducible `website-dist/` build. The homepage includes a "What's new" release-notes preview, clearly labeled as unreleased.
- Source & Review user guide and current documentation for development builds, schema compatibility, and v0.5.0 release preparation.
- Read-only source viewer highlighting the selected FAQ's exact original passages, with a stacked layout on narrow screens.
- Per-FAQ Needs review / Approved status, persisted in saved projects and optional browser autosave.
Expand All @@ -16,6 +18,10 @@ All notable Doc2FAQ changes are recorded here. Version numbers follow semantic v
- Editing questions or answers and merging FAQs reset approval; incomplete FAQs cannot be approved.
- Project schema 2 stores review status and upgrades schema-1 projects with Needs review defaults. Older application versions reject schema-2 files instead of silently discarding approval state.
- Filters affect only the review list; saving, export preview, and all export formats retain every FAQ in draft order.
- Export formats now open with PDF first and Word (.docx) second; the default download name uses `.pdf`.
- **Clear saved data** is now a prominent, high-contrast action with a confirmation prompt. Cancel leaves the browser's saved draft intact; confirming removes only browser storage and keeps the current workspace open.
- GitHub Actions now uses Node 24-based checkout/setup-java actions and pins Ubuntu 24.04 to avoid runner-label migration notices.
- The v0.5.0 release gate validates **Java 21–26** with Java 21-compatible bytecode. Java 27 formal support is deferred, not declared incompatible: a transient JDK-download HTTP 504 caused an initial CI failure, and a later rerun **passed Java 27 build/tests and packaged-JAR smoke checks**.
- Release-candidate source version is 0.5.0; v0.4.0 remains the published release until the new artifacts are validated and released.

## 0.4.0 — 2026-10-29
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ Created by **Okan Tiktas** · [OKAN-SOFTWARE](https://github.com/OKAN-SOFTWARE).

## Current source: v0.5.0 release candidate — Source & Review

The **approved Doc2FAQ design** introduces a playful, illustrated homepage and a matching responsive FAQ workbench. Visit the [product homepage](https://okantiktas.com/projects/doc2faq/) for the overview or open the [interactive browser demo](https://okantiktas.com/projects/doc2faq/demo/) to try local document import, review, and export. The new design and demo are staged for deployment; the URLs may still show the earlier version until the website changes are reviewed and published. See [the v0.5.0 release notes](CHANGELOG.md#050--unreleased-release-candidate) for the complete changes and [the design system](docs/DESIGN-SYSTEM.md) for colors, components, and accessibility choices.

- **Source beside answer:** select **View source beside answer** on an FAQ to highlight all of its original passages in a read-only document viewer beside the review editor on desktop (stacked on smaller screens). References still use extracted-text lines, not PDF page numbers. Manual FAQs have no automatic reference.
- **Review status:** FAQs start as **Needs review**. Mark a complete answer **Approved** after checking it. Editing its question or answer, or merging FAQs, returns it to **Needs review**. Moving an item preserves approval; Undo restores the status from before a removal or merge.
- **Search and review filters:** combine a case-insensitive question/answer search with **All statuses**, **Needs review**, or **Approved**. The summary shows visible, approved, and pending counts. **Clear filters** restores the full list. Filters never change what is saved, previewed, or exported: all FAQs remain included, and incomplete entries still block export.
Expand All @@ -20,7 +22,7 @@ The release-candidate branch uses `0.5.0` in `pom.xml` (`target/doc2faq-0.5.0.ja
## New in v0.4.0

- **Save work / Open saved work:** a versioned JSON file preserves source text, title, mode, draft order, edits, original excerpts, and duplicate-review choices. Incomplete FAQs can be saved too. Project files are limited to 4 MB and validated before replacing the workspace.
- **Optional browser autosave:** off by default. Enabling it stores the complete source and draft on this browser's origin and restores them on reload. Disabling autosave or using **Clear saved data** removes Doc2FAQ's saved data without clearing your open workspace. Storage failures leave the draft open; use **Save work** as a backup.
- **Optional browser autosave:** off by default. Enabling it stores the complete source and draft on this browser's origin and restores them on reload. The highlighted **Clear saved data** button asks for confirmation before removing the browser copy; canceling preserves it, and confirming leaves your current workspace open. Disabling autosave also removes the stored copy. Storage failures leave the draft open; use **Save work** as a backup.
- **Source references:** expand **Show source** to see the original section, extracted-text line range, and exact passage. Edited questions and answers are marked for rechecking. References use text lines, not PDF page numbers; manually added FAQs have no automatic reference.
- **Duplicate review:** distinct passages are retained even if their questions cover the same topic. Similar questions are flagged using a word-overlap heuristic. Choose **Keep both** or **Merge into this FAQ**. Merging keeps both answers and all source references; **Undo removal / merge** restores the previous items until another FAQ edit, addition, reorder, or review choice. Exact duplicate question/answer pairs are still filtered. The maximum remains 30 FAQs.
- **PDF and Word export:** edited content, a centered document title, readable page layout, metadata, and page numbers. Optionally include section/line references and edited-answer notices. PDF embeds Lato Regular and Bold (see `src/main/resources/fonts/LICENSE-Lato.txt`); if text contains a glyph that font cannot represent, export returns an error and suggests DOCX.
Expand Down Expand Up @@ -52,15 +54,15 @@ The document placeholder now uses neutral Q&A prompts, and Generate Mode's sampl

## Try it in your browser

[Open the interactive browser demo](https://okantiktas.com/projects/doc2faq/) · [Source & Review user guide](docs/USER-GUIDE.md) · [Demo capabilities and deployment](docs/WEB-DEMO.md)
[Doc2FAQ homepage](https://okantiktas.com/projects/doc2faq/) · [Try the interactive browser demo](https://okantiktas.com/projects/doc2faq/demo/) · [Source & Review user guide](docs/USER-GUIDE.md) · [Demo capabilities and deployment](docs/WEB-DEMO.md) · [Approved design system](docs/DESIGN-SYSTEM.md)

The demo processes pasted text and TXT/Markdown in your browser, using simplified rules. Try both drafting modes, source highlighting, editing, approval status, duplicate review, search/filters, saved projects, and Markdown/JSON/HTML exports. PDF/Word (.docx) import and export also run locally in the browser; PDF uploads are limited to 5 MB and 50 pages, and DOCX to 5 MB. Scanned PDFs need external OCR. The demo does not run a Java backend and its drafting rules remain simplified. Document libraries load from a version-pinned CDN when needed; document content is not uploaded. Browser PDF export uses standard Latin fonts and suggests Word when a character cannot be represented. The development demo may include features newer than the latest release download.
The demo processes pasted text and TXT/Markdown in your browser, using simplified rules. Try both drafting modes, source highlighting, editing, approval status, duplicate review, search/filters, saved projects, and Markdown/JSON/HTML exports. PDF/Word (.docx) import and export also run locally in the browser; PDF uploads are limited to 5 MB and 50 pages, and DOCX to 5 MB. Scanned PDFs need external OCR. The demo does not run a Java backend and its drafting rules remain simplified. Document libraries load from a version-pinned CDN when needed; document content is not uploaded. Browser PDF export now embeds bundled DejaVu Sans fonts for Turkish and a wider range of Unicode characters; Word remains the fallback for unsupported scripts. The development demo may include features newer than the latest release download.

For detailed changes, see [CHANGELOG.md](CHANGELOG.md). For the release checklist, see [docs/RELEASING.md](docs/RELEASING.md).

## Requirements

- To run a release download: **Java 21 or newer**. The JAR targets Java 21 bytecode; GitHub Actions checks the released JDK versions 21–27 before v0.5.0 publication. Newer future Java versions are not automatically guaranteed compatible. The JAR works on Windows, macOS, and Linux; the Windows ZIP includes `Start-Doc2FAQ.cmd` and a quick-start guide. Extract the ZIP into a new folder, stop any older Doc2FAQ process, run the launcher, and open **http://localhost:8080**. Maven and Node.js are only needed to build and test from source.
- To run a release download: **Java 21 or newer**. The JAR targets Java 21 bytecode; v0.5.0's **required automated compatibility matrix is Java 21–26**. Java 27 **passed an exploratory CI build and packaged-JAR smoke test** on November 8, 2026, but is not a committed v0.5.0 support target; formal support can follow in a later release. Newer Java versions are not automatically guaranteed compatible. The JAR works on Windows, macOS, and Linux; the Windows ZIP includes `Start-Doc2FAQ.cmd` and a quick-start guide. Extract the ZIP into a new folder, stop any older Doc2FAQ process, run the launcher, and open **http://localhost:8080**. Maven and Node.js are only needed to build and test from source.

To build from source:

Expand Down
57 changes: 57 additions & 0 deletions docs/DESIGN-SYSTEM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Doc2FAQ design system — approved November 2026

Doc2FAQ uses the light, playful **paper-and-answers** visual identity for its
product homepage, hosted browser demo, and local Java workspace. This direction
was approved by project owner Okan Tiktas for future versions of Doc2FAQ.

## Principles

1. A friendly original document mascot (not another project's copyrighted logo).
2. Warm cream and cool off-white backgrounds, ink-dark outlines, offset shadows.
3. Coral for primary actions, yellow for highlights, mint for positive states.
4. Oversized, confident headings; concise, accessible helper text.
5. Direct workflow: import → generate/extract → review → export.
6. Real functionality first: responsive controls, visible keyboard focus,
sufficient text contrast, and reduced-motion support.
7. A visible **What's new** area may preview unreleased changes, but must
distinguish the release candidate from the latest published download.
8. Preserve the native right-click menu, text selection, keyboard shortcuts,
and browser developer tools. Hiding them does not protect application code
or document data; security checks belong on the server, where applicable.

## Palette

| Token | Hex | Usage |
| --- | --- | --- |
| Ink | `#202b34` | Text, outlines and offset shadows |
| Cool paper | `#f0f3f1` | Page background |
| Warm paper | `#fffefa` | Panels and inputs |
| Coral | `#f7a088` | Main actions and emphasis |
| Yellow | `#f8d77b` | Badges and hero art |
| Mint | `#a8d6c8` | Review and success accents |

The homepage source is `website/`; the Java app's theme override is
`src/main/resources/static/retro.css`. The generated browser demo reuses the
same stylesheet. Keep the HTML fields/IDs and JavaScript adapters aligned so
styling changes cannot break document import, FAQ review or PDF/DOCX export.

Do not copy Shepherd.js logos, illustration assets, text, or code; Doc2FAQ's
visuals and mascot are original work inspired only by the broad illustrated,
outlined presentation style.

## Local build

```sh
node scripts/build-website.mjs
node scripts/verify-website-build.mjs
```

This produces ignored `website-dist/` with:

- `index.html` — marketing/product homepage
- `styles.css` — homepage design tokens and components
- `demo/` — fully interactive browser demo generated from shared app sources

Upload **the contents** of `website-dist/` to `/projects/doc2faq/` on the
portfolio host. Leave the rest of the portfolio intact. The root homepage and
demo use relative URLs to work under the `/projects/doc2faq/` subdirectory.
7 changes: 4 additions & 3 deletions docs/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

## Validate the release candidate

Use JDK 21+, Maven 3.6.3+, and Node.js. CI compiles the application for Java 21 and runs Java tests plus a packaged-JAR smoke check on JDKs 21 through 27. All matrix jobs must succeed before publication:
Use JDK 21+, Maven 3.6.3+, and Node.js. CI compiles the application for Java 21 and runs Java tests plus a packaged-JAR smoke check on **JDKs 21 through 26**. All six required matrix jobs must succeed before publication. Java 27 is outside this **required** release matrix, but an exploratory [Java 27 CI rerun on November 8, 2026](https://github.com/OKAN-SOFTWARE/Doc2FAQ/actions/runs/42477058195) **passed the Maven build, tests, and packaged-JAR smoke check**. The earlier attempt failed only while downloading the JDK (HTTP 504). Consider formal Java 27 support separately in a later release:

```cmd
mvn -B -ntp clean verify
node --test src/test/js/*.test.cjs
node scripts/build-web-demo.mjs
node scripts/build-website.mjs
java -jar target/doc2faq-0.5.0.jar
```

Expand All @@ -34,6 +34,7 @@ GitHub Actions runs this smoke check on every push/PR. On Windows without Bash,
9. Import `TEst Data.pdf`, check the suggested `testdata-Doc2FAQ.pdf`, rename it, and verify the download. Check centered titles, PDF Lato fonts, page numbers, long answers/tokens, Unicode, and page breaks. Unsupported PDF glyphs must suggest Word. HTML must escape document markup.
10. Change source/mode, clear the document, or open another project during pending imports/drafting/exports. Old results must not replace or download current work. Check keyboard focus, mobile widths, and reduced motion.
11. Follow [WEB-DEMO.md](WEB-DEMO.md) for the separate static browser demo; verify its feature disclosure and website links. The demo cannot substitute for packaged-JAR testing.
12. Review the [approved homepage design](DESIGN-SYSTEM.md), including responsive layouts, readable focus states, reduced-motion behavior, and the **What's new / v0.5.0 preview** release-notes area. Confirm that an unreleased candidate is not presented as a published download. Keep browser context menus and developer tools available; browser UI restrictions are not an application security control.

## Prepare v0.5.0

Expand All @@ -48,7 +49,7 @@ GitHub Actions runs this smoke check on every push/PR. On Windows without Bash,
git rev-parse HEAD
mvn -B -ntp clean verify
node --test src/test/js/*.test.cjs
node scripts/build-web-demo.mjs
node scripts/build-website.mjs
java -jar target/doc2faq-0.5.0.jar
```

Expand Down
2 changes: 1 addition & 1 deletion docs/USER-GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Similar-question warnings use word overlap. Keep both retains distinct passages;

The source build reads schemas 1 and 2, and saves schema 2. Older v0.4 apps reject schema-2 files. Keep an original project copy if you also use an older release. The limit remains 4 MB.

Optional browser autosave is off by default. Enabling it stores source and drafts on that browser origin. Clear saved data removes the stored copy while leaving the open workspace intact. Clear document removes source, drafts, pending results, and the saved copy. Download a project when browser storage is unavailable.
Optional browser autosave is off by default. Enabling it stores source and drafts on that browser origin. The prominently highlighted **Clear saved data** button asks for confirmation; cancel keeps the browser copy, while confirmation removes it and leaves the open workspace intact. Clear document removes source, drafts, pending results, and the saved copy. Download a project when browser storage is unavailable.

## Export

Expand Down
Loading