Skip to content

A simple web app for storing and splitting receipts in a sharehouse

License

Notifications You must be signed in to change notification settings

JaydenGrubb1/sharehouse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sharehouse

A simple web app for storing and splitting receipts in a sharehouse

Note. This document is still a work in progress and may be missing sections or steps.

Table of Contents

Features

  • Receipt tracking and history
  • Payment tracking and history
  • Email and Push notifications
  • Automatic cost distribution
  • Distribution offsets
  • Automatic debt balancing
  • Password authentication
  • Clean and minimalistic UI
  • Mobile optimized
  • Rich JSON REST API
  • JWT session management
  • Easy configuration via .env file
  • Light and dark themes

Comming Soon

  • Spending statistics
  • Setup script
  • Progressive Web App support
  • Docker deployment option

Screenshots

Light and Dark Themes

Account Form

Create Receipt Form

Tech

Name Description
bcrypt Password-hashing library
Express Back-end web app framework
Knex.js SQL query builder
MySQL Relational database management system
Node.js Back-end JavaScript runtime environment
Nodemailer Node library for sending e-mails
React JavaScript library for building user interfaces
reactstrap React component library for Bootstrap
web-push Node library for sending push notifications

Setup

Standalone Deployment

For this simple deployment, we will use nginx as a reverse proxy as well as to serve the front-end client. Additionally we will use the pm2 node package to serve the api. Tested on Ubuntu 21.10.

1. Download and install required software

sudo apt update
sudo apt install nodejs nginx mysql-server
npm install pm2 -g

2. Download sharehouse source

git clone https://github.com/JaydenGrubb1/sharehouse.git
cd sharehouse

3. Generate VAPID keys

node server/gen-vapid.js

Example output:

{
	publicKey: 'BIqoBJhEX9Exp9XOUu1lsB6MNti_Wz_6p0OB5WRowD9NebjIiixltxmBYzWzoLQemuqYmaRvU7QiW9e0-AK2Jrk'
	privateKey: 'PeIapvjJO2VMEkoFbi95gtPo3kF0YcrNYY0_Yr_xVm4'
}

3. Configure back-end server

cp docs/example.env server/.env
nano server/.env

Change the values of the variables in the .env file as needed, using the comments as a guide.

4. Run back-end server

cd server
npm install --production
sudo pm2 start "npm run production" --name "api"
sudo pm2 save
cd ../

You can test if the back-end is running and working by going to the test page in your browser. By default this can be found at http://localhost:3001/test

Example output in browser:

{
	"error": false,
	"message": "Test completed succesfully at 3/1/2022, 7:23:34 AM"
}

5. Build front-end client

cd client
npm install --production
npm run build
cd ../

6. Move front-end client

mkdir /var/www/sharehouse
mv client/build /var/www/sharehouse/html
sudo systemctl restart nginx

Docker Deployment

coming soon...

License

BSD-3-Clause License

About

A simple web app for storing and splitting receipts in a sharehouse

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published