A NextJS application that aims to automatically fill .docx template files with content, either from a DB or an API. Add a template file, choose your entity to patch the file from, preview the patched file in the browser and download it.
Inside the project folder open a terminal and execute the following code to install it's dependencies and run the dev server:
npm install
npm run dev
Prepare the project for a deployment (with Vercel). Just add some environment variables:
TINA_TOKEN=<your value here>
NEXT_PUBLIC_TINA_CLIENT_ID=<your value here>
More info here: Going to Production with Tina Cloud
Please consider a donation! Besides NextJS, this project leverages the following open source libraries:
- tinacms: Visual editing and database
- docxjs Patching .docx files
- mammoth: Converting .docx files to html
- docx-preview: Rendering a .docx preview in the browser
If you want production tests to succeed, you have to disable Vercel's deployment protection. More info here. This shall be considered a temporary fix.