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 17.0
- Postman
- 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 - docker compose exec hana-api-services chmod o+w /var/www/html/hanaci-api/storage/ -R - docker compose exec hana-api-services chmod o+w /var/www/html/hanaci-api/vendor/mpdf/mpdf/tmp/ -R
- 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 - docker compose exec hana-api-services sed -i "s/MINIO_ACCESS_KEY=xxxx/MINIO_ACCESS_KEY=YOUR_MINIO_ACCESS_KEY/" >> .env - docker compose exec hana-api-services sed -i "s/MINIO_SECRET_KEY=xxxx/MINIO_SECRET_KEY=YOUR_MINIO_SECRET_KEY/" >> .env - docker compose exec hana-api-services sed -i "s/MINIO_ENDPOINT=xxxx/MINIO_ENDPOINT=YOUR_MINIO_ENDPOINT_URL/" >> .env
- Configure Client Host
- 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 - docker compose exec hana-app-pdf chmod o+w /var/www/html/hanaci-pdf/storage/ -R
- Configure REST API
- Install Postman
- Create a new HTTP request with POST format
- URL: http://YOUR_LOCAL_IP:YOUR_LOCAL_PORT/api/v1/auth/getToken
- 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|STATIC_BEARER|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
- Configure Min.io
- Open minio console page, URL: http://YOUR_LOCAL_IP:9001
- Go to administrator -> bucket
- Create new bucket with name "hana-pdf"
- Go to user -> access key
- Create new access key
- Check "Restrict beyond user policy"
- Fill custom policy
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": ["s3:GetObject", "s3:ListBucket", "s3:PutObject"], "Resource": ["arn:aws:s3:::hana-pdf", "arn:aws:s3:::hana-pdf/*"] } ] }
- Copy Access key into backend module environment "MINIO_ACCESS_KEY"
- Copy Secret key into backend module environment "MINIO_SECRET_KEY"
- Set name access key into "hana-pdf"
- Create access key
- 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_JWT_TOKEN="YOUR_CURRENT_BEARER_TOKEN" [Get it from Backend with route api/v1/auth/getToken] - 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]
- 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" - MINIO_ACCESS_KEY="YOUR_MINIO_ACCESS_KEY" - MINIO_SECRET_KEY="YOUR_MINIO_SECRET_KEY" - MINIO_ENDPOINT="YOUR_MINIO_ENDPOINT_URL"
- 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
- Create new directory inside storage/app/public
- image
- batch
- upload
- download
- pool
- Configure REST API
- Install Postman
- Create a new HTTP request with POST format
- URL: http://YOUR_LOCAL_IP:YOUR_LOCAL_PORT/api/v1/auth/getToken
- Body: form-data
- email: eureka@hana-ci.com
- password: YOUR_SHA512_UNIQUE_TOKEN
- Send a POST request to get access token
- Configure frontend credentials
- Set adobeClientID -> YOUR_ADOBE_CLIENT_ID
- Set apiUrl -> YOUR_BACKEND_URL
- Set bearerToken -> response token
- Configure Min.io
- Open minio console page, URL: http://YOUR_LOCAL_IP:9001
- Go to administrator -> bucket - Create new bucket with name "hana-pdf"
- Go to user -> access key - Create new access key
- Check "Restrict beyond user policy"
- Fill custom policy
{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": ["s3:GetObject", "s3:ListBucket", "s3:PutObject"], "Resource": ["arn:aws:s3:::hana-pdf", "arn:aws:s3:::hana-pdf/*"] } ] }
- Copy Access key into backend module environment "MINIO_ACCESS_KEY"
- Copy Secret key into backend module environment "MINIO_SECRET_KEY"
- Set name access key into "hana-pdf"
- Create access key
- Start to deploy
- npm run dev -- --host - php artisan serve --host=localhost --port=80
- Copy .env.example file to .env and modify database credentials
The HANA PDF is a open source Laravel Project that has licensed under the MIT license.