This Application provides a setup to get your CRM & Lead Management working in Vite with HMR and some ESLint rules. Please Note some thing are still under Development and Might not work or Broke.
- Lead Scoring: Uses machine learning (Logistic Regression) to rank leads based on conversion probability, with tailored contact strategies.
- Client Dashboard: Visualizes client data with summary cards, a pie chart for status, a timeline of activities, and a detailed grid.
- Contact Hub: Enables email, WhatsApp messaging, Skype calls, and note-taking for seamless client interactions.
- Unified API: Single Flask backend serving all endpoints (
/api/grid-data,/api/lead-scoring,/api/clients) on port 5000.
- Backend: Flask, Pandas, Scikit-learn, SQLite
- Frontend: React, TypeScript, Material-UI, MUI X-Charts, MUI X-DataGrid
- Tools: Vite, Node.js, Python
- Python 3.8+
- Node.js 16+
- SQLite (for
crm.db) - Access to
Lead Scoring.csv(sample data provided)
-
Clone the Repository:
git clone https://github.com/Nimittxo/Crystallize.git cd Crystallize -
Backend Setup:
cd backend python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate (If you want Virtual env, can go with simple installation as well) OR simply do: pip install -r requirements.txt
-
Frontend Setup:
cd ../frontend npm install -
Data Setup:
- Place
Lead Scoring.csvinbackend/(or update path inapp.py). - Ensure
crm.dbis inbackend/(schema:grid_datatable). - PLEASE NOTE:
crm.dbis has mock data if you want your data to be there replace it with yourcrm.db - The
app.pywill handle if you don't havecrm.dbwilll create It's own.
- Place
-
Start Backend:
cd backend source venv/bin/activate # On Windows: venv\Scripts\activate Or Simply: python app.py
- Runs on
http://localhost:5000.
- Runs on
-
Start Frontend:
cd frontend npm run dev- Runs on
http://localhost:5174(or as shown in terminal).
- Runs on
-
Access:
- Open
http://localhost:5174in your browser. - Navigate to
/leads,/clients, or/contact.
- Open
GET /api/grid-data: Fetches randomized grid data from SQLite.GET /api/lead-scoring: Returns ML-scored leads with conversion probabilities.GET /api/clients: Delivers client summaries, status counts, and activities.- Note Please handle the HTTP request from your end Because Sometimes 2 or more APIs can run or clash over a single request
- Example:
api/clientsrun over5001soapi/lead-scoringalso running on5001port
- Built in 12 hours, prioritizing functionality over polish.
- Lead data uses provided
Lead Scoring.csv; automation limited by hackathon constraints. - Contact page includes Skype calls (ID:
live:.cid.1f985563efdb9dcf) and note persistence vialocalStorage. - Headover to
components/ContactPage.tsxand change or modify things accordingly for the page to work.
MIT License
You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default tseslint.config({
plugins: {
// Add the react-x and react-dom plugins
'react-x': reactX,
'react-dom': reactDom,
},
rules: {
// other rules...
// Enable its recommended typescript rules
...reactX.configs['recommended-typescript'].rules,
...reactDom.configs.recommended.rules,
},
})

