Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
T
template-previewer
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Registry
Registry
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
M. Esat Akpunar
template-previewer
Commits
c75f2c23
Commit
c75f2c23
authored
Apr 14, 2025
by
M. Esat Akpunar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update README.md
parent
5e69e0b9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
67 additions
and
97 deletions
+67
-97
README.md
README.md
+67
-97
No files found.
README.md
View file @
c75f2c23
HTML and PDF Preview PRD
Project Objective
This project is a web application that allows users to input HTML templates and data sources and preview the results in both HTML and PDF formats.
User Interface Requirements
Main Page Layout
The page will be divided into two main sections vertically:
Left Panel
Right Panel
Left Panel Features
HTML Template Input Field
Large text editor
Syntax highlighting support
Highlighting of template variables
Data Source Input Field
Data entry in JSON format
Syntax highlighting support
JSON validation
Control Buttons
"Run" button
Sends the template and data source to the backend
Right Panel Features
Tabbed View
HTML Preview tab
PDF Preview tab
HTML Preview
Combined result of the template and data source
Responsive view
# HTML and PDF Preview PRD
PDF Preview
Preview of the PDF document
Zoom in/out features
Technical Requirements
Frontend Framework: Vue.js
UI Library: Tailwind CSS
Code Editor: Monaco Editor
PDF Viewer: PDF.js
Responsive design
Modern and user-friendly interface
Dark/Light mode support
Error notification system
Detailed error handling and display
Backend Integration
API Endpoint: /report/pdfTest
## Project Objective
This project is a web application that allows users to input HTML templates and data sources and preview the results in both HTML and PDF formats.
Request Format:
## User Interface Requirements
json
Copy
Edit
### Main Page Layout
The page will be divided into two main sections vertically:
-
**Left Panel**
-
**Right Panel**
### Left Panel Features
1.
**HTML Template Input Field**
-
Large text editor
-
Syntax highlighting support
-
Highlighting of template variables
2.
**Data Source Input Field**
-
Data entry in JSON format
-
Syntax highlighting support
-
JSON validation
3.
**Control Buttons**
-
"Run" button
-
Sends the template and data source to the backend
### Right Panel Features
1.
**Tabbed View**
-
HTML Preview tab
-
PDF Preview tab
2.
**HTML Preview**
-
Combined result of the template and data source
-
Responsive view
3.
**PDF Preview**
-
Preview of the PDF document
-
Zoom in/out features
## Technical Requirements
-
**Frontend Framework**
: Vue.js
-
**UI Library**
: Tailwind CSS
-
**Code Editor**
: Monaco Editor
-
**PDF Viewer**
: PDF.js
-
Responsive design
-
Modern and user-friendly interface
-
Dark/Light mode support
-
Error notification system
-
Detailed error handling and display
## Backend Integration
-
**API Endpoint**
:
`/report/pdfTest`
### Request Format:
```
json
{
"template"
:
"HTML template string"
,
"dataSource"
:
"JSON data string"
}
Response Format:
```
json
Copy
Edit
### Response Format:
```
json
{
"
htmlContent": "Rendered HTML
string",
"
pdfContent": "PDF byte array
"
"
template"
:
"HTML template
string"
,
"
dataSource"
:
"JSON data string
"
}
User Experience
Loading indicators for loading states
Toast notifications for error messages
User-friendly error management
Responsive design for mobile compatibility
Dark/Light mode toggle
Detailed error messages and notifications
```
## User Experience
-
Loading indicators for loading states
-
Toast notifications for error messages
-
User-friendly error management
-
Responsive design for mobile compatibility
-
Dark/Light mode toggle
-
Detailed error messages and notifications
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment