1
- ## HANA PDF
1
+ ## HANA PDF
2
2
3
3
<br >
4
4
<div align =" center " >
5
5
<img src =" screenshot/logo.png " alt =" HANA " width =" 300 " height =" 300 " >
6
6
</div >
7
7
<br >
8
8
9
- __ HANA PDF __ is your go-to solution for effortlessly managing your PDFs. We've designed it with simplicity in mind, so you can combine,
9
+ ** HANA PDF ** is your go-to solution for effortlessly managing your PDFs. We've designed it with simplicity in mind, so you can combine,
10
10
shrink, convert, and personalize your PDFs with just a few clicks. It was implemented with front-end framework like Tailwind CSS and
11
11
used of Flowbite library to maintain responsive and materialize interface. And powered with iLovePDF and Aspose Cloud API as one of the back-end.
12
12
@@ -17,113 +17,130 @@ used of Flowbite library to maintain responsive and materialize interface. And p
17
17
---
18
18
19
19
### Requirements [ For development with local environment]
20
- - [ Apache 2.4] ( https://httpd.apache.org ) or [ Nginx] ( https://www.nginx.com )
21
- - [ Composer] ( http://getcomposer.org/ )
22
- - [ Docker] ( https://www.docker.com/ )
23
- * On Windows use Docker Desktop
24
- * On Linux use docker-compose and docker.io
25
- - [ Node JS 20.11] ( https://nodejs.org/en )
26
- - [ PHP 8.2.12] ( https://www.php.net/downloads.php )
27
- - [ PostgreSQL 16.2] ( https://www.postgresql.org/ )
28
- - [ Postman] ( https://www.postman.com/ )
20
+
21
+ - [ Apache 2.4] ( https://httpd.apache.org ) or [ Nginx] ( https://www.nginx.com )
22
+ - [ Composer] ( http://getcomposer.org/ )
23
+ - [ Docker] ( https://www.docker.com/ )
24
+ - On Windows use Docker Desktop
25
+ - On Linux use docker-compose and docker.io
26
+ - [ Node JS 20.11] ( https://nodejs.org/en )
27
+ - [ PHP 8.2.12] ( https://www.php.net/downloads.php )
28
+ - [ PostgreSQL 16.2] ( https://www.postgresql.org/ )
29
+ - [ Postman] ( https://www.postman.com/ )
29
30
30
31
---
31
32
32
33
### Python Module Requirements
33
- - Requests
34
+
35
+ - Requests
34
36
35
37
---
36
38
37
39
### Build Status
38
- - [ ![ CodeQL] ( https://github.com/Nicklas373/Hana-PDF/actions/workflows/github-code-scanning/codeql/badge.svg )] ( https://github.com/Nicklas373/Hana-PDF/actions/workflows/github-code-scanning/codeql )
39
- - [ ![ HANA PDF Container [ SIT]] ( https://github.com/Nicklas373/Hana-PDF/actions/workflows/docker-sit.yml/badge.svg )] ( https://github.com/Nicklas373/Hana-PDF/actions/workflows/docker-sit.yml )
40
- - [ ![ HANA Container Production] ( https://github.com/Nicklas373/hana-ci-docker-prod/actions/workflows/docker-prod-env.yml/badge.svg )] ( https://github.com/Nicklas373/hana-ci-docker-prod/actions/workflows/docker-prod-env.yml )
40
+
41
+ - [ ![ CodeQL] ( https://github.com/Nicklas373/Hana-PDF/actions/workflows/github-code-scanning/codeql/badge.svg )] ( https://github.com/Nicklas373/Hana-PDF/actions/workflows/github-code-scanning/codeql )
42
+ - [ ![ HANA PDF Container [ SIT]] ( https://github.com/Nicklas373/Hana-PDF/actions/workflows/docker-sit.yml/badge.svg )] ( https://github.com/Nicklas373/Hana-PDF/actions/workflows/docker-sit.yml )
43
+ - [ ![ HANA Container Production] ( https://github.com/Nicklas373/hana-ci-docker-prod/actions/workflows/docker-prod-env.yml/badge.svg )] ( https://github.com/Nicklas373/hana-ci-docker-prod/actions/workflows/docker-prod-env.yml )
41
44
42
45
---
43
46
44
47
### Commit History
45
- - [ Old branch - master] ( https://github.com/Nicklas373/Hana-PDF/tree/master )
46
- - [ Frontend Services - fe/master] ( https://github.com/Nicklas373/Hana-PDF/tree/fe/master )
47
- - [ Backend Services - be/master] ( https://github.com/Nicklas373/Hana-PDF/tree/be/master )
48
- - [ (DEV) Frontend Services - dev/fe/master] ( https://github.com/Nicklas373/Hana-PDF/tree/dev/fe/master )
49
- - [ (DEV) Backend Services - dev/be/master] ( https://github.com/Nicklas373/Hana-PDF/tree/dev/be/master )
48
+
49
+ - [ Old branch - master] ( https://github.com/Nicklas373/Hana-PDF/tree/master )
50
+ - [ Frontend Services - fe/master] ( https://github.com/Nicklas373/Hana-PDF/tree/fe/master )
51
+ - [ Backend Services - be/master] ( https://github.com/Nicklas373/Hana-PDF/tree/be/master )
52
+ - [ (DEV) Frontend Services - dev/fe/master] ( https://github.com/Nicklas373/Hana-PDF/tree/dev/fe/master )
53
+ - [ (DEV) Backend Services - dev/be/master] ( https://github.com/Nicklas373/Hana-PDF/tree/dev/be/master )
50
54
51
55
---
52
56
53
57
### Deployment On Docker
58
+
54
59
#### Step to configure
60
+
55
61
1 . Go to root directory from this project
56
62
2 . Start to deploy
57
- ```` bash
63
+ ``` bash
58
64
- docker compose up -d
59
65
- docker compose exec hana-api-services php artisan migrate
60
66
- docker compose exec hana-api-services php artisan db:seed
61
- ````
67
+ - docker compose exec hana-api-services chmod o+w /var/www/html/hanaci-api/storage/ -R
68
+ - docker compose exec hana-api-services chmod o+w /var/www/html/hanaci-api/vendor/mpdf/mpdf/tmp/ -R
69
+ ```
62
70
3. Configure Server Host
63
- ` ` ` ` bash
64
- - docker compose exec hana-api-services echo " TELEGRAM_BOT_ID=YOUR_TELEGRAM_BOT_ID" >> .env
65
- - docker compose exec hana-api-services echo " TELEGRAM_REPORT_ID=YOUR_TELEGRAM_CHANNEL_ID" >> .env
66
- - docker compose exec hana-api-services echo " TELEGRAM_CHAT_ID=YOUR_TELEGRAM_CHANNEL_ID" >> .env
67
- - docker compose exec hana-api-services echo " HANA_UNIQUE_TOKEN=YOUR_SHA512_UNIQUE_TOKEN" >> .env
68
- - docker compose exec hana-api-services sed -i " s/ASPOSE_CLOUD_CLIENT_ID=xxxx/ASPOSE_CLOUD_CLIENT_ID=YOUR_ASPOSE_CLOUD_CLIENT_ID/" >> .env
69
- - docker compose exec hana-api-services sed -i " s/ASPOSE_CLOUD_TOKEN=xxxx/ASPOSE_CLOUD_TOKEN=YOUR_ASPOSE_CLOUD_TOKEN" >> .env
70
- - docker compose exec hana-api-services sed -i " s/FTP_USERNAME=xxxx/FTP_USERNAME=YOUR_FTP_USERNAME/" >> .env
71
- - docker compose exec hana-api-services sed -i " s/FTP_USERPASS=xxxx/FTP_USERNAME=YOUR_FTP_USERPASS/" >> .env
72
- - docker compose exec hana-api-services sed -i " s/FTP_ROOT=xxxx/FTP_USERNAME=YOUR_FTP_ROOT_DIR/" >> .env
73
- - docker compose exec hana-api-services sed -i " s/ILOVEPDF_PUBLIC_KEY=xxxx/FTP_USERNAME=YOUR_ILOVEPDF_PUBLIC_KEY/" >> .env
74
- - docker compose exec hana-api-services sed -i " s/ILOVEPDF_SECRET_KEY=xxxx/FTP_USERNAME=YOUR_ILOVEPDF_SECRET_KEY/" >> .env
75
- ````
71
+ ` ` ` bash
72
+ - docker compose exec hana-api-services echo " TELEGRAM_BOT_ID=YOUR_TELEGRAM_BOT_ID" >> .env
73
+ - docker compose exec hana-api-services echo " TELEGRAM_REPORT_ID=YOUR_TELEGRAM_CHANNEL_ID" >> .env
74
+ - docker compose exec hana-api-services echo " TELEGRAM_CHAT_ID=YOUR_TELEGRAM_CHANNEL_ID" >> .env
75
+ - docker compose exec hana-api-services echo " HANA_UNIQUE_TOKEN=YOUR_SHA512_UNIQUE_TOKEN" >> .env
76
+ - docker compose exec hana-api-services sed -i " s/ASPOSE_CLOUD_CLIENT_ID=xxxx/ASPOSE_CLOUD_CLIENT_ID=YOUR_ASPOSE_CLOUD_CLIENT_ID/" >> .env
77
+ - docker compose exec hana-api-services sed -i " s/ASPOSE_CLOUD_TOKEN=xxxx/ASPOSE_CLOUD_TOKEN=YOUR_ASPOSE_CLOUD_TOKEN" >> .env
78
+ - docker compose exec hana-api-services sed -i " s/FTP_USERNAME=xxxx/FTP_USERNAME=YOUR_FTP_USERNAME/" >> .env
79
+ - docker compose exec hana-api-services sed -i " s/FTP_USERPASS=xxxx/FTP_USERNAME=YOUR_FTP_USERPASS/" >> .env
80
+ - docker compose exec hana-api-services sed -i " s/FTP_ROOT=xxxx/FTP_USERNAME=YOUR_FTP_ROOT_DIR/" >> .env
81
+ - docker compose exec hana-api-services sed -i " s/ILOVEPDF_PUBLIC_KEY=xxxx/FTP_USERNAME=YOUR_ILOVEPDF_PUBLIC_KEY/" >> .env
82
+ - docker compose exec hana-api-services sed -i " s/ILOVEPDF_SECRET_KEY=xxxx/FTP_USERNAME=YOUR_ILOVEPDF_SECRET_KEY/" >> .env
83
+ ` ` `
76
84
4. Configure Client Host
77
- ` ` ` ` bash
78
- - docker compose exec hana-app-pdf sed -i " s/VITE_ADOBE_CLIENT_ID=xxxx/VITE_ADOBE_CLIENT_ID=YOUR_ADOBE_CLIENT_ID/" >> .env
79
- - docker compose exec hana-app-pdf echo " TELEGRAM_BOT_ID=YOUR_TELEGRAM_BOT_ID" >> .env
80
- - docker compose exec hana-app-pdf echo " TELEGRAM_CHAT_ID=YOUR_TELEGRAM_CHANNEL_ID" >> .env
81
- ````
85
+ ` ` ` bash
86
+ - docker compose exec hana-app-pdf sed -i " s/VITE_ADOBE_CLIENT_ID=xxxx/VITE_ADOBE_CLIENT_ID=YOUR_ADOBE_CLIENT_ID/" >> .env
87
+ - docker compose exec hana-app-pdf echo " TELEGRAM_BOT_ID=YOUR_TELEGRAM_BOT_ID" >> .env
88
+ - docker compose exec hana-app-pdf echo " TELEGRAM_CHAT_ID=YOUR_TELEGRAM_CHANNEL_ID" >> .env
89
+ - docker compose exec hana-app-pdf chmod o+w /var/www/html/hanaci-pdf/storage/ -R
90
+ ` ` `
82
91
5. Configure REST API
83
92
- Install Postman
84
93
- Create a new HTTP request with POST format
85
- - URL: http://YOUR_LOCAL_IP:YOUR_LOCAL_PORT/api/v1/auth/token
94
+ - URL: http://YOUR_LOCAL_IP:YOUR_LOCAL_PORT/api/v1/auth/getToken
86
95
- Body: form-data
87
96
88
97
- password: YOUR_SHA512_UNIQUE_TOKEN
89
98
- Send a POST request to get access token
90
99
- Set token to FE services
91
- ` ` ` ` bash
92
- - docker compose exec hana-app-pdf sed -i ' s|Bearer STATIC_BEARER|Bearer YOUR_CURRENT_BEARER|' public/build/assets/kao-logic-CHECK_LATEST_REVISION.js
93
- - docker compose exec hana-app-pdf sed -i ' s|STATIC_BEARER|YOUR_CURRENT_BEARER|' public/build/assets/kao-logic-CHECK_LATEST_REVISION.js
100
+ ` ` ` bash
101
+ - docker compose exec hana-app-pdf sed -i ' s|STATIC_BEARER|Bearer YOUR_CURRENT_BEARER|' public/build/assets/kao-logic-CHECK_LATEST_REVISION.js
94
102
- docker compose exec hana-app-pdf sed -i ' s|http://192.168.0.2|YOUR_BACKEND_URL:PORT|' public/build/assets/kao-logic-CHECK_LATEST_REVISION.js
95
103
- docker compose exec hana-app-pdf sed -i ' s|STATIC_CLIENT_ID|YOUR_ADOBE_CLIENT_ID|' public/build/assets/kao-logic-CHECK_LATEST_REVISION.js
96
- ````
104
+ ` ` `
97
105
6. Refresh page and done.
98
106
99
107
---
100
108
101
109
# ## Deployment On Native OS Host
110
+
102
111
# ### Step to configure
103
- 1. Clone the repository with branch __fe/master__ [Frontend Services]
104
-
105
- A. Copy __.env.example__ file to __.env__ and modify database credentials
106
- ` ` ` ` bash
112
+
113
+ 1. Clone the repository with branch ** fe/master** [Frontend Services]
114
+
115
+ A. Copy ** .env.example** file to ** .env** and modify database credentials
116
+
117
+ ` ` ` bash
107
118
- VITE_ADOBE_CLIENT_ID=" ADOBE_CLIENT_ID" [https://developer.adobe.com/document-services/docs/overview/pdf-embed-api/]
108
- - VITE_JWT_TOKEN=" YOUR_CURRENT_BEARER_TOKEN" [Get it from Backend with route api/v1/auth/token ]
119
+ - VITE_JWT_TOKEN=" YOUR_CURRENT_BEARER_TOKEN" [Get it from Backend with route api/v1/auth/getToken ]
109
120
- TELEGRAM_BOT_ID=" YOUR_TELEGRAM_BOT_ID" [https://telegram-bot-sdk.com/docs/getting-started/installation]
110
121
- TELEGRAM_CHAT_ID=" YOUR_TELEGRAM_CHANNEL_ID" [https://telegram-bot-sdk.com/docs/getting-started/installation]
111
- ````
122
+ ` ` `
123
+
112
124
B. Run the following command [Make sure to configure database connectivity before use migrate function]
113
- ` ` ` ` bash
125
+
126
+ ` ` ` bash
114
127
- composer install
115
128
- npm run install
116
129
- php artisan key:generate
117
130
- php artisan storage:link
118
- ````
131
+ ` ` `
132
+
119
133
C. Start to deploy
134
+
120
135
` ` ` bash
121
136
- php artisan serve --host=localhost --port=81
122
137
` ` `
123
- 2. Clone the repository with branch __dev/be/master [Backend Services]
124
138
125
- A. Copy __.env.example__ file to __.env__ and modify database credentials
126
- ` ` ` ` bash
139
+ 2. Clone the repository with branch \_\_ dev/be/master [Backend Services]
140
+
141
+ A. Copy ** .env.example** file to ** .env** and modify database credentials
142
+
143
+ ` ` ` bash
127
144
- ASPOSE_CLOUD_CLIENT_ID=" ASPOSE_CLOUD_CLIENT_ID" [https://dashboard.aspose.cloud/]
128
145
- ASPOSE_CLOUD_TOKEN=" ASPOSE_CLOUD_TOKEN" [https://dashboard.aspose.cloud/]
129
146
- FTP_USERNAME=" FTP_USERNAME" [https://dashboard.aspose.cloud/]
@@ -140,43 +157,51 @@ used of Flowbite library to maintain responsive and materialize interface. And p
140
157
- TELEGRAM_BOT_ID=" YOUR_TELEGRAM_BOT_ID" [https://telegram-bot-sdk.com/docs/getting-started/installation]
141
158
- TELEGRAM_CHAT_ID=" YOUR_TELEGRAM_CHANNEL_ID" [https://telegram-bot-sdk.com/docs/getting-started/installation]
142
159
- HANA_UNIQUE_TOKEN=" YOUR_SHA512_UNIQUE_TOKEN"
143
- ````
160
+ ` ` `
161
+
144
162
B. Run the following command [Make sure to configure database connectivity before use migrate function]
145
- ` ` ` ` bash
163
+
164
+ ` ` ` bash
146
165
- composer install
147
166
- php artisan key:generate
148
167
- php artisan jwt:secret
149
168
- php artisan storage:link
150
- ````
169
+ ` ` `
151
170
152
171
C. Create new directory inside storage/app/public
153
- * image
154
- * batch
155
- * upload
156
- * download
157
- * pool
172
+
173
+ - image
174
+ - batch
175
+ - upload
176
+ - download
177
+ - pool
158
178
159
179
D. Start to deploy
160
- ` ` ` ` bash
180
+
181
+ ` ` ` bash
161
182
- npm run dev -- --host
162
183
- php artisan serve --host=localhost --port=80
163
- ````
184
+ ` ` `
185
+
164
186
E. Configure apiUrl variable on resources/js/kao-logic.js to your considered BE address and port !
187
+
165
188
---
166
189
167
190
# ## Technology Stack
168
- - [Docker](https://www.docker.com/)
169
- - [DropzoneJS](https://www.dropzone.dev/)
170
- - [Flowbite](https://flowbite.com/)
171
- - [Laravel](https://laravel.com/)
172
- - [Node JS](https://nodejs.org/en)
173
- - [Mozilla PDFJS](https://mozilla.github.io/pdf.js/)
174
- - [Tailwind CSS](https://tailwindcss.com/)
175
- - [Vite JS](https://vitejs.dev/)
191
+
192
+ - [Docker](https://www.docker.com/)
193
+ - [DropzoneJS](https://www.dropzone.dev/)
194
+ - [Flowbite](https://flowbite.com/)
195
+ - [Laravel](https://laravel.com/)
196
+ - [Node JS](https://nodejs.org/en)
197
+ - [Mozilla PDFJS](https://mozilla.github.io/pdf.js/)
198
+ - [Tailwind CSS](https://tailwindcss.com/)
199
+ - [Vite JS](https://vitejs.dev/)
176
200
177
201
---
178
202
179
203
# ## License
204
+
180
205
The HANA PDF is a open source Laravel Project that has licensed under the [MIT license](https://opensource.org/licenses/MIT).
181
206
182
207
---
0 commit comments