scippyCRM v0.0.2: a (B2B) CRM application built with Flask

in #utopian-io6 years ago (edited)

scippyCRM v0.0.2: a (B2B) CRM application built with Flask

scippycrm-logo.png

Repository

https://github.com/realScipio/scippycrm

Commits

Because I had to carefully re-structure the whole application via Blueprints, plus to add more detailed commit comments, I've added quite a few commits:
f1a615bcc32065b9b78e8e0d586ae7963536e637
086ae7660e2567a773d6a6a9e64b3f95009f408e
c1e82434cb5fe07bf9d4d9d3c4a31a1ea424cd20
ea53340252543b127bdcd5ddb25abaece51b940f
8c1dcce7f207be71f21c4c1c907b8d4403efa588
aacac05fead2000bfba83880d1a76868d6f2854e
c78e6cf1a24dce87d70d3b6f5d90811752d2e040
61356789df7293c49582a11bbccb7d64c14028b9
2fb62aeaa7fea807cd00b14c0dd9a1434fb8b5bf
a58c2d683fe6ca169b9b65bed21ca44d7be80110
3822aa3c495705cf6277d59555776a591edd35e9
4f975305d00e668dd217d48f86fe7430015a2b83
9013cfe8fcc39fba5a267cc4777e5a391f56c106
a78f808cf3279aae0680c8458b4737839e5ffa23
4d06793ef5dac0a78dee71921c06f43379420749
aff08868062b17ccac7940a8983141d8a3c4e8c6
f267b82f07e2784e97089b0b9a35024d58fd4a60

What is scippyCRM about?

scippyCRM is a B2B Customer Relationship Management application. I decided to Open Source scippyCRM because even though I will use it myself, it might also be very helpful to others, and while I'm continuously adding more functionality to the application, other Open Source enthusiasts might decide to join me in development efforts! scippyCRM is intended to be used by non-tech commercial people, e.g. in marketing and / or sales. Therefore (almost?) all functionality needs to be available via the GUI. To begin with, I'll be focusing purely on the browser, but since Flask is also a suitable framework for APIs, maybe over time I will add support for that as well.

Why did I create v.0.0.2 ?

In iteration v.0.0.2, I've focused on structuring the application code via Flask Blueprints and an Application Factory (well, the latter was technically already present in v.0.0.1, but just about all Python code was still positioned in __init__.py.) Application Factories allow for creating the Flask application object within a function (create_app()), which has the advantage (at a later stage) to test with different settings for different application instances, as well to run different or even multiple identical versions of the application in the same application process.

Blueprints in Flask are well-suited for larger applications. Also different Blueprints can have different (sub) templates / template filters / static files. In the current state, the application isn't yet that large, but still it seems smart to restructure the application right now, instead of a complex overhaul later on.

On the inititial (introduction) iteration, @amosbastian asked me why I didn't implement Blueprints right away. My answer to that, is that I was still thinking about a divisional or a functional approach to the Blueprints structure. What I've set-up for the Blueprints architecture on v.0.0.2 suits the application best, I think.

Technology stack

  • Python 3
  • Flask
  • MongoDB

Installation

To run this locally you must have MongoDB and Python3.6 (I've used the Anaconda distribution myself), and git, obviously, installed, and if you have, you can clone the repository via:

$ git clone https://github.com/realScipio/scippycrm.git

If you prefer to use a venv, proceed with

$ cd scippycrm
$ python3 -m venv venv
$ source venv/bin/activate

Then (inside your venv) install the Python packages using:

pip install -r requirements.txt

For running the application, I've now added a main.py file in the root folder, which now loads the config settings from file (flask.cfg) instead of a mapping, so run the app as follows:

export FLASK_APP=main.py
export FLASK_ENV=development
flask run

Then open up your browser, head over to http://localhost:5000/ et voila! (Login with admin:admin, or via your own login credentials).

Tasks completed for v.0.0.2

  • Blueprint- & Application Factory enabled architecture (as explained above)

  • display an overview of current "Users"
    I've implemented an overview for the current "Users" in the MongoDB database. Every row contains a "route rule" and a user_id passed as an additional argument to the url_for() redirect. New "Users" can be added via the + sign on the right hand-side.

  • add a new "User" & update/change "User" fields
    Because scippyCRM isn't intended to be used on a public domain, yet as stand-alone or in an intranet/extranet context, and is an "Admin / Mid-End Only" application, it felt unappropriate to add a "regular" registration route where new system users could sign up: in a closed organisational environment, you don't want "others" to sign up, of course.

Instead, I've chosen the mechanism to login via admin:admin on a clean install, create a user account (for yourself or for a colleague) from within the application, and from that point on you cannot login with the default admin:admin login anymore. The Passlib password hashing library was used for hashing the user passwords. For iteration v.0.0.2, I've chosen to disable password editing for existing users. I'm thinking about implementing User Roles, so that both a logged-in user can change their own User Profile as well as Power Users to change all User Accounts. To do so, I also need to implement a "Read-Only" mode (as per the roadmap), for read-only viewing colleague user (profile) data.

  • login via user['username']:user['password'] if users.count() > 0:
    As explained above.

A few screenshots of the GUI thus far:

(1) The Login screen

1.png

(2) The Organisations overview screen, which also allows for adding new Organisations via the + sign at the top right

2.png

(3) Inserting / Updating individual Organisational data

3.png

(4) The Users overview screen, which also allows for adding new Users via the + sign at the top right
(PS: that's not my real email address shown in there! ;-) )

4.png

(5) Adding a new User to the system

5.png

Roadmap

Some of the planned roadmap milestones include:

  • architecture-wise, I will modularize the (future) application components with Flask Blueprints
  • add functionality for multiple System Users
  • add functionality for "Employees / Contactpersons", that work for a given "Organisation"
  • add functionality for "Contact history" for a given "Organisation" & "Employee"
  • add functionality for "Task management" (what to do when for who), integrated with "Contact history"
  • add a generic Overview Pager, to "visually step through / browse" large chunks of Overview data
  • add Read/Write View functionality for Form Blocks
  • add custom-built Responsive Design View @media queries, for system users using the application via mobile / on the road
  • add pre-defined Data Filters
  • add support for Overview Field Ordering (asc / desc)
  • add various Data Import / Export functionality via the GUI (DB dumps, CSV exports, etc.)
  • add "Sales Opportunity Tracker"
  • add "Document Generator", e.g. to semi-automatically compose Sales Offers and Mailings & export via PDF
  • add Visual Graphs to the "Dashboard"
  • add "Visual Field Generator", to add and manage Data Components via the GUI instead of programmatically
  • etc.!

Feature Requests

Always feel free to suggest new / enhanced features, or UI changes for example!

Contributing

If you want to contribute, then please read CONTRIBUTING.md.

My GitHub Account

https://github.com/realScipio

Sort:  

Thanks for the contribution, @scipio! Good to see you have started using Blueprints!

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Thank you, scipio. Upvoted and resteemed!

@ArtTurtle is an upvote bot run by @Artopium dedicated to upvoting your art, music, fashion, video and books. Find out how you can get an upvote for every creative post you make by visitng @ArtTurtle and reading the latest report.

Hey @scipio
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.033
BTC 64230.75
ETH 3149.35
USDT 1.00
SBD 3.85