# PostEasy **Repository Path**: tangjindi9527/PostEasy ## Basic Information - **Project Name**: PostEasy - **Description**: 一键将 Java Spring Controller 源码生成可交互的离线 HTML API 接口文档。无需 JDK,内置 HTTP 调试客户端。 Generate interactive offline HTML API docs from Spring Controller source. No JDK needed. Built-in HTTP client. - **Primary Language**: TypeScript - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2026-07-17 - **Last Updated**: 2026-07-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: Java, API, HTML, Windows, macOS ## README # PostEasy > Cross-platform desktop app — scan Java Spring Controller source code and generate interactive offline HTML API documentation with one click. [中文](README.md) --- ## 📑 Table of Contents - [Features](#features) - [Installation & Usage](#installation--usage) - [HTML Offline Documentation](#html-offline-documentation) - [How Descriptions Are Resolved](#how-descriptions-are-resolved) - [API Tree Controller Name](#api-tree-controller-name) - [API Description (Method Summary)](#api-description-method-summary) - [Request Parameter Description](#request-parameter-description) - [Response / Request Body Field Description](#response--request-body-field-description) - [Edit Priority](#edit-priority) - [Field Tree Recursion](#field-tree-recursion) - [Notes & Caveats](#notes--caveats) - [Development](#development) --- ## 📸 Screenshots | Homepage | Scan Page | |----------|-----------| | ![Homepage](resources/images/首页EN.jpg) | ![Scan Page](resources/images/扫描页EN.jpg) | | Export Page | HTML API Documentation | |-------------|------------------------| | ![Export Page](resources/images/导出页EN.jpg) | ![HTML API Documentation](resources/images/html接口文档EN.jpg) | --- ## Features ### Desktop App (Electron) - **📁 Project Scanning** — Select a Java project root; automatically discovers multi-module Maven/Gradle structures and locates all `*Controller.java` files - **🔍 AST Parsing** — Source-level AST analysis via tree-sitter-java. **No JDK required** — works out of the box - **📊 Scan Overview** — Displays controller count, total API count, and parsing issues; supports exporting error logs - **📄 Document Export** — One-click generation of a self-contained HTML API document that opens directly in a browser with no local server needed ### HTML Offline Documentation (Generated) - **🌐 Live Request Debugging** — Built-in HTTP client supporting GET / POST / PUT / DELETE / PATCH; call APIs directly from the document - **📝 Editable Descriptions** — API summaries, request parameter descriptions, and response field descriptions are all **click-to-edit**; edits are auto-persisted to localStorage - **💾 Export with Descriptions** — Embed your edited descriptions into the HTML file and export it as a new standalone document to share with your team - **📋 Custom Headers** — Add arbitrary request headers (e.g., Authorization, X-Token) for request debugging - **🔢 Environment Switching** — Built-in "Local Dev / Test / Production" environments with customizable names and Base URLs - **📂 Request History** — Auto-saves the last 50 requests including parameters, headers, and response status; one-click restore - **🔎 Quick Search** — Filter APIs by path or method name; `Ctrl+K` shortcut to focus the search box - **🎨 Theme Switching** — Light / Dark / System three theme modes - **🌍 Bilingual UI** — Toggle between Chinese and English with one click - **🔄 Body View Toggle** — Switch between JSON editor and form field views with bidirectional sync - **🪄 Fill Example Values** — One-click auto-fill of example values for request body fields (type-aware) - **📎 cURL Export** — Every request auto-generates a cURL command; one-click copy ### Parsing Support | Category | Supported | |----------|-----------| | Java Versions | 8 / 11 / 17 / 21+ | | Spring Boot | 2.x / 3.x / 4.x+ | | Annotation Namespaces | `javax.*` and `jakarta.*` auto-adapted | | HTTP Annotations | `@GetMapping`, `@PostMapping`, `@PutMapping`, `@DeleteMapping`, `@PatchMapping`, `@RequestMapping` | | Parameter Annotations | `@RequestParam`, `@PathVariable`, `@RequestBody`, `@RequestHeader`, `@RequestPart`, `@CookieValue`, etc. | | Validation Constraints | `@NotNull`, `@NotBlank`, `@NotEmpty`, `@Size`, `@Min`, `@Max`, `@Pattern`, and 15+ more | | Swagger Annotations | `@Operation`, `@ApiOperation`, `@Tag`, `@Api`, `@Schema`, `@ApiModelProperty`, `@Parameter`, `@ApiParam` | | Response Types | POJOs, `R`/`Result`/`ResponseEntity` wrappers, `Mono`/`Flux` reactive, `List`/`Page` pagination, file downloads | | DTO Resolution | Automatically resolves fields from all `.java` files; supports nested object expansion (max depth 5); circular references auto-detected | --- ## Installation & Usage ### Download Download the installer for your platform from [GitHub Releases](https://github.com/tangjindi/PostEasy/releases): | Platform | File | |----------|------| | macOS (Apple Silicon) | `PostEasy-1.0.0-mac-arm64.dmg` | | macOS (Intel) | `PostEasy-1.0.0-mac-x64.dmg` | | Windows | `PostEasy-Setup-1.0.0-win.exe` | > **Windows users**: If SmartScreen blocks the installer, click "More info" → "Run anyway". This is because the app is not code-signed. ### Basic Workflow 1. **Launch** — Open PostEasy 2. **Select Project** — Choose the root directory of your Java Spring Boot project (the directory containing `pom.xml` or `build.gradle`) 3. **Scan** — Click "Start Scan"; the app will discover all Controller files and parse the APIs 4. **Export** — After scanning, click "Export HTML" and choose a save location 5. **Open** — Open the generated HTML file in a browser to view and interact ### Multi-Module Projects PostEasy automatically detects Maven/Gradle multi-module structures and scans all `src/main/java` directories. To ensure complete resolution of all DTO classes and parameter types, select the project root directory (the directory containing `pom.xml` or `build.gradle`). --- ## HTML Offline Documentation The generated HTML document is a **fully self-contained** single-file application — no web server or local service required. ### Left Sidebar - **Search Box** — Quick-filter APIs by path or method name; `Ctrl+K` to focus - **Environment Selector** — Switch Base URL between environments; add custom environments - **API Tree** — APIs grouped by Controller; expand/collapse all; search filtering - **Bottom Buttons** — Theme toggle, language toggle, history panel, export with descriptions ### Right Detail Panel - **API Description** — Shows the method summary; **click to edit** - **Request Parameters Table** — Name, location, type, required, description, value. Simple params use inline inputs; complex objects (`@RequestBody`) render as editable field trees. **Field descriptions are click-to-edit** - **Request Body** — Toggle between **Form** and **JSON** views; bidirectional sync - **Custom Headers** — Dynamically add/remove arbitrary headers (e.g., `Authorization: Bearer xxx`) - **Response Parameters** — Response field tree with **editable field descriptions**; nested objects expand/collapse - **Send Request** — Fill in parameters and click Send; displays request details, response headers, response body, timing, and status code; auto-generates cURL ### Export with Descriptions This is PostEasy's signature feature: 1. Edit API descriptions, parameter descriptions, and field descriptions in the HTML document 2. Click the **💾 Export (with desc)** button at the bottom-left 3. Your edits are embedded into a new HTML file 4. Share the new file with your team — they'll see all your supplemental descriptions immediately > **How it works**: The export function serializes `state.edits` into an embedded `