Skip to content

Commit 8fc414a

Browse files
committed
V2
1 parent 12a7c09 commit 8fc414a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+4093
-98
lines changed

.claude/settings.local.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(npm run docusaurus:*)",
5+
"Bash(cat:*)"
6+
],
7+
"deny": [],
8+
"ask": []
9+
}
10+
}

docs/Advanced Configuration/UI Customisation.md

Lines changed: 28 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -20,62 +20,34 @@ These settings (in Settings.yml) control system behavior and customization capab
2020
- `showUpdate` - Controls whether update notifications are displayed
2121
- `showUpdateOnlyAdmin` - When true, restricts update notifications to admin users only (requires `showUpdate: true`)
2222

23-
24-
## System Configuration
25-
``customHTMLFiles`` In Settings.yml Enables custom HTML file overrides (called fragments) when set to true
26-
27-
## Custom Files
28-
When `customHTMLFiles` is enabled, you can override the default templatesby placing your custom files in specific directories. The system uses a resource override mechanism where files in these custom directories take precedence over the default files.
29-
30-
### Directory Structure
31-
```
32-
customFiles/
33-
├── static/ # Static assets (CSS, JS, images, etc.)
34-
└── templates/ # HTML template files
23+
## V2.0 UI Customization Notes
24+
25+
**Important**: Stirling-PDF V2.0 uses a React-based frontend. The V1.5 `customFiles/` folder system for overriding templates **no longer works** in V2.0.
26+
27+
For advanced UI customization in V2.0:
28+
1. Clone or download the repository
29+
2. Modify the React components in the `frontend/src` directory
30+
3. Build the frontend: `cd frontend && npm install && npm run build`
31+
4. Volume mount the `frontend/dist` folder into your Docker container to replace the built-in frontend files
32+
33+
Example docker-compose with custom frontend:
34+
```yaml
35+
services:
36+
stirling-pdf:
37+
image: docker.stirlingpdf.com/stirlingtools/stirling-pdf:latest
38+
ports:
39+
- '8080:8080'
40+
volumes:
41+
- ./frontend/dist:/app/frontend/dist # Mount your custom frontend
42+
environment:
43+
- MODE=BOTH
3544
```
3645
37-
### File Locations
38-
The root path for custom files varies by installation type:
39-
- **Default/Docker Installation**: `./customFiles/`
40-
- **Windows Desktop**: `%APPDATA%\Stirling-PDF\customFiles\`
41-
- **MacOS Desktop**: `~/Library/Application Support/Stirling-PDF/customFiles/`
42-
- **Linux Desktop**: `~/.config/Stirling-PDF/customFiles/`
43-
44-
### Override Examples
45-
To override existing files, maintain the same directory structure as the original. Here are some examples with links to the original files you would be overriding:
46-
47-
To override a file:
48-
1. Navigate to the original file in the GitHub repository
49-
2. Copy its contents
50-
3. Create the same file path under your `customFiles` directory following the same directory structure
51-
4. Paste and modify the contents as needed
52-
53-
Note: When overriding templates, first copy the existing template from the [source repository](https://github.com/Stirling-Tools/Stirling-PDF/tree/main/app/core/src/main/resources/templates) to maintain the base structure.
54-
55-
1. To replace the favicon:
56-
```
57-
customFiles/static/favicon.svg
58-
```
59-
Original file: [Stirling-PDF/app/core/src/main/resources/static/favicon.svg](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/app/core/src/main/resources/static/favicon.svg)
60-
61-
2. To override a Bootstrap icon font:
62-
```
63-
customFiles/static/css/fonts/bootstrap-icons.woff
64-
```
65-
Original file: [Stirling-PDF/app/core/src/main/resources/static/css/fonts/bootstrap-icons.woff](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/app/core/src/main/resources/static/css/fonts/bootstrap-icons.woff)
66-
67-
3. To modify a template:
68-
```
69-
customFiles/templates/fragments/common.html
70-
```
71-
Original file: [Stirling-PDF/app/core/src/main/resources/templates/fragments/common.html](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/app/core/src/main/resources/templates/fragments/common.html)
72-
73-
The original files can be found in the GitHub repository under:
74-
- Static files: [Stirling-PDF/app/core/src/main/resources/static/](https://github.com/Stirling-Tools/Stirling-PDF/tree/main/app/core/src/main/resources/static)
75-
- Templates (HTML files): [Stirling-PDF/app/core/src/main/resources/templates/](https://github.com/Stirling-Tools/Stirling-PDF/tree/main/app/core/src/main/resources/templates)
76-
77-
78-
46+
The following environment-based customizations are still supported without rebuilding:
47+
- Application name and branding
48+
- Update notification settings
49+
- Language settings
50+
- Theme preferences (via application settings)
7951
8052
## Configuration Examples
8153
@@ -90,7 +62,6 @@ The original files can be found in the GitHub repository under:
9062
system:
9163
showUpdate: false # Control update notification visibility
9264
showUpdateOnlyAdmin: false # Restrict update notifications to admins
93-
customHTMLFiles: false # Enable custom HTML/CSS overrides
9465
```
9566
</TabItem>
9667
<TabItem value="local" label="Local Environment">
@@ -101,8 +72,7 @@ The original files can be found in the GitHub repository under:
10172
java -jar Stirling-PDF.jar \
10273
-DAPP_HOME_NAME="New Application Name" \
10374
-DSHOW_UPDATE=false \
104-
-DSHOW_UPDATE_ONLY_ADMIN=false \
105-
-DCUSTOM_HTML_FILES=true
75+
-DSHOW_UPDATE_ONLY_ADMIN=false
10676
```
10777

10878
**Option 2: Using Environment Variables**
@@ -112,7 +82,6 @@ The original files can be found in the GitHub repository under:
11282
export UI_APPNAVBARNAME="Stirling PDF"
11383
export SYSTEM_SHOWUPDATE=false
11484
export SYSTEM_SHOWUPDATEONLYADMIN=false
115-
export SYSTEM_CUSTOMHTMLFILES=true
11685
```
11786
</TabItem>
11887
<TabItem value="docker-run" label="Docker Run">
@@ -121,8 +90,7 @@ The original files can be found in the GitHub repository under:
12190
-e UI_HOMEDESCRIPTION=Your locally hosted one-stop-shop for all your PDF needs. \
12291
-e UI_APPNAVBARNAME=Stirling PDF \
12392
-e SYSTEM_SHOWUPDATE=false \
124-
-e SYSTEM_SHOWUPDATEONLYADMIN=false \
125-
-e SYSTEM_CUSTOMHTMLFILES=true
93+
-e SYSTEM_SHOWUPDATEONLYADMIN=false
12694
```
12795
</TabItem>
12896
<TabItem value="docker-compose" label="Docker Compose">
@@ -133,9 +101,6 @@ The original files can be found in the GitHub repository under:
133101
UI_APPNAVBARNAME: Stirling PDF
134102
SYSTEM_SHOWUPDATE: "false"
135103
SYSTEM_SHOWUPDATEONLYADMIN: "false"
136-
SYSTEM_CUSTOMHTMLFILES: "true"
137-
volumes:
138-
- ./customFiles:/app/customFiles # Mount custom files directory
139104
```
140105
</TabItem>
141106
</Tabs>

docs/Contribute.md

Lines changed: 65 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,71 @@ id: Contribute
44
---
55

66
# Contribution guidelines
7-
Thanks for taking a look at how to contribute to Stirling PDFs open-source codebase
8-
Please checkout our GitHub documentation
7+
Thanks for taking a look at how to contribute to Stirling PDFs open-source codebase!
98

10-
## Adding/Update translations
11-
See [How To Add New Language guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md)
9+
## Development Setup
1210

13-
## Wanting to contribute to our codebase
11+
### Prerequisites
12+
- Java 17 or 21 (21 recommended)
13+
- Node.js 18+
14+
- Docker (for testing)
15+
- Gradle (included in repository)
1416

15-
See our [CONTRIBUTING guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
17+
### Getting Started
18+
19+
1. **Clone the repository**
20+
```bash
21+
git clone https://github.com/Stirling-Tools/Stirling-PDF.git
22+
cd Stirling-PDF
23+
```
24+
25+
2. **Backend Development**
26+
```bash
27+
# Build and run the Spring Boot backend
28+
./gradlew bootRun
29+
# Backend runs on localhost:8080
30+
```
31+
32+
3. **Frontend Development (V2.0+)**
33+
```bash
34+
# Navigate to frontend directory
35+
cd frontend
36+
37+
# Install dependencies
38+
npm install
39+
40+
# Run development server
41+
npm run dev
42+
# Frontend runs on localhost:5173, proxies API calls to backend (localhost:8080)
43+
```
44+
45+
## Contributing to Code
46+
47+
### Backend Contributions
48+
- See our [CONTRIBUTING guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md)
49+
- Backend uses Spring Boot + Java
50+
- Code formatting: Run `./gradlew spotlessApply` before committing
51+
52+
### Frontend Contributions (V2.0+)
53+
- Frontend is a React + TypeScript application
54+
- Uses Vite for build tooling
55+
- UI components: Mantine UI + TailwindCSS
56+
- Adding new tools: See [ADDING_TOOLS.md](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/ADDING_TOOLS.md)
57+
- Tool architecture: Uses `useToolOperation` hook pattern
58+
59+
## Translation Contributions
60+
61+
### V2.0 Translations (JSON)
62+
Translation files are located in `frontend/public/locales/`
63+
- **CRITICAL**: Always update translations in `en-GB` only, never `en-US`
64+
- Files are organized by feature (e.g., `common.json`, `tools.json`)
65+
- Use standard JSON format
66+
67+
### Legacy Translations (Properties)
68+
For V1.5 and backend translations:
69+
- See [How To Add New Language guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md)
70+
71+
## Development Resources
72+
- **API Documentation**: Access at `/swagger-ui/index.html` on your local instance
73+
- **Developer Guide**: See `DeveloperGuide.md` in the repository
74+
- **Claude Code Guide**: See `CLAUDE.md` for detailed architecture and patterns

docs/FAQ.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,41 @@ If you experience connection issues, use these alternative endpoints:
3434
- Docker Hub: `docker pull stirlingtools/stirling-pdf:latest`
3535
- GitHub: `docker pull ghcr.io/stirling-tools/stirling-pdf:latest`
3636

37-
All endpoints provide the same functionality.
37+
All endpoints provide the same functionality.
38+
39+
### Q8: What's different in V2.0?
40+
41+
V2.0 is a major frontend rewrite with significant improvements:
42+
- **Modern React Frontend**: Complete rewrite using React + TypeScript replacing the old Thymeleaf templates
43+
- **Better Performance**: Handles large PDFs (up to 100GB+) with improved memory management
44+
- **Stateful Processing**: Upload PDFs once and chain multiple tools without reloading files
45+
- **Client-Side Storage**: Uses IndexedDB for file persistence and thumbnail caching
46+
- **Native Desktop Apps**: Powered by Tauri for improved native experience
47+
- **Flexible Deployment**: Can deploy frontend and backend separately for better scalability
48+
49+
The backend and API remain largely unchanged, so existing integrations continue to work.
50+
51+
### Q9: Can I customize the UI in V2.0 like I did in V1.5?
52+
53+
No, the V1.5 `customFiles/` folder override system no longer works in V2.0 due to the React-based frontend.
54+
55+
You can still customize:
56+
- Application name and branding via environment variables
57+
- Theme preferences via application settings
58+
- Language settings
59+
60+
For extensive UI customization:
61+
1. Clone the repository and modify React components in `frontend/src/`
62+
2. Build the frontend: `npm install && npm run build`
63+
3. Volume mount `frontend/dist` into your Docker container to replace the built-in frontend
64+
65+
See [UI Customisation](/Advanced%20Configuration/UI%20Customisation) for detailed instructions.
66+
67+
### Q10: How do I develop for the V2.0 React frontend?
68+
69+
See our updated [Contribute](/Contribute) guide for detailed instructions. Quick start:
70+
1. Clone the repository
71+
2. Run backend: `./gradlew bootRun` (localhost:8080)
72+
3. Run frontend: `cd frontend && npm install && npm run dev` (localhost:5173)
73+
74+
The frontend dev server automatically proxies API calls to the backend.

docs/Functionality/The Technologies.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,29 @@ description: List of all technologies Stirling-PDF uses!
55
# The Technologies Behind Stirling PDF
66
Stirling PDF harnesses several technologies throughout its implementation.
77

8-
# Java
9-
As part of the JAVA framework to host the WebUI itself we use Spring Boot and Thymeleaf.
10-
Apache PDFBox is the core of the PDF functionality within Stirling-PDF.
11-
They offer a variety of methods to edit PDFs which we have then built Stirling-PDF on.
12-
We also show all licenses used within our Java application [here](https://stirlingpdf.io/licenses).
13-
14-
# JavaScript
15-
- [PDF.js](https://github.com/mozilla/pdf.js)
16-
- [PDF-LIB.js](https://github.com/Hopding/pdf-lib)
17-
18-
# Core Components
19-
- [Spring Boot + Thymeleaf](https://spring.io/projects/spring-boot) for the web framework
8+
# Backend (Java)
9+
- [Spring Boot](https://spring.io/projects/spring-boot) for the REST API framework
2010
- [PDFBox](https://pdfbox.apache.org/) for majority of PDF manipulation
2111
- [qpdf](https://qpdf.sourceforge.io/) for some PDF operations
2212
- [LibreOffice](https://www.libreoffice.org/discover/libreoffice/) for advanced file conversions
2313

24-
# Additional Technologies
25-
- HTML, CSS, JavaScript for the frontend
14+
We also show all licenses used within our Java application [here](https://stirlingpdf.io/licenses).
15+
16+
# Frontend (React SPA)
17+
- [React](https://react.dev/) + [TypeScript](https://www.typescriptlang.org/) for the web application
18+
- [Vite](https://vitejs.dev/) for build tooling and development server
19+
- [Mantine UI](https://mantine.dev/) component library for UI components
20+
- [TailwindCSS](https://tailwindcss.com/) for styling
21+
- [PDF.js](https://github.com/mozilla/pdf.js) for client-side PDF rendering
22+
- [PDF-LIB.js](https://github.com/Hopding/pdf-lib) for client-side PDF manipulation
23+
- [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) for client-side file storage and caching
24+
- [i18next](https://www.i18next.com/) for internationalization
25+
26+
# Desktop Application
27+
- [Tauri](https://tauri.app/) for native desktop application framework (Windows, Mac, Linux)
28+
29+
# Infrastructure
2630
- Docker for containerization
27-
- jcefmaven (specifically for portable non-server version)
31+
- Gradle for build management
2832

2933
For a comprehensive list of all technologies within the java application and their licenses, please visit our [licenses page](https://stirlingpdf.io/licenses).

docs/Getting Started.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,18 @@ slug: /
1313
- **Open-Source:** Community-driven with frequent updates and GitHub support.
1414
- **Multi-Language Support:** Available in 38+ languages with active translations.
1515

16+
### What's New in V2.0
17+
- **Modern React Frontend:** Complete rewrite with React + TypeScript for improved performance and user experience
18+
- **Stateful Document Processing:** Upload PDFs once and chain multiple tools without reloading
19+
- **Enhanced Performance:** Handles large PDFs (up to 100GB+) with improved memory management
20+
- **Client-Side File Storage:** IndexedDB for persistent file storage and thumbnail caching
21+
- **Improved Desktop Experience:** Native desktop apps powered by Tauri
22+
- **Flexible Deployment:** Separate frontend/backend deployment options for scalability
23+
1624
Please feel free to request new features or report bugs through our [GitHub](https://github.com/Stirling-Tools/Stirling-PDF/issues) or [Discord](https://discord.gg/Cn8pWhQRxZ).
1725

1826

19-
## Introduction
27+
## Introduction
2028

2129
This guide will help you choose the right installation method based on your needs.
2230
We prioritise and focus on our Server deployment options however we also offer a [Ultra-Lite model](/Installation/Versions) for desktop users

0 commit comments

Comments
 (0)