A communication portal for SaskTel Made by Quinn Bast and Dakota Fisher
The Website TelPort is a client for SaskTel customers to manage and update home telephone features such as those listed below. Additionally the site aims to provide a web-browser base platform for communication to PSTN numbers and other logged in users. With the possibiity of video based communications being attainable with further development.
- Call Logs
- Call Forwarding
-Always
- Busy
- No Answer
- Not Reachable
- !Selective
- Account Profile
- Feature Access Codes
- Do Not Disturb
- Third-party Voicemail Support
- Voice Messaging Settings
- Calling Number Delivery
- Calling Name Delivery
- Call Waiting
- Schedules
- Custom Contacts / Personal Directories
- Call Rejection
- Selective
- Anonymous
In order to use the project, a python virtual environment must be created in order to ensure that this project is running off of its own dependencies of python. If you are setting up the project in PyCharm, a virtual environment is automatically created for the project. However, if you are not using PyCharm, a virtual environment needs to be created.
- Close any open projects.
- Create a new project and "Checkout from Version Control"
https://github.com/QuinnBast/SaskTel-Communication-Portal.git
- Ensure that a local virtual environment is created for the project in your project's settings (File->Settings->Project Interpreter)
- click the dropdown and click "select all"
- click the plus sign in the upper right corner, and then click apply.
- That's all, PyCharm will generate the rest.
- Clone the github repository into the destination of your choice.
- Within the root folder of the repository, open the python command terminal
- Check to see if you have pip installed
pip -h
- If the help appears, pip is installed, if not, install pip
pip install virtualenv
virtualenv venv
venv\Scripts\activate
-- This may need to be run from the windows command prompt instead of the python terminal
- Open a terminal and navigate to the root directory of the project
- Execute
pip install -r requirements.txt
- Ensure that node.js is installed in order to access the javascript package manager npm.
- No addons need to be installed during this time, the basic LTS version will suffice.
- If you had to install Node.js, restart PyCharm or Your Python CMD window.
- Navigate back to the project root directory on the Terminal window.
- Execute
cd frontend
- Execute
npm install
- Within the project navigate to the
/REST/config/ProductionConfig.py
file. - Generate a secret key of any length and change the JWT_SECRET_KEY field.
- Navigate to the
/REST/config/Config.py
file. - Ensure the configuration settings within the general config file are appropriate.
In order to execute the project, all of the javascript dependencies, css libraries, etc must be packed into a bundle in order to prevent chain dependencies. Ensure you are in the frontend with cd frontend
- Generate the bundled package by running
npm run watch
watch
is a custom script to bundle the front end files automatically. It will monitor for changes to files and automatically rebuild the bundle if a change is detected. This command will watch and rebuild the bundle untilCtrl + C
is pressed.
- Generate the bundled package by running
npm run prod
prod
is a custom script that will bundle the webpack files and dependencies once.
The flask server can be ran inside of PyCharm to start a local web server where your content can be served from flask.
In order to do this, create a new run configuration in PyCharm in the top right and add a new flask server
run configuration.
Set the target
to REST.server
and ensure you are using python 3.6 or above. Once configured click apply
. Run the server with the play button.
At the bottom of PyCharm, open the terminal. Ensure you are in the SaskTel-Communication-Portal
directory. Set the flask environment with the command set FLASK_APP=REST/server.py
. This tells flask where the root file of the server is located. Run the server from the teriminal by executing flask run
TODO - write information on how to configure for apache2 and wsgi.
##You're done!
If you followed all of the steps correctly you should be able to access the website in your browser. For development this will be at http://127.0.0.1:5000/
and for production it will be under your domain or IP address.