This project is a working Project for Premium Collection Point. In this project there are two entities namely branch and manager. My father is a LIC Wealth Manager and I have built this project to help him manage his clients across PAN India.
Challenges Faced By My Father during Pandemic:
Solution To The Problem:
Business Opportunities:
Feature Scope and Improvements:
-Implemented Complete Auth Using Custom Auth Model.
-Used Heroku to Deploy Premium Collection Point
Note: This project is hosted in Heroku as of now. which restricts a request to be fulfilled in max 30 seconds otherwise requests will be terminated. If Bill Check Service don't work properly in Demo then problem is caused due to this reason. I have myself hosted this project in AWS when it was in use. So I highly recommend to host it on AWS if you want to use yourself for some other purposes then demo.
Available at: https://premiumcollectionpoint.herokuapp.com/
admin login details:-- url: https://premiumcollectionpoint.herokuapp.com/admin email: admin@arpansahu.me password: showmecode Branch login details:-- email: branchone@arpansahu.me password: showmecode Manager login details:-- email: managerone@arpansahu.me password: showmecode
Installing Pre requisites
pip install -r requirements.txt
Making Migrations and Migrating them.
python manage.py makemigrations
python manage.py migrate
Creating Super User.
python manage.py createsuperuser
Run Server.
python manage.py runserver
Installing Heroku Cli
checkout: https://devcenter.heroku.com/articles/heroku-cli
Create your account in Heroku.
Inside your project directory
Login Heroku CLI
heroku login
Create Heroku App
heroku create [app_name]
Apart from python build packs add:
https://github.com/heroku/heroku-buildpack-chromedriver (ChromeDriver)
https://github.com/heroku/heroku-buildpack-google-chrome (Chrome)
Push Heroku App
git push heroku master
Configure Heroku App Env Variables
heroku config:se CHROMEDRIVER_PATH= /app/.chromedriver/bin/chromedriver
heroku config:se GOOGLE_CHROME_BIN= /app/.apt/usr/bin/google-chrome
heroku config:set GITHUB_USERNAME=joesmith
...
Install whitenoise
pip install whitenoise
Include it in Middlewares.
MIDDLEWARE = [
# ...
"django.middleware.security.SecurityMiddleware",
"whitenoise.middleware.WhiteNoiseMiddleware",
# ...
]
Create Procfile and include this code snippet in it.
release: ./release-tasks.sh
web: gunicorn djangoProject.wsgi
Create release-task.sh for running multilple commands in run: section of procfile.
python manage.py makemigrations
python manage.py migrate
Make release-task.sh executable
chmod +x release-tasks.sh
To run this project, you will need to add the following environment variables to your .env file
SECRET_KEY=
DEBUG=
DB_HOST=
DB_NAME=
DB_USER=
DB_PASSWORD=
DB_PORT=
EMAIL_USER=
EMAIL_PASS=
ALLOWED_HOSTS=