Spaces:
Sleeping
Sleeping
File size: 3,930 Bytes
b3e5d7a 76089f2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 | ---
title: TAM
emoji: π
colorFrom: blue
colorTo: indigo
sdk: docker
pinned: false
---
# Market Research & Lead Generation App
Automate market research, collect data from multiple sources, and manage leads β all in one place.
## Features
| Feature | Details |
|---|---|
| **Dashboard** | KPI cards, lead status/source charts, conversion rate |
| **Lead Management** | Full CRUD, search, filter, status tracking |
| **CSV/Excel Import** | Auto-detects column names, imports any spreadsheet |
| **LinkedIn Import** | Import your LinkedIn connections or Sales Navigator exports |
| **Web Scraper** | Extract emails, phones, company info from any website |
| **Bulk Scraping** | Queue multiple URLs at once |
| **Export** | Download filtered leads as CSV or Excel |
## Quick Start
```bash
chmod +x start.sh
./start.sh
```
Then open:
- **App**: http://localhost:5173
- **API Docs**: http://localhost:8000/docs
## Manual Setup
### Backend
```bash
cd backend
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reload
```
### Frontend
```bash
cd frontend
npm install
npm run dev
```
## Importing Data
### CSV / Excel
Any spreadsheet works. The importer auto-maps common column names:
| Your column | Maps to |
|---|---|
| Company, Organization, Account Name | company_name |
| Name, Full Name, Contact Name | contact_name |
| First Name + Last Name | contact_name (combined) |
| Email, Email Address | email |
| Phone, Mobile, Telephone | phone |
| Website, URL | website |
| Industry, Sector | industry |
| Company Size, Employees | company_size |
| Location, City, Country | location |
| LinkedIn, LinkedIn URL | linkedin_url |
| Notes, Comments | notes |
Any unrecognized columns are saved as **custom fields**.
### LinkedIn Export
1. Go to **LinkedIn Settings β Data Privacy β Get a copy of your data**
2. Select **Connections** and download the archive
3. Upload `Connections.csv` in the Import tab
4. For Sales Navigator: export lead lists directly as CSV
### Web Scraper
The scraper extracts:
- Email addresses (from mailto links and page text)
- Phone numbers
- Company name (from page title / OG tags)
- LinkedIn profile URL
Options:
- **Extract Emails / Phones / Company Name**: toggle extraction types
- **Follow Internal Links**: crawl the entire site (set max pages)
- **Bulk mode**: paste multiple URLs, one per line
> **Note**: Web scraping is subject to each site's Terms of Service. Use responsibly and respect `robots.txt`. Avoid scraping at high rates.
## Lead Statuses
| Status | Meaning |
|---|---|
| `new` | Just added |
| `contacted` | Outreach sent |
| `qualified` | Confirmed interest / fit |
| `converted` | Became a customer |
| `archived` | Not relevant |
## Tech Stack
- **Backend**: Python, FastAPI, SQLite, SQLAlchemy, pandas, BeautifulSoup
- **Frontend**: React 18, Vite, React Router
## Project Structure
```
TAM/
βββ backend/
β βββ main.py # FastAPI app entry point
β βββ database.py # SQLite / SQLAlchemy setup
β βββ models.py # DB models + Pydantic schemas
β βββ scraper.py # Web scraping engine
β βββ routers/
β β βββ leads.py # CRUD for leads
β β βββ imports.py # CSV/Excel/LinkedIn import
β β βββ scraping.py # Scraping jobs
β β βββ export.py # CSV/Excel export
β β βββ analytics.py # Dashboard stats
β βββ requirements.txt
βββ frontend/
β βββ src/
β β βββ App.jsx
β β βββ api.js # API client
β β βββ components/
β β βββ Dashboard.jsx
β β βββ LeadsTable.jsx
β β βββ ImportWizard.jsx
β β βββ ScraperConfig.jsx
β βββ package.json
βββ start.sh # One-command startup
```
|