Skip to content
forked from itenium-be/confac

Consultant invoicing: React frontend, Express backend

License

Notifications You must be signed in to change notification settings

svitenium/confac

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

confac

Node v16.10.0

Starting DEV

front/back: npm install followed by npm start

Backend

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

MongoDb

docker run -id -p 32772:27017 -e "MONGO_INITDB_ROOT_USERNAME=admin" -e "MONGO_INITDB_ROOT_PASSWORD=pwd" -v /volume1/docker/mongo-data:/data/db --name confac-mongo mongo:3.6.3

Emailing

Development: Set SENDGRID_API_KEY in src/config/index.ts
Production: Set process.env.SENDGRID_API_KEY

Server Dependencies

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

Deployment

See deploy/deploy.sh

Seeding random data

Configure amounts in backend/src/faker/insertStuff.ts and the mongo creds in backend/src/faker/index.ts.

cd backend
npm run faker

Template testing

Location: ./templates/*.pug

# Compile html
gulp build
gulp watch

# Watch html (http://localhost:8080/)
npx http-server -o ./dist -o

Junction error

npm start fails with weird error when run from a junction.

Parsing error: Unexpected token:

React.FC<P & ButtonWithClickOnceProps>
           ^

About

Consultant invoicing: React frontend, Express backend

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 94.7%
  • SCSS 3.3%
  • JavaScript 0.9%
  • Pug 0.3%
  • Shell 0.3%
  • CSS 0.2%
  • Other 0.3%