Coder Social home page Coder Social logo

jaydengrubb1 / sharehouse Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 4.26 MB

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

License: BSD 3-Clause "New" or "Revised" License

JavaScript 93.12% HTML 1.12% CSS 5.76%
nodejs reactjs expressjs mysql

sharehouse's Introduction

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

sharehouse's People

Contributors

jaydengrubb1 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.