Node v16.10.0
front/back: npm install
followed by npm start
Expects a running mongo with backend/src/config.ts
settings.
Create a development .env
file to change the default config.
# Start dev server
cd backend
cp .env.sample .env
cp -r templates-example templates
npm install
npm start
docker volume create mongodata
docker run -id -p 27017:27017 -e "MONGO_INITDB_ROOT_USERNAME=admin" -e "MONGO_INITDB_ROOT_PASSWORD=pwd" -v mongodata:/data/db --name confac-mongo mongo:3.6.3
Development: Set SENDGRID_API_KEY
in src/config/index.ts
Production: Set process.env.SENDGRID_API_KEY
Fonts need to be present in /usr/share/fonts
for pdf text to be selectable.
For the merging of PDFs, PDFtk needs to be installed.
apt-get install pdftk
cinst -y pdftk-server
See deploy/deploy.sh
Configure amounts in backend/src/faker/faker-config.ts
and the mongo creds in backend/src/faker/index.ts
.
cd backend
npm run faker
Location: ./templates/*.pug
# Compile html
gulp build
gulp watch
# Watch html (http://localhost:8080/)
npx http-server -o ./dist -o
npm start
fails with weird error when run from a junction.
Parsing error: Unexpected token:
React.FC<P & ButtonWithClickOnceProps>
^
The e-invoices generated by confac should comply with the Peppol BIS Billing 3.0 standard defined by the EU. To doublecheck if the created xml does follow this protocol, you can use this tool. Choose 'OpenPeppol UBL Invoice (2023.11) (aka BIS Billing 3.0.16)' as the ruleset. This is the most current ruleset at the time of writing. Release notes and the general xml structure can be consulted here