A small business-to-business sales customer relationship management application built with Python, Streamlit, SQLite, and optional local artificial intelligence through Ollama.
- 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
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.
Windows:
python -m venv .venv
.venv\Scripts\activatepip install -r requirements.txtYou can start everything with one command:
python run.pyStreamlit will open the application in your browser.
You can also run:
streamlit run app.pyThe 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:3bMake 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.pyUse Acme Technologies as the main demonstration lead:
- Search for
Acme. - Open Acme Technologies.
- Review its lead details and activity history.
- Add a note.
- Move the deal from Discovery to Proposal.
- Create a follow-up task.
- Refresh the browser and show that the changes persist.
- Generate the lead summary.
- Explain that the model receives the current lead, activities, deal, and tasks.
- Explain the fallback and the fact that the artificial-intelligence layer cannot directly modify the database.
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:
- Strong authentication and authorization.
- Systematic evaluation of artificial-intelligence summary quality.
- Privacy and data-handling controls for any customer information sent to an external model.