Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

SalesFlow CRM

A small business-to-business sales customer relationship management application built with Python, Streamlit, SQLite, and optional local artificial intelligence through Ollama.

Features

  • Search and browse leads
  • Open lead details
  • View activities and notes
  • Add notes and activities
  • Move deals through a sales pipeline
  • Create and complete follow-up tasks
  • Persistent SQLite storage
  • Artificial-intelligence lead summaries
  • Local fallback when the artificial-intelligence service is unavailable
  • Artificial intelligence has no direct database write access

Folder structure

salesflow_crm/
├── app.py
├── db.py
├── ai.py
├── run.py
├── requirements.txt
├── README.md
├── .gitignore
└── .streamlit/
    └── config.toml

The SQLite database file salesflow.db is created automatically the first time the application starts.

1. Create a virtual environment

Windows:

python -m venv .venv
.venv\Scripts\activate

2. Install dependencies

pip install -r requirements.txt

3. Run the application

You can start everything with one command:

python run.py

Streamlit will open the application in your browser.

You can also run:

streamlit run app.py

4. Optional: enable a local artificial-intelligence model

The application works without this step by using a deterministic local fallback. For the assessment, a real local language model is better.

Install Ollama from the official Ollama website, then pull a small model:

ollama pull llama3.2:3b

Make sure Ollama is running, then restart the application.

The application calls:

http://localhost:11434/api/generate

The model can be changed without editing the application:

$env:OLLAMA_MODEL="llama3.2:3b"
python run.py

Demo sequence

Use Acme Technologies as the main demonstration lead:

  1. Search for Acme.
  2. Open Acme Technologies.
  3. Review its lead details and activity history.
  4. Add a note.
  5. Move the deal from Discovery to Proposal.
  6. Create a follow-up task.
  7. Refresh the browser and show that the changes persist.
  8. Generate the lead summary.
  9. Explain that the model receives the current lead, activities, deal, and tasks.
  10. Explain the fallback and the fact that the artificial-intelligence layer cannot directly modify the database.

Production decisions

The project intentionally does not include advanced reporting, email integration, calendar integration, complex role management, or multi-tenant architecture. Those are outside the assessment scope.

Before production, the next priorities would be:

  1. Strong authentication and authorization.
  2. Systematic evaluation of artificial-intelligence summary quality.
  3. Privacy and data-handling controls for any customer information sent to an external model.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages