soulsam480 / pdf-donkey

On demand pdf generation with custom templates, variables. PDF monkey but open-source with support for self hosting, docs: https://donkey-docs.sambitsahoo.com/

Home Page:https://donkey.sambitsahoo.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pdf-donkey

GitHub package.json version (branch) GitHub Website Netlify Status

PDF monkey but open-souce.

PDF Donkey - Open-source PDF Monkey alternative. | Product Hunt

Status

Donkey API has been shut down

The web app is still running

If you want to use it please see run it locally

Changelogs

Donkey API routes (not perfect)

App url https://donkey.sambitsahoo.com

Features:

  • Google OAuth2 login/ JWT Auth
  • Template CRUD
  • Rich template editing
  • Template preview
  • PDF Generation
  • Custom style

Projected:

  • UI refining
  • more..

Stack

api:

  • Node v14.x
  • Express
  • SQLite
  • Typeorm
  • Typescript
  • Route Controllers
  • Auth (JWT)/Google OAuth2

app:

  • Vite
  • React
  • React router
  • zustand
  • Typescript
  • Tailwind CSS

Run it locally

Pre-requisites

You need to have yarn installed on your machine as this is a monorepo and uses yarn woorkspaces. create a .env file in packages/app and add VITE_API=http://localhost:3000 crate a .env file in packages/api and add REFRESH_TOKEN_SECRET,ACCESS_TOKEN_SECRET with any random value.

  • clone git clone https://github.com/soulsam480/pdf-donkey.git
  • install deps
yarn
  • Install postgres and add .env variables.
sudo apt update
sudo apt install postgresql postgresql-contrib

sudo -u postgres createuser --interactive
# name: username
# password: userpassword
# hit yes on all questions

createdb db_name # or your db name must be same with linux user name
# or sudo -u postgres createdb your_db_name

# needed to create extensions
grant all privileges on database db_name to user_name 

# change user password for new postgres user
alter user user_name with password 'new_password'

# to use postgres properly in ubuntu we need to add a user 
sudo adduser user_name # or your username, should be same with postgres user-role and db name

sudo -u user_name psql # log in to postgres with username

# install uuid extension
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
  • Add .env variables
PGRES_USER=
PGRES_PASS=
PGRES_HOST=
PGRES_DB=
  • Run it
# start server
yarn serve # starts both app and api

# build for deployment
yarn build

Any contributions are welcome. Reach me on soulsam480@hotmail.com

About

On demand pdf generation with custom templates, variables. PDF monkey but open-source with support for self hosting, docs: https://donkey-docs.sambitsahoo.com/

https://donkey.sambitsahoo.com/

License:MIT License


Languages

Language:TypeScript 93.7%Language:JavaScript 2.7%Language:CSS 2.4%Language:HTML 1.0%Language:Shell 0.1%