diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d7243e0..98136d2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -2,6 +2,8 @@ name: Verify Doc2FAQ
on:
push:
+ branches:
+ - main
pull_request:
permissions:
@@ -9,20 +11,55 @@ permissions:
jobs:
build-and-test:
- runs-on: ubuntu-latest
- timeout-minutes: 10
+ runs-on: ubuntu-24.04
+ timeout-minutes: 20
+ name: Java ${{ matrix.java }} compatibility
+ strategy:
+ fail-fast: false
+ max-parallel: 2
+ matrix:
+ java: ['21', '22', '23', '24', '25', '26']
steps:
- - uses: actions/checkout@v4
- - uses: actions/setup-java@v4
+ - uses: actions/checkout@v7
+ - uses: actions/setup-java@v6
with:
distribution: temurin
- java-version: '21'
+ java-version: ${{ matrix.java }}
cache: maven
- name: Build and test
- run: mvn -B -ntp verify
+ run: mvn -B -ntp clean verify
+
+ - name: Smoke test packaged Java app
+ run: bash scripts/smoke-packaged-jar.sh target/doc2faq-0.5.0.jar
- name: Test browser export safety
+ if: matrix.java == '21'
run: node --test src/test/js/*.test.cjs
- - name: Build static browser demo
- run: node scripts/build-web-demo.mjs
+ - name: Build Doc2FAQ homepage and static browser demo
+ if: matrix.java == '21'
+ 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
+
+ # The main-branch ruleset requires a check named "build-and-test".
+ # Keep that stable status only after every Java matrix job succeeds.
+ required-status:
+ name: build-and-test
+ runs-on: ubuntu-24.04
+ needs: [build-and-test]
+ if: ${{ always() }}
+ steps:
+ - name: Require all Java compatibility jobs to pass
+ env:
+ MATRIX_RESULT: ${{ needs['build-and-test'].result }}
+ run: |
+ if [ "$MATRIX_RESULT" != "success" ]; then
+ echo "Java 21–26 compatibility checks did not all pass: $MATRIX_RESULT"
+ exit 1
+ fi
+ echo "All Java 21–26 compatibility checks passed."
diff --git a/.github/workflows/publish-v0.5.0.yml b/.github/workflows/publish-v0.5.0.yml
new file mode 100644
index 0000000..390b069
--- /dev/null
+++ b/.github/workflows/publish-v0.5.0.yml
@@ -0,0 +1,121 @@
+name: Publish Doc2FAQ v0.5.0
+
+# First run automatically when this workflow lands on main. Manual reruns
+# remain available, but the existing-release check prevents duplicate tags.
+on:
+ push:
+ branches: [main]
+ paths:
+ - .github/workflows/publish-v0.5.0.yml
+ workflow_dispatch:
+
+permissions:
+ contents: read
+
+concurrency:
+ group: doc2faq-v0.5.0-release
+ cancel-in-progress: false
+
+jobs:
+ compatibility:
+ name: Release Java ${{ matrix.java }} compatibility
+ runs-on: ubuntu-24.04
+ timeout-minutes: 20
+ strategy:
+ fail-fast: false
+ max-parallel: 2
+ matrix:
+ java: ['21', '22', '23', '24', '25', '26']
+ steps:
+ - uses: actions/checkout@v7
+ - uses: actions/setup-java@v6
+ with:
+ distribution: temurin
+ java-version: ${{ matrix.java }}
+ cache: maven
+ - name: Build, test, and smoke-test the packaged application
+ run: |
+ mvn -B -ntp clean verify
+ bash scripts/smoke-packaged-jar.sh target/doc2faq-0.5.0.jar
+
+ publish:
+ if: github.repository == 'OKAN-SOFTWARE/Doc2FAQ' && github.ref == 'refs/heads/main'
+ # GitHub waits for every Java matrix entry; any failure skips publication.
+ needs: [compatibility]
+ runs-on: ubuntu-24.04
+ timeout-minutes: 25
+ permissions:
+ contents: write
+ steps:
+ - uses: actions/checkout@v7
+ with:
+ fetch-depth: 0
+
+ - uses: actions/setup-java@v6
+ with:
+ distribution: temurin
+ java-version: '21'
+ cache: maven
+
+ - uses: actions/setup-node@v4
+ with:
+ node-version: '22'
+
+ - name: Refuse to replace an existing v0.5.0 release or tag
+ env:
+ GH_TOKEN: ${{ github.token }}
+ run: |
+ if gh release view v0.5.0 >/dev/null 2>&1; then
+ echo "v0.5.0 is already published. Refusing to overwrite it."
+ exit 1
+ fi
+ if [ -n "$(git tag -l v0.5.0)" ]; then
+ echo "The v0.5.0 tag already exists. Review it before publishing."
+ exit 1
+ fi
+
+ - name: Build and verify the release JAR
+ run: |
+ mvn -B -ntp clean verify
+ bash scripts/smoke-packaged-jar.sh target/doc2faq-0.5.0.jar
+
+ - name: Verify browser demo and Doc2FAQ homepage
+ run: |
+ node --test src/test/js/*.test.cjs
+ node scripts/build-website.mjs
+ node scripts/verify-website-build.mjs
+
+ - name: Package the Windows and standalone downloads
+ shell: bash
+ run: |
+ set -euo pipefail
+ mkdir -p release/staging/Doc2FAQ-0.5.0
+ cp target/doc2faq-0.5.0.jar release/doc2faq-0.5.0.jar
+ cp release/doc2faq-0.5.0.jar release/staging/Doc2FAQ-0.5.0/
+ cp packaging/Start-Doc2FAQ.cmd packaging/WINDOWS-QUICK-START.md release/staging/Doc2FAQ-0.5.0/
+ # Windows cmd.exe expects CRLF-terminated batch files.
+ sed -i 's/$/\r/' release/staging/Doc2FAQ-0.5.0/Start-Doc2FAQ.cmd
+ (
+ cd release/staging
+ zip -q -r ../Doc2FAQ-0.5.0-Windows.zip Doc2FAQ-0.5.0
+ )
+ unzip -t release/Doc2FAQ-0.5.0-Windows.zip
+ unzip -p release/Doc2FAQ-0.5.0-Windows.zip Doc2FAQ-0.5.0/doc2faq-0.5.0.jar | cmp - release/doc2faq-0.5.0.jar
+ (
+ cd release
+ sha256sum doc2faq-0.5.0.jar Doc2FAQ-0.5.0-Windows.zip > SHA256SUMS.txt
+ sha256sum -c SHA256SUMS.txt
+ )
+
+ - name: Publish exactly the tested commit
+ env:
+ GH_TOKEN: ${{ github.token }}
+ run: |
+ gh release create v0.5.0 \
+ --target "$GITHUB_SHA" \
+ --title "Doc2FAQ v0.5.0 — Source & Review" \
+ --notes-file docs/RELEASE-NOTES-0.5.0.md \
+ --latest \
+ release/doc2faq-0.5.0.jar \
+ release/Doc2FAQ-0.5.0-Windows.zip \
+ release/SHA256SUMS.txt
diff --git a/.gitignore b/.gitignore
index 845489f..03558a5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,3 +17,4 @@ Thumbs.db
# Generated browser demo (built from tracked sources)
/demo-dist/
+/website-dist/
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 78189b5..1174e92 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,11 +2,13 @@
All notable Doc2FAQ changes are recorded here. Version numbers follow semantic versioning; entries describe shipped source functionality and do not imply an external AI service.
-## [0.5.0] — Unreleased
+## [0.5.0] — Unreleased (release candidate)
### 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.
+- Redesigned Doc2FAQ homepage and matching browser/Java workbench with an original document mascot, responsive illustrated cards, accessible focus styles, reduced-motion support, and a reproducible `website-dist/` build. The "What's new" section distinguishes development previews from published downloads.
- 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.
@@ -16,7 +18,11 @@ 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.
-- Development version is 0.5.0-SNAPSHOT; v0.4.0 remains the published release.
+- 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
diff --git a/README.md b/README.md
index 57bb703..69fc1eb 100644
--- a/README.md
+++ b/README.md
@@ -8,19 +8,21 @@ Created by **Okan Tiktas** · [OKAN-SOFTWARE](https://github.com/OKAN-SOFTWARE).
> **Latest published download: v0.4.0 — Review, Save & Export.** Download the ready-to-run JAR or Windows ZIP from [GitHub Releases](https://github.com/OKAN-SOFTWARE/Doc2FAQ/releases/tag/v0.4.0).
-## Current source: v0.5.0-SNAPSHOT — Source & Review
+## Current source: v0.5.0 release candidate — Source & Review
+
+I redesigned Doc2FAQ with an illustrated homepage and a responsive FAQ workbench. Visit the [product homepage](https://okantiktas.com/projects/doc2faq/) for an overview, or try the [interactive browser demo](https://okantiktas.com/projects/doc2faq/demo/) to import documents, review FAQs, and export the results directly in your browser. The browser demo and downloadable Java application have different processing engines, so their FAQ suggestions may differ. See the [v0.5.0 changes](CHANGELOG.md#050--unreleased-release-candidate) and [design system](docs/DESIGN-SYSTEM.md) for details.
- **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.
- **Saved work compatibility:** approval status is preserved in project downloads and optional autosave. New saves use project schema 2; v0.4 schema-1 files still open with FAQs marked Needs review. Schema-2 files require v0.5 or later to reopen.
-Development builds use `0.5.0-SNAPSHOT` in `pom.xml` (`target/doc2faq-0.5.0-SNAPSHOT.jar`). The latest published download remains v0.4.0 until a new release is validated and published.
+The release-candidate branch uses `0.5.0` in `pom.xml` (`target/doc2faq-0.5.0.jar`). The latest published download remains v0.4.0 until the release candidate passes validation and v0.5.0 is published. This branch is not itself a published release.
## 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.
@@ -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) · [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**. 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:
@@ -182,7 +184,7 @@ After updating your checkout to the latest `main`, run these commands from the d
```cmd
mvn -B -ntp clean verify
node --test src/test/js/*.test.cjs
-java -jar target/doc2faq-0.5.0-SNAPSHOT.jar
+java -jar target/doc2faq-0.5.0.jar
```
The JavaScript checks require Node.js. Keep the terminal open while the app runs, and use **Ctrl+C** to stop it. Open **http://localhost:8080** and refresh the browser to load the updated frontend.
@@ -190,7 +192,7 @@ The JavaScript checks require Node.js. Keep the terminal open while the app runs
If port 8080 is occupied, stop the previous Doc2FAQ process or use an alternate port:
```cmd
-java -jar target/doc2faq-0.5.0-SNAPSHOT.jar --server.port=8081
+java -jar target/doc2faq-0.5.0.jar --server.port=8081
```
Then open **http://localhost:8081**. Merging source changes does not update an existing JAR or a running Java process; rebuild and restart to use the fixes. Published JARs must be built from the corresponding release commit.
diff --git a/docs/DESIGN-SYSTEM.md b/docs/DESIGN-SYSTEM.md
new file mode 100644
index 0000000..1f1ffa8
--- /dev/null
+++ b/docs/DESIGN-SYSTEM.md
@@ -0,0 +1,59 @@
+# Doc2FAQ design system
+
+I use a light, approachable **paper-and-answers** visual style throughout
+Doc2FAQ: the product homepage, browser demo, and local Java workspace. The
+design keeps document processing straightforward without making the interface
+feel like another generic developer tool.
+
+## Principles
+
+1. An original document mascot that gives Doc2FAQ its own identity.
+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 **What's new** section that makes it clear which version is available
+ to download and which features are still in development.
+8. Keep right-click, text selection, keyboard shortcuts, and developer tools
+ available. Blocking browser controls is not a security measure; sensitive
+ work requires proper safeguards where it is processed and stored.
+
+## 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 |
+
+I maintain the homepage in `website/` and the Java app's theme in
+`src/main/resources/static/retro.css`. The generated browser demo uses that
+same stylesheet. HTML element IDs and JavaScript adapters must stay aligned so
+that visual changes do not interrupt document import, FAQ review, or PDF/DOCX
+export.
+
+I created Doc2FAQ's mascot and visual identity for this project. The layout
+draws on illustrated, editorial-style interfaces without reusing another
+product's branding, artwork, or code.
+
+## Local build
+
+```sh
+node scripts/build-website.mjs
+node scripts/verify-website-build.mjs
+```
+
+The build produces `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
+
+I publish **the contents** of `website-dist/` to `/projects/doc2faq/` on my
+portfolio website, leaving the other projects intact. Relative links allow
+the homepage and demo to work from the same subdirectory.
diff --git a/docs/RELEASE-NOTES-0.5.0.md b/docs/RELEASE-NOTES-0.5.0.md
new file mode 100644
index 0000000..d5aefee
--- /dev/null
+++ b/docs/RELEASE-NOTES-0.5.0.md
@@ -0,0 +1,28 @@
+# Doc2FAQ v0.5.0 — Source & Review
+
+I built this release to make it easier to check every answer against its source, keep track of reviewed FAQs, and export polished results. I also redesigned the interface for desktop and mobile.
+
+### Highlights
+
+- **Review status:** Mark complete FAQs as Approved, filter by review status, search the draft, and keep all entries in exports regardless of the current view.
+- **Source viewer:** Inspect original passages and line references behind each answer. Editing or merging an FAQ returns it to Needs review.
+- **PDF and Word:** Import PDF/DOCX, export paginated PDF or Word documents, and use PDF-first format selection. The browser demo embeds DejaVu Sans for Turkish and extended Latin characters; DOCX remains the fallback for unsupported glyphs.
+- **Save and return:** Save a complete project as JSON or optionally autosave in the browser. Clear saved data has a clearly labeled confirmation and does not close the active workspace.
+- **New look:** A distinctive illustrated homepage, matching Java and browser interfaces, clearer controls and responsive layouts.
+- **Browser-only demo:** Try the simplified workflow online. The downloadable Java app still runs locally and may produce different FAQ suggestions.
+
+### Compatibility
+
+- Built for Java 21 bytecode; required release tests run on **Java 21–26**.
+- Java 27 successfully passed exploratory build/tests and packaged-JAR smoke tests, but is not part of the formal v0.5.0 support target.
+- The ZIP includes a Windows launcher. Windows SmartScreen can warn about unfamiliar unsigned scripts; direct `java -jar` startup is also supported.
+
+### Downloads
+
+- `doc2faq-0.5.0.jar` — standalone Java application.
+- `Doc2FAQ-0.5.0-Windows.zip` — the same JAR plus Windows launcher and quick-start guide.
+- `SHA256SUMS.txt` — hashes for both downloads.
+
+After starting the app, open **http://localhost:8080**. Java must remain running while the local site is in use.
+
+No AI service, OCR, accounts, billing, or hardened public Java backend is included. The browser demo processes document content on the visitor's device; some libraries are downloaded from a CDN. Review all generated FAQs before sharing.
diff --git a/docs/RELEASING.md b/docs/RELEASING.md
index e50eaa5..a4cee62 100644
--- a/docs/RELEASING.md
+++ b/docs/RELEASING.md
@@ -1,20 +1,28 @@
# Doc2FAQ release checklist
-**Current source:** `0.5.0-SNAPSHOT`. **Latest published download:** v0.4.0. The next planned release is **v0.5.0 — Source & Review**. Merging source changes does not publish a release or update an installed JAR. Keep existing tags and assets unchanged.
+**Release-candidate branch:** `0.5.0`. **Latest published download:** v0.4.0. The next planned release is **v0.5.0 — Source & Review**. The release-candidate branch is not a published release. Merging source changes does not publish a release or update an installed JAR. Keep existing tags and assets unchanged.
-## Validate the development build
+## Validate the release candidate
-Use JDK 21, Maven 3.6.3+, and Node.js:
+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
-java -jar target/doc2faq-0.5.0-SNAPSHOT.jar
+node scripts/build-website.mjs
+java -jar target/doc2faq-0.5.0.jar
```
Open `http://localhost:8080` (or use `--server.port=8081` if occupied). Test the packaged JAR, not only a static frontend preview:
+On Linux or Git Bash, the optional automated JAR smoke check runs the packaged server locally, tests health, loads the frontend, and extracts an FAQ before stopping it:
+
+```sh
+bash scripts/smoke-packaged-jar.sh target/doc2faq-0.5.0.jar
+```
+
+GitHub Actions runs this smoke check on every push/PR. On Windows without Bash, use the equivalent manual checks below.
+
1. Import TXT, Markdown, PDF, and DOCX. Extract explicit questions and generate from ordinary sections; inspect exact excerpts and text-line ranges. Scanned PDFs must explain the OCR limitation.
2. Select an FAQ's source viewer and check all highlights, including multiple references after merge. Try a manual FAQ and HTML-like source text. Check desktop side-by-side and mobile stacked layouts. Typing in questions/answers must preserve page and source scroll positions.
3. Approve complete FAQs, then edit each field or merge and confirm Needs review. Blank entries cannot be approved. Move an approved FAQ and confirm approval remains. Remove/Undo restores status and references.
@@ -26,11 +34,12 @@ Open `http://localhost:8080` (or use `--server.port=8081` if occupied). Test the
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 [Doc2FAQ design system](DESIGN-SYSTEM.md), including responsive layouts, readable focus states, reduced-motion behavior, and the **What's new** 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
1. Review and merge development changes after CI and packaged-JAR checks pass.
-2. Change `pom.xml` from `0.5.0-SNAPSHOT` to `0.5.0`; date the changelog section and update README source/run commands and download links. Keep historical v0.4.0 notes accurate. Review this release-preparation change.
+2. Review the release-candidate branch with `pom.xml` already at `0.5.0`. Verify the README and guide match the JAR name. Leave v0.4.0 labeled as the latest published download until v0.5.0 actually ships. Date the changelog and update download links at publication. Keep historical v0.4.0 notes accurate.
3. Update a clean checkout to the merged release commit, then build again:
```cmd
@@ -40,19 +49,20 @@ Open `http://localhost:8080` (or use `--server.port=8081` if occupied). Test the
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
```
+ On Linux or Git Bash, also run `bash scripts/smoke-packaged-jar.sh target/doc2faq-0.5.0.jar` against the clean build. The application must be stopped before the manual JAR launch, unless you specify an alternate port.
+
4. Confirm a clean working tree and record the exact SHA. Repeat the packaged-JAR smoke check. Confirm that v0.5.0 does not already exist as a tag or release.
## Publish tested artifacts
-1. Open [Draft a new release](https://github.com/OKAN-SOFTWARE/Doc2FAQ/releases/new).
-2. Tag the exact tested commit `v0.5.0`; title **Doc2FAQ v0.5.0 — Source & Review**.
-3. Copy the v0.5.0 changelog notes. Attach the tested `target/doc2faq-0.5.0.jar`, never `.jar.original` or a renamed old JAR.
-4. Also attach `Doc2FAQ-0.5.0-Windows.zip` with that exact JAR, `Start-Doc2FAQ.cmd`, and a quick-start README. The launcher must reference `doc2faq-0.5.0.jar`. Include `SHA256SUMS.txt` for both downloads; remove snapshot and older-version instructions from the new bundle.
-5. Review tag, commit, notes, and assets before publishing. Download the published assets separately, verify hashes and that the ZIP's JAR matches the standalone JAR, then run with Java 21. Confirm version, health, saved review status, source viewer, and PDF/Word exports.
-6. Rebuild/synchronize the website demo when its shared frontend changes. Verify the actual live route and update the portfolio link if needed.
+1. Merge the verified release candidate into `main`. The version-specific [release workflow](../.github/workflows/publish-v0.5.0.yml) runs on the first merge that adds it to `main`; it can also be retriggered manually using **Run workflow** after a fix. Do not create the `v0.5.0` tag or release in advance.
+2. That workflow builds, tests, and smoke-tests the exact release commit on **every supported JDK (21–26)** before the publish job can start. If any matrix entry fails, publication is skipped. It then checks for an existing release/tag, builds with Java 21, runs browser tests, and assembles `doc2faq-0.5.0.jar` and `Doc2FAQ-0.5.0-Windows.zip`. The ZIP contains the **same JAR**, `Start-Doc2FAQ.cmd`, and `WINDOWS-QUICK-START.md`. It verifies the archive and writes `SHA256SUMS.txt` for both downloads.
+3. **Only after every check passes**, the workflow creates the `v0.5.0` tag at the exact tested commit and publishes **Doc2FAQ v0.5.0 — Source & Review** with [release notes](RELEASE-NOTES-0.5.0.md) and all three files. If the release job fails, do not call it published; inspect the run, fix the cause, and rerun without replacing any existing tag or release.
+4. Inspect the published commit, notes and assets. Download the assets independently, verify hashes and the ZIP/JAR match, then start the published JAR on Java 21. Confirm the version, health, review status, source viewer, and PDF/Word exports.
+5. Date the changelog and update README and product-site release links to v0.5.0 after publication. Rebuild/synchronize the browser demo when shared frontend code changes. Verify the actual Hostinger custom-domain routes and links before calling the public website current.
Accounts, billing, OCR, external AI, and public-server hardening remain separate work. The Java build is intended for local use; the static browser demo runs its simplified drafting on visitors' devices.
diff --git a/docs/USER-GUIDE.md b/docs/USER-GUIDE.md
index 21a7510..9436c31 100644
--- a/docs/USER-GUIDE.md
+++ b/docs/USER-GUIDE.md
@@ -1,6 +1,6 @@
# Doc2FAQ — Source & Review guide
-This guide describes the `0.5.0-SNAPSHOT` source build. The latest published v0.4.0 download does not include the new source viewer or approval filters. See the [README](../README.md) for installation and [browser-demo comparison](WEB-DEMO.md) for the website's supported features.
+This guide describes the `0.5.0` release-candidate source build, which has not yet been published. The latest published v0.4.0 download does not include the new source viewer or approval filters. See the [README](../README.md) for installation and [browser-demo comparison](WEB-DEMO.md) for the website's supported features.
## Create a draft
@@ -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
diff --git a/docs/WEB-DEMO.md b/docs/WEB-DEMO.md
index 57d8522..f7878fc 100644
--- a/docs/WEB-DEMO.md
+++ b/docs/WEB-DEMO.md
@@ -1,6 +1,6 @@
# Browser demo and website deployment
-The public-facing route is `https://okantiktas.com/projects/doc2faq/`. The portfolio's existing singular convention, `/project/doc2faq/`, redirects to it. The homepage's Doc2FAQ card links to the interactive demo.
+The public-facing homepage route is `https://okantiktas.com/projects/doc2faq/`. Its **interactive demo** lives at `https://okantiktas.com/projects/doc2faq/demo/`. The portfolio's existing singular convention, `/project/doc2faq/`, redirects to the product homepage. The approved light, outlined, illustrated design is documented in [DESIGN-SYSTEM.md](DESIGN-SYSTEM.md).
## What visitors can try
@@ -16,9 +16,9 @@ The public-facing route is `https://okantiktas.com/projects/doc2faq/`. The portf
| PDF/DOCX import and export | Yes; browser PDF.js / Word XML extraction and PDF-LIB / docx exports | Yes; PDFBox / Apache POI |
| OCR, external AI, accounts/billing | No | Not implemented |
-PDF and Word files are processed on the visitor's device. PDF import is limited to 5 MB, 50 pages and 50,000 extracted characters; DOCX import is limited to 5 MB, 50,000 extracted characters, 1,000 archive entries and an 8 MB expanded main XML part. Legacy `.doc`, password-protected PDFs and image-only/scanned PDFs are not supported. Word extraction reads main-document paragraphs and tables, mapping standard Heading 1–6 styles to Markdown section headings (levels 2–6) so the generator treats Heading 1 as a section rather than a document title. Headers/footers, images and complex layouts may not be retained. Browser PDF export uses Helvetica with Latin character coverage; unsupported characters produce an error recommending Word, never silently dropped text. Word exports preserve Unicode. Both exports include every FAQ regardless of filters and optionally include source references.
+PDF and Word files are processed on the visitor's device. PDF import is limited to 5 MB, 50 pages and 50,000 extracted characters; DOCX import is limited to 5 MB, 50,000 extracted characters, 1,000 archive entries and an 8 MB expanded main XML part. Legacy `.doc`, password-protected PDFs and image-only/scanned PDFs are not supported. Word extraction reads main-document paragraphs and tables, mapping standard Heading 1–6 styles to Markdown section headings (levels 2–6) so the generator treats Heading 1 as a section rather than a document title. Headers/footers, images and complex layouts may not be retained. Browser PDF export **embeds bundled DejaVu Sans regular/bold font subsets** for Turkish, extended Latin, IPA and many mathematical symbols. If a font still cannot display a character, the app recommends Word rather than silently dropping it. Word exports preserve Unicode. Both exports include every FAQ regardless of filters and optionally include source references.
-The demo demonstrates the review workflow; it is not a hosted Java backend and does not claim identical generation results. Its development features may be newer than the latest published JAR. No pasted text is sent to an FAQ server. Optional autosave and downloaded project files contain source text; clear saved data on shared devices. Normal website hosting still serves the page and assets. The document adapter lazily loads version-pinned PDF.js, PDF-LIB, JSZip and docx code from jsDelivr. An internet connection is needed on first use; load failures leave the workspace available for retry. See [third-party libraries](../web-demo/THIRD-PARTY.md).
+The demo demonstrates the review workflow; it is not a hosted Java backend and does not claim identical generation results. Its development features may be newer than the latest published JAR. No pasted text is sent to an FAQ server. Optional autosave and downloaded project files contain source text; clear saved data on shared devices. Normal website hosting still serves the page and assets. The document adapter lazily loads version-pinned PDF.js, PDF-LIB, fontkit, JSZip and docx code from jsDelivr. DejaVu fonts are **served by the same website**, not downloaded from a third-party font service. An internet connection is needed on first use; load failures leave the workspace available for retry. See [third-party libraries](../web-demo/THIRD-PARTY.md).
## Build and keep it synchronized
@@ -26,18 +26,20 @@ Run from the repository root with Node.js:
```sh
node --test src/test/js/*.test.cjs
-node scripts/build-web-demo.mjs
+node scripts/build-website.mjs
```
-The builder creates ignored `demo-dist/` from the actual app frontend, shared project validator, stylesheet, and background. It replaces backend requests with the browser-only adapter in `web-demo/engine.js`, routes document import and binary export through `web-demo/documents.js`, keeps PDF/Word options available, uses relative asset paths with content-hash cache versions, fills the source-build version, and adds demo disclosure and homepage/source/download links. It does not modify the Java application's served UI.
+The builder creates ignored `demo-dist/` from the actual app frontend, shared project validator, stylesheet, and background. It replaces backend requests with the browser-only adapter in `web-demo/engine.js`, routes document import and binary export through `web-demo/documents.js`, keeps PDF/Word options available, uses relative asset paths with content-hash cache versions, fills the source-build version, and adds demo disclosure and homepage/source/download links. The approved retro theme also styles the Java application's UI without changing its JavaScript behavior.
-Copy the complete contents of `demo-dist/` into `projects/doc2faq/` in the private `OKAN-SOFTWARE/okantiktas.com` repository. Preserve relative filenames. Update the Doc2FAQ homepage card to the demo route. Keep `/project/doc2faq/index.html` as a redirect with a visible fallback link. Do not replace the rest of the portfolio or its activity scripts.
+The `build-website.mjs` step then creates ignored `website-dist/` containing the approved **Doc2FAQ marketing homepage** and the working, equally styled `demo/` subdirectory. It rewrites navigation to relative URLs that are valid under `/projects/doc2faq/`.
+
+Copy the complete contents of **`website-dist/`** into `projects/doc2faq/` in the private `OKAN-SOFTWARE/okantiktas.com` repository. Preserve the `demo/` subdirectory and relative filenames. The Doc2FAQ homepage card may link to the new product homepage. Keep `/project/doc2faq/index.html` as a redirect with a visible fallback link. Do not replace the rest of the portfolio or its activity scripts.
The portfolio is hosted through its existing GitHub-main → Hostinger deployment. Pushing source and observing a live deployment are separate steps: verify the actual custom-domain route after deployment before reporting it live. Do not deploy the full Java app to static hosting or change DNS to add this subdirectory.
## Verify before publishing
-- Both demo routes resolve; homepage, source, and download links work.
+- Both homepage routes and the `/projects/doc2faq/demo/` application resolve; source, download and return links work.
- Examples and pasted TXT/Markdown work in both modes; text source references match exactly.
- Source highlights remain stable while typing, including on mobile.
- Approvals persist after save/open and optional autosave/reload; edits/merges reset approval.
diff --git a/packaging/Start-Doc2FAQ.cmd b/packaging/Start-Doc2FAQ.cmd
new file mode 100644
index 0000000..92265ff
--- /dev/null
+++ b/packaging/Start-Doc2FAQ.cmd
@@ -0,0 +1,40 @@
+@echo off
+setlocal
+cd /d "%~dp0"
+title Doc2FAQ v0.5.0
+
+echo ====================================================
+echo Doc2FAQ v0.5.0 - Local Java application
+echo ====================================================
+echo.
+echo This window runs your local Doc2FAQ server.
+echo Once it starts, open: http://localhost:8080
+echo Keep this window open while using the application.
+echo.
+
+if not exist "doc2faq-0.5.0.jar" (
+ echo ERROR: The JAR is missing. Extract the entire ZIP first.
+ goto :failed
+)
+
+where java >nul 2>&1
+if errorlevel 1 (
+ echo ERROR: Java was not found.
+ echo Install Java 21 or later and confirm "java -version" works.
+ goto :failed
+)
+
+java -version
+echo.
+java -jar "doc2faq-0.5.0.jar"
+if errorlevel 1 goto :failed
+echo.
+echo Doc2FAQ has stopped.
+pause
+exit /b 0
+
+:failed
+echo.
+echo Startup did not complete. See WINDOWS-QUICK-START.md.
+pause
+exit /b 1
diff --git a/packaging/WINDOWS-QUICK-START.md b/packaging/WINDOWS-QUICK-START.md
new file mode 100644
index 0000000..103ec90
--- /dev/null
+++ b/packaging/WINDOWS-QUICK-START.md
@@ -0,0 +1,25 @@
+# Doc2FAQ v0.5.0 — Windows quick start
+
+1. Extract the **entire** `Doc2FAQ-0.5.0-Windows.zip` to a folder. Do not launch it while still inside the ZIP.
+2. Install Java 21–26 if needed. In Command Prompt, run `java -version` to confirm it works. The app targets Java 21 bytecode. Java 27 had an exploratory successful test but is not part of the official v0.5.0 compatibility matrix.
+3. Double-click `Start-Doc2FAQ.cmd`. A terminal window explains that the app is starting and stays open while the server is running.
+4. Open [http://localhost:8080](http://localhost:8080) in your browser after Java has started.
+5. Close the terminal or press **Ctrl+C** when you are finished.
+
+If Windows blocks an unfamiliar downloaded script, do not disable Windows protections. You can instead open Command Prompt in the extracted folder and run:
+
+```cmd
+java -jar doc2faq-0.5.0.jar
+```
+
+If port 8080 is already used, stop the older Doc2FAQ process or run:
+
+```cmd
+java -jar doc2faq-0.5.0.jar --server.port=8081
+```
+
+Then open [http://localhost:8081](http://localhost:8081).
+
+The app processes documents locally. For a browser-only demo without a Java installation, visit [the Doc2FAQ project page](https://okantiktas.com/projects/doc2faq/).
+
+To verify a downloaded artifact, compare its SHA-256 hash against `SHA256SUMS.txt` in the same GitHub release.
diff --git a/pom.xml b/pom.xml
index 2dcadeb..0ef0c07 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,11 +11,12 @@
com.okansoftwaredoc2faq
- 0.5.0-SNAPSHOT
+ 0.5.0Doc2FAQPrivacy-conscious document-to-FAQ preview workbench21
+ 21
diff --git a/scripts/build-web-demo.mjs b/scripts/build-web-demo.mjs
index 43f5756..79bab07 100644
--- a/scripts/build-web-demo.mjs
+++ b/scripts/build-web-demo.mjs
@@ -1,4 +1,4 @@
-import {readFile, writeFile, mkdir, copyFile} from 'node:fs/promises';
+import {readFile, writeFile, mkdir, copyFile, cp} from 'node:fs/promises';
import {fileURLToPath} from 'node:url';
import path from 'node:path';
import {createHash} from 'node:crypto';
@@ -12,21 +12,22 @@ let html = await readFile(path.join(source, 'index.html'), 'utf8');
html = html.replaceAll('@project.version@', version)
.replace('content="Doc2FAQ extracts existing Q&A or builds source-grounded FAQ suggestions from TXT, Markdown, PDF, and DOCX. Review, edit, and export."', 'content="Try Doc2FAQ in your browser: draft FAQs from text, inspect sources, edit, approve, and export."')
.replaceAll('href="/styles.css"', 'href="./styles.css"')
+ .replaceAll('href="/retro.css"', 'href="./retro.css"')
.replaceAll('src="/project.js"', 'src="./project.js"')
.replace('src="/app.js"', 'src="./app.js"')
.replace('src="/background.js"', 'src="./background.js"')
.replace('\n \n
@@ -19,14 +23,15 @@
D✳Doc2FAQ
- PREVIEW · LOCAL WORKSPACE
+
+ LOCAL JAVA WORKSPACE
-
DOCUMENT INTELLIGENCE / PREVIEW @project.version@
-
Turn long documents into clear answers.
+
✳ WELCOME TO DOC2FAQ / @project.version@
+
LET’S TURN PAGES INTO ANSWERS.
Extract questions already in your document or turn ordinary sections into source-grounded FAQ suggestions. Review, edit, and export your draft.
✦ No account✦ No AI calls✦ Review before sharing
@@ -58,7 +63,7 @@
Turn long documents into clear answers.
Save work keeps your source and edits for later. Use Download for the finished FAQ.
-
+
Autosave off
@@ -99,7 +104,7 @@
Turn long documents into clear answers.
- .md
+ .pdf
Edit this name before downloading. The extension follows your chosen format.