HANA PDF is your go-to solution for effortlessly managing your PDFs. We've designed it with simplicity in mind, so you can combine, shrink, convert, and personalize your PDFs with just a few clicks. It was implemented with front-end framework like Tailwind CSS and used of Flowbite library to maintain responsive and materialize interface. And powered with iLovePDF and Aspose Cloud API as one of the back-end.
- Apache 2.4 or Nginx
- Composer
- Docker
- On Windows use Docker Desktop
- On Linux use docker-compose and docker.io
- Node JS 20.11
- PHP 8.2.12
- PostgreSQL 16.2
- Postman
- Requests
- Old branch - master
- Frontend Services - fe/master
- Backend Services - be/master
- (DEV) Frontend Services - dev/fe/master
- (DEV) Backend Services - dev/be/master
- Go to root directory from this project
- Start to deploy
- docker compose up -d - docker compose exec hana-api-services php artisan migrate - docker compose exec hana-api-services php artisan db:seed
- Configure Server Host
- docker compose exec hana-api-services echo "TELEGRAM_BOT_ID=YOUR_TELEGRAM_BOT_ID" >> .env - docker compose exec hana-api-services echo "TELEGRAM_REPORT_ID=YOUR_TELEGRAM_CHANNEL_ID" >> .env - docker compose exec hana-api-services echo "TELEGRAM_CHAT_ID=YOUR_TELEGRAM_CHANNEL_ID" >> .env - docker compose exec hana-api-services echo "HANA_UNIQUE_TOKEN=YOUR_SHA512_UNIQUE_TOKEN" >> .env - docker compose exec hana-api-services sed -i "s/ASPOSE_CLOUD_CLIENT_ID=xxxx/ASPOSE_CLOUD_CLIENT_ID=YOUR_ASPOSE_CLOUD_CLIENT_ID/" >> .env - docker compose exec hana-api-services sed -i "s/ASPOSE_CLOUD_TOKEN=xxxx/ASPOSE_CLOUD_TOKEN=YOUR_ASPOSE_CLOUD_TOKEN" >> .env - docker compose exec hana-api-services sed -i "s/FTP_USERNAME=xxxx/FTP_USERNAME=YOUR_FTP_USERNAME/" >> .env - docker compose exec hana-api-services sed -i "s/FTP_USERPASS=xxxx/FTP_USERNAME=YOUR_FTP_USERPASS/" >> .env - docker compose exec hana-api-services sed -i "s/FTP_ROOT=xxxx/FTP_USERNAME=YOUR_FTP_ROOT_DIR/" >> .env - docker compose exec hana-api-services sed -i "s/ILOVEPDF_PUBLIC_KEY=xxxx/FTP_USERNAME=YOUR_ILOVEPDF_PUBLIC_KEY/" >> .env - docker compose exec hana-api-services sed -i "s/ILOVEPDF_SECRET_KEY=xxxx/FTP_USERNAME=YOUR_ILOVEPDF_SECRET_KEY/" >> .env
- Configure Client Host
- docker compose exec hana-app-pdf sed -i "s/VITE_ADOBE_CLIENT_ID=xxxx/VITE_ADOBE_CLIENT_ID=YOUR_ADOBE_CLIENT_ID/" >> .env - docker compose exec hana-app-pdf echo "TELEGRAM_BOT_ID=YOUR_TELEGRAM_BOT_ID" >> .env - docker compose exec hana-app-pdf echo "TELEGRAM_CHAT_ID=YOUR_TELEGRAM_CHANNEL_ID" >> .env
- Configure REST API
- Install Postman
- Create a new HTTP request with POST format
- URL: http://YOUR_LOCAL_IP:YOUR_LOCAL_PORT/api/v1/auth/token
- Body: form-data
- email: eureka@hana-ci.com
- password: YOUR_SHA512_UNIQUE_TOKEN
- Send a POST request to get access token
- Set token to FE services
- 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 - docker compose exec hana-app-pdf sed -i 's|STATIC_BEARER|YOUR_CURRENT_BEARER|' public/build/assets/kao-logic-CHECK_LATEST_REVISION.js - 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 - 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
- Refresh page and done.
-
Clone the repository with branch fe/master [Frontend Services]
A. Copy .env.example file to .env and modify database credentials
- VITE_ADOBE_CLIENT_ID="ADOBE_CLIENT_ID" [https://developer.adobe.com/document-services/docs/overview/pdf-embed-api/] - VITE_JWT_TOKEN="YOUR_CURRENT_BEARER_TOKEN" [Get it from Backend with route api/v1/auth/token] - TELEGRAM_BOT_ID="YOUR_TELEGRAM_BOT_ID" [https://telegram-bot-sdk.com/docs/getting-started/installation] - TELEGRAM_CHAT_ID="YOUR_TELEGRAM_CHANNEL_ID" [https://telegram-bot-sdk.com/docs/getting-started/installation]
B. Run the following command [Make sure to configure database connectivity before use migrate function]
- composer install - npm run install - php artisan key:generate - php artisan storage:link
C. Start to deploy
- php artisan serve --host=localhost --port=81
-
Clone the repository with branch __dev/be/master [Backend Services]
A. Copy .env.example file to .env and modify database credentials
- ASPOSE_CLOUD_CLIENT_ID="ASPOSE_CLOUD_CLIENT_ID" [https://dashboard.aspose.cloud/] - ASPOSE_CLOUD_TOKEN="ASPOSE_CLOUD_TOKEN" [https://dashboard.aspose.cloud/] - FTP_USERNAME="FTP_USERNAME" [https://dashboard.aspose.cloud/] - FTP_USERPASS="FTP_USERPASS" [https://dashboard.aspose.cloud/] - FTP_SERVER="FTP_SERVER" [https://dashboard.aspose.cloud/] - ILOVEPDF_ENC_KEY="ILOVEPDF_ENC_KEY" [Generate your hash key (Max. 25 digits)] - ILOVEPDF_PUBLIC_KEY="ILOVEPDF_PUBLIC_KEY" [https://developer.ilovepdf.com/] - ILOVEPDF_SECRET_KEY="ILOVEPDF_SECRET_KEY" [https://developer.ilovepdf.com/] - PDF_IMG_POOL="image" - PDF_BATCH="batch" - PDF_UPLOAD="upload" - PDF_DOWNLOAD="download" - PDF_POOL="pool" - TELEGRAM_BOT_ID="YOUR_TELEGRAM_BOT_ID" [https://telegram-bot-sdk.com/docs/getting-started/installation] - TELEGRAM_CHAT_ID="YOUR_TELEGRAM_CHANNEL_ID" [https://telegram-bot-sdk.com/docs/getting-started/installation] - HANA_UNIQUE_TOKEN="YOUR_SHA512_UNIQUE_TOKEN"
B. Run the following command [Make sure to configure database connectivity before use migrate function]
- composer install - php artisan key:generate - php artisan jwt:secret - php artisan storage:link
C. Create new directory inside storage/app/public
- image
- batch
- upload
- download
- pool
D. Start to deploy
- npm run dev -- --host - php artisan serve --host=localhost --port=80
E. Configure apiUrl variable on resources/js/kao-logic.js to your considered BE address and port !
The HANA PDF is a open source Laravel Project that has licensed under the MIT license.