https://github.com/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/
https://github.com/soulsam480/pdf-donkey
express liquidjs pdf pdf-converter pdf-donkey pdf-generation react template-engine
Last synced: about 1 year ago
JSON representation
On demand pdf generation with custom templates, variables. PDF monkey but open-source with support for self hosting, docs: https://donkey-docs.sambitsahoo.com/
- Host: GitHub
- URL: https://github.com/soulsam480/pdf-donkey
- Owner: soulsam480
- License: mit
- Archived: true
- Created: 2021-03-27T05:32:50.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-10-16T15:15:40.000Z (over 4 years ago)
- Last Synced: 2025-04-02T21:53:18.206Z (about 1 year ago)
- Topics: express, liquidjs, pdf, pdf-converter, pdf-donkey, pdf-generation, react, template-engine
- Language: TypeScript
- Homepage: https://donkey.sambitsahoo.com/
- Size: 2.44 MB
- Stars: 9
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
   [](https://app.netlify.com/sites/pdf-donkey/deploys)
PDF monkey but open-souce.
## Status
> ### Donkey API has been shut down
> ### The web app is still running
> ### If you want to use it please see [run it locally](#run-it-locally)
[Changelogs](./CHANGELOG.md)
[Donkey API routes (not perfect)](./packages/api/ROUTES.md)
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`](https://classic.yarnpkg.com/en/docs/workspaces/).
> 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
```bash
yarn
```
- Install postgres and add `.env` variables.
```bash
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
```bash
PGRES_USER=
PGRES_PASS=
PGRES_HOST=
PGRES_DB=
```
- Run it
```bash
# start server
yarn serve # starts both app and api
# build for deployment
yarn build
```
Any contributions are welcome. Reach me on [soulsam480@hotmail.com](mailto:soulsam480@hotmail.com)