Skip to content

cqtran/Cmput_401_Fence_Friends

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ContentsCavalry Fence Builder
    ◦ URL
    ◦ Video
    ◦ Core Features
    ◦ Requirements
    ◦ Run
    ◦ Run in Debug Mode
    ◦ Run Tests
    ◦ Server Hosting
    ◦ Help
    ◦ Tips
draw.io
    ◦ URL
    ◦ Required for Building
    ◦ Build
    ◦ Run
    ◦ draw.io License

Cavalry Fence Builder

Cavalry Fence Builder is a web app for fence installation companies. It allows a fence business to track projects and financial data, calculate quotes, generate material lists, and send quotes to clients and material lists to suppliers.

URL

https://app.cavalryfence.ca/

Video

https://youtu.be/8YIqtiUu9Xk

Core Features

  • Draw fence diagrams
  • Generate quotes for customers (based on diagrams)
  • Email quotes to customers
  • Generate material lists for suppliers (based on diagrams)
  • Email material lists to suppliers
  • Manually edit quotes
  • Calculate costs and profits (based on diagrams)
  • View a list of projects and filter by status
  • View and edit project information (such as diagrams, quotes, pictures, and notes)
  • View and edit customer information
  • View a summary of the current year's profits/losses
  • Import/export tables (such as for accounting, customer information, and material lists)
  • View and edit prices for fence materials
  • Create individual accounts and associate them with companies
  • The server uses certbot to maintain ssl certificate

Requirements

Python 3

https://www.python.org/downloads/

MySQL

https://dev.mysql.com/downloads/mysql/

mysql-connector

Mac OS (assuming Homebrew is installed):

xcode-select --install
brew install mysql-connector-c
pip3 install mysql-connector==2.1.4

Flask SQLAlchemy

pip3 install flask-sqlalchemy

bcrypt

pip3 install bcrypt

Flask-Security

pip3 install flask-security

WeasyPrint

Mac OS (assuming Homebrew is installed):

brew install cairo pango gdk-pixbuf libffi
brew link --force libffi    # If needed
sudo chown -R `whoami`:admin /usr/local/share/man/man5
brew link fontconfig
pip3 install WeasyPrint

Other:
http://weasyprint.readthedocs.io/en/stable/install.html

Pillow

pip3 install pillow

Requests

pip3 install requests

Run

  1. Start MySQL

  2. In the "fencing" folder, run:

python3 app.py

Run in Debug Mode

  1. Start MySQL

  2. In the "fencing" folder, run:

python3 app.py -debug

Run Tests

  1. Start MySQL

  2. In the "fencing" folder, run:
    must be in the testBranch.

python3 testingapp.py
  1. While that is running, in a new terminal tab/window in the "fencing" folder, run:
python3 -m unittest discover

Server Hosting

The app is hosted using apache2 with the app.conf file in Documentation/Server.
The server uses mod_wsgi-express to help interact between apache2 and Flask.
The server uses certbot to generate and maintain ssl certificates.
The server files are stored at /var/www/CMPUT401-FenceFriends on the server.
The server config file is stored at /etc/apache2/sites-available

The mysql db is currently called testdata. The db must be created before the app is run but the app will create the tables.
The name can be changed in user.txt
The server required these to be installed:

sudo apt-get install apache2  
sudo mod_wsgi-express install-module  
sudo apt-get install python-certbot-apache  

Every time the server is updated,

sudo service apache2 restart

must be run.

This line:

sudo chmod -R 757 /var/www/CMPUT401-FenceFriends/fencing/static/

must also be run in order to change the permission of the static folder to allow for file uploads.

Help

In the "fencing" folder, run:

python3 app.py --help

Tips

View tips

draw.io

This repository contains a modified copy of draw.io.

URL

https://fencythat.cavalryfence.ca/

Required for Building

Apache Ant

Mac OS (assuming Homebrew is installed):

brew install ant

Build

In the drawio/etc/build folder, run:

ant

Run

  1. In the drawio/war folder, run:
python3 -m http.server 8000
  1. While that is running, access drawio with:

http://0.0.0.0:8000/index.html?offline=1&https=0

draw.io License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published