LinkedIn Agent
Pricing
Pay per usage
Pricing
Pay per usage
Rating
0.0
(0)
Developer
Jensin
Actor stats
4
Bookmarked
26
Total users
2
Monthly active users
9 months ago
Last modified
Categories
Share
๐ LinkedIn Agent - Clean Architecture
A production-ready LinkedIn scraping agent with a clean, organized architecture. This project has been restructured for better maintainability, scalability, and developer experience.
๐๏ธ Project Structure
linkedin-agent/โโโ ๐ backend/ # Core LinkedIn scraping engineโ โโโ src/ # Main Python source codeโ โโโ tests/ # Backend testsโ โโโ requirements.txt # Python dependenciesโ โโโ Dockerfile* # Backend containersโโโ ๐ frontend/ # React admin dashboardโ โโโ src/ # React componentsโ โโโ package.json # Frontend dependenciesโโโ ๐ infrastructure/ # Deployment & DevOpsโ โโโ docker/ # Docker configurationsโ โโโ scripts/ # Utility scriptsโ โโโ monitoring/ # Monitoring configsโโโ ๐ docs/ # Documentationโโโ ๐ examples/ # Sample inputs & configsโโโ ๐ storage/ # Runtime data (gitignored)
๐ Quick Start
1. Setup Development Environment
# Clone and setupgit clone <your-repo>cd linkedin-agentmake setup-dev# Edit environment variablesnano .env # Add your API keys# Start developmentmake dev
2. Setup Production Environment
# Setup productionmake setup-prod# Edit production settingsnano .env# Deploymake deploy
โจ Key Features
- ๐ฏ Clean Architecture: Separated backend, frontend, and infrastructure
- ๐ณ Docker-First: Multi-stage builds with development and production configs
- ๐ Queue Processing: Redis-based job queue with worker processes
- ๐ Security: JWT authentication and role-based access
- ๐ Monitoring: Health checks and Prometheus integration
- ๐พ Persistent Storage: SQLite database with backup automation
- ๐ Batch Processing: Excel/CSV input with resumable processing
- ๐จ Modern UI: React-based admin dashboard
๐ ๏ธ Development Commands
# Show all available commandsmake help# Backend developmentmake dev # Start backend servicesmake backend-test # Run backend testsmake backend-lint # Run backend linting# Frontend developmentmake frontend-dev # Start frontend developmentmake frontend-test # Run frontend testsmake frontend-lint # Run frontend linting# Full stack developmentmake fullstack-dev # Start both backend and frontend# Productionmake deploy # Deploy to productionmake stop # Stop all servicesmake clean # Clean up containers# Utilitiesmake status # Check service statusmake logs # View service logsmake backup # Create backupmake health # Health check
๐ Documentation
- PROJECT_STRUCTURE.md - Detailed structure guide
- docs/ARCHITECTURE.md - System design and components
- docs/API.md - REST API reference
- docs/DEPLOYMENT.md - Production deployment guide
- docs/DEVELOPMENT.md - Development workflow
๐ง Configuration
Environment Variables
Copy the example environment file and configure:
$cp examples/env.example .env
Key variables:
OPENAI_API_KEY- OpenAI API key for LLM featuresAPIFY_TOKEN- Apify token for proxy and platform featuresSUPABASE_JWT_SECRET- JWT secret for authentication
Input Formats
The system supports multiple input formats:
- JSON Input: Direct LinkedIn URLs
- CSV/Excel: Batch processing with LinkedIn URLs
- REST API: Programmatic job submission
Excel Templates
For Excel batch processing, use the provided templates:
examples/linkedin_template.xlsx- Empty template with correct structureexamples/sample_input.xlsx- Example data showing proper format
Excel files must have tabs named:
Company_Profiles- For LinkedIn company pagesIndividual_Profiles- For LinkedIn personal profiles
See docs/EXCEL_FORMAT.md for detailed format requirements.
See examples/ directory for sample inputs.
๐ฆ Usage Examples
CLI Mode
cd backendpython -m src.cli ../examples/input.json
REST API
# Submit jobcurl -F "owner_email=user@example.com" \-F "input_file=@examples/input.csv" \http://localhost:8000/submit# Check statuscurl http://localhost:8000/status/1# Download resultscurl -OJ http://localhost:8000/result/1
Batch Processing
cd backend# Enhanced processor with multi-tab support and URL validation./src/batch_scrape_excel_enhanced.sh ../examples/sample_input.xlsx ../examples/input.json# Legacy processor (single sheet only)./src/batch_scrape_excel.sh ../examples/sample_input.xlsx ../examples/input.json
๐๏ธ Architecture Overview
Backend Components
- API Server: FastAPI REST API for job management
- Worker: Queue processing with Redis
- Crawler: Playwright-based LinkedIn scraping
- Database: SQLite for job persistence
- Agent: LLM orchestration for summarization
Frontend Components
- Admin Dashboard: React-based management interface
- Authentication: Supabase-based auth with role management
- Real-time Updates: WebSocket integration for job status
Infrastructure
- Docker: Multi-stage builds for development and production
- Monitoring: Prometheus and health checks
- Backup: Automated backup system
- CI/CD: Ready for pipeline integration
๐ Security
- Authentication: JWT-based authentication with Supabase
- Authorization: Role-based access control (admin/user)
- Input Validation: Comprehensive input sanitization
- Container Security: Non-root user execution
- Network Security: Internal service communication
๐ Monitoring & Health
Health Endpoints
/health- Full system health check/health/simple- Simple health check/health/ready- Kubernetes readiness probe/health/live- Kubernetes liveness probe
Monitoring
- Prometheus: Metrics collection
- Grafana: Dashboard (optional)
- Logs: Structured logging with rotation
๐ Deployment
Development
make setup-devmake dev
Production
make setup-prodmake deploy
Docker Compose
# Developmentcd infrastructure/dockerdocker-compose up -d# Productiondocker-compose -f docker-compose.prod.yml up -d
๐ค Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
Development Workflow
# Setup development environmentmake setup-dev# Make changes in backend/src/ or frontend/src/# Test your changesmake backend-testmake frontend-test# Format codemake backend-lintmake frontend-lint# Commit and pushgit add .git commit -m "feat: your feature description"git push origin feature/your-feature
๐ License
MIT License - see LICENSE file for details.
๐ Support
- Documentation: Check the
docs/directory - Examples: See
examples/directory for usage examples - Issues: Report bugs and feature requests via GitHub issues
๐ Welcome to the clean, organized LinkedIn Agent!
This restructured project makes development, deployment, and maintenance much easier. The separation of concerns and clear documentation will help you get up and running quickly.