A website that assists with payroll and invoice management for Cut Cats Courier. Built with NodeJS, Express, React, and MongoDB.
- Install nvm. This project manages its node version via a .nvmrc file.
- Install Docker. Docker is used to run a local db during unit tests.
- Use
nvm
to install the project's node version:
nvm install
- Install dependencies:
npm install
- Run unit tests:
npm test
- Run the development server:
npm run dev
- Navigate to localhost:3001 in your browser.
The production bundle is generated with Neutrino, which is a wrapper around Webpack. This project's .neutrinorc.js file contains the settings controlling how the site gets bundled for deployment. Run the build with the following command:
npm run build
This project contains a .travis.yml file for use with Travis CI (follow their getting started guide if you're unfamiliar). Once you've linked your Travis CI account to this repo, pushes to the develop
and master
branches will cause automatic deployments to staging and production, respectively. This is the recommended way to deploy.
If you'd prefer to handle deployments without Travis CI, perform the following steps (from the Heroku docs on deploying):
- Install the Heroku CLI
- Add a git remote that tracks the Heroku app:
# staging
heroku git:remote -a cutcats-staging
git remote rename heroku heroku-staging
# production
heroku git:remote -a cutcats-production
git remote rename heroku heroku-production
- Deploy e.g. the master branch:
# staging
git push heroku-staging master
# production
git push heroku-production master
Here's a list of the accounts you'll need to access in order to administer the project.
Heroku hosts the website and, via the mLab Heroku addon, the MongoDB database.
Access is granted to members of the Cut Cats "team" on Heroku. Create a personal account if you don't already have one, then ask Tyler to add you to the team.
Payroll and invoice PDFs are stored in S3, and Lambda is used to generate those PDFs.
The AWS account belongs to Cut Cats and is managed by Tyler. Ask to have a user created for you.
Users log in to the accounting site via google.
OAuth client IDs for local, staging, and production website deployments are managed via the Google Developer Console. For administrative access to the developer console, ask Tyler to add your google account to the Cut Cats project.
Cut Cats Google Developer Console
This project's pdfService/
directory contains a standalone piece of software. It's an AWS Lambda function whose purpose is to generate PDFs. This supports the site's payroll and invoicing features, which require that tens or hundreds of PDFs be generated at once upon request.
For details on developing and deploying the PDF service, consult the readme in the pdfService/
directory.