Home
Softono
k

kaymen99

Professional software vendor delivering innovative solutions on the Softono platform. Specialized in both open-source and proprietary software development.

Total Products
8

Software by kaymen99

sales-outreach-automation-langgraph
Open Source

sales-outreach-automation-langgraph

# AI-Sales-Outreach-Automation ### 👉 Dive into the full article: [**AI Agents + LangGraph: The Winning Formula for Sales Outreach Automation**](https://dev.to/kaymen99/how-ai-automation-can-transform-your-sales-outreach-strategy-aop) ![outreach-automation](https://github.com/user-attachments/assets/2685ef70-ab9f-4177-9b2a-71086f79726b) I built an **AI-powered outreach system** designed to integrate with multiple **CRMs**, automate lead research, and enhance the lead generation process. The system analyzes **LinkedIn data**, company websites, recent news, and social media activities to gather comprehensive insights on potential leads. Based on this information, it generates detailed **analysis reports** that highlight lead challenges, gaps, and opportunities for engagement. The system also creates customized **outreach materials**, including **personalized emails**, **interview preparation scripts**, and **tailored outreach reports** that showcase how our solutions can address the lead's pain points, supported by previous results and case studies. For this project, I created a sample AI marketing agency, **ElevateAI Marketing Solutions**, which focuses on optimizing and automating content strategies and enhancing digital presence using AI. While designed for **ElevateAI**, this system can easily be adapted for any agency or freelancer looking to streamline their lead outreach and improve engagement with prospects. With its customizable features, it offers a powerful, automated approach to lead generation. ## Features ### **Multi-CRM Integration** - Seamlessly connect with popular CRMs like **HubSpot**, **Airtable**, **Google Sheets**, or add your own custom CRM functionality using a standardized schema. ### **Automated Lead Research** - **LinkedIn Profile Scraping**: Automatically collect essential details about the lead and their company from LinkedIn to create a comprehensive profile. - **Company Digital Presence Analysis**: Evaluate the company's website and blog content for insights into their products and services. Additionally, assess their social media activity across platforms like **Facebook**, **Twitter**, **YouTube**, and others. - **Recent Company News Analysis**: Keep track of the latest news and announcements related to the company to gain insights into their current initiatives and challenges. - **Pain Point Identification**: Identify potential challenges or gaps faced by the company, and provide tailored recommendations on how your agency's offerings and services can address them. - **Report Generation**: Generate detailed reports for each analysis, which are saved both locally and in **Google Docs**. A consolidated global research report is created, combining insights from the lead profile, company profile, and digital presence. (You can find examples of the reports in the `/reports` folder.) ### **Lead Qualification** Automatically assess and qualify leads based on the gathered data and your predefined criteria, here are some examples of criteria that I used: - **Digital Presence (Website & Blog)**: Evaluate the quality and relevance of the company’s online presence. - **Social Media Activity**: Analyze the company’s engagement and activity across various social media platforms. - **Industry Fit**: Assess how well the company aligns with your target industries and their current or potential use of **AI** and **automation** in marketing. - **Company Scale and Potential**: Evaluate the company’s size, growth potential, and market expansion indicators such as new hires or funding. *Note: These criteria can be modified according to specific requirements.* ### **Personalized Outreach** - **Customized Outreach Report**: Generate a customized outreach report for each lead, highlighting their challenges or gaps, how your services can address them, and referencing previously obtained results and similar case studies (uses RAG to extract them). The report is saved to **Google Docs** for easy sharing. - **Create Personalized Email**: Craft personalized email templates, including a link to the custom outreach report, to engage qualified leads effectively. - **Prepare Personalized Interview Script**: Generate a tailored interview script, complete with **SPIN** questions, to help prepare for calls with leads and ensure productive conversations. ### **Efficient Workflow** - **Seamless Collaboration**: all generated research and outreach reports are saved both locally and in **Google Docs**, ensuring easy access and collaboration across teams. - **Automated CRM Updates**: Keep your CRM up to date with the latest lead status and links to generated reports, streamlining your outreach efforts. ## System Workflow The system follows the process to manage lead research and outreach efficiently (check the detailed workflow description [here](https://github.com/kaymen99/sales-outreach-automation-langgraph/tree/main/docs/system-workflow.md) and a visual diagram [here](https://github.com/kaymen99/sales-outreach-automation-langgraph/blob/main/workflow.png)): 1. **Fetch Leads**: Connect to your CRM to fetch new leads. 2. **Research & Insights**: - Gather and analyze key information for each lead: - Scrape **LinkedIn profiles**. - Analyze **company digital presence** (website, blogs, social media, recent news). - Generate detailed analysis reports for each lead combining insights from all previous research. (You can find examples of the reports in the `/reports` folder.) 3. **Lead Qualification**: Evaluate each lead based on specific criteria such as **digital presence**, **social media activity**, **industry fit**, or **company scale**. 4. **Outreach Preparation**: For qualified leads, generate personalized outreach materials: - A **customized outreach report** detailing identified challenges faced by the company and how our services can address them, the system will use RAG to fetch similar case studies (from our internal knowledge base) to be referenced in the report. - A **personalized email** tailored to the lead with a link to the outreach report. - A **customized interview script** to prepare for calls with leads. 5. **Update CRM**: All generated research and outreach materials are saved locally and to **Google Docs**, and the CRM is updated with the latest lead status and links to the reports. ### Advantages of This automation - **Automated Lead Research & Qualification**: The system streamlines lead research by gathering insights from LinkedIn, company websites, social media, and more. It ensures every lead is thoroughly evaluated based on criteria tailored to your agency’s needs. - **Increased Outreach Reply Rates & Conversions**: Instead of sending a simple standalone email, the system generates a detailed audit report for each lead, attached to the email. These reports demonstrate that you’ve thoroughly researched their business, identified key challenges, and can provide tailored solutions, supported by relevant case studies. This approach increases the likelihood of positive responses, boosting your outreach reply rates and conversions. - **Time-Saving & Optimized Team Efficiency**: By automating lead research and generating reports with valuable insights, challenges, and recommendations, the system saves time and enhances teamwork. It provides a prepared interview script to help your team engage clients effectively during calls, and the comprehensive reports enable them to quickly craft and present tailored solutions to potential clients. ## Integration with APIs - **Airtable CRM**: To integrate with your Airtable contacts CRM, you must [sign up](https://www.airtable.com/) for an Airtable account and create your own contacts database with the relevant fields. - **HubSpot CRM**: To integrate with your HubSpot contacts CRM, sign up for a [HubSpot account](https://www.hubspot.com/), then create a private app and obtain your API key. [Follow this tutorial](https://www.youtube.com/watch?v=hSipSbiwc2s) for guidance. - **LinkedIn Data**: Scrape profile information using the **RapidAPI LinkedIn Profile Data API**. [Get your API key here](https://rapidapi.com/freshdata-freshdata-default/api/fresh-linkedin-profile-data). - **Google APIs**: Used to access **Google Docs**, **Google Sheets** (needed only when used as CRM source), and **Gmail**. Follow [this guide](https://developers.google.com/gmail/api/quickstart/python) and ensure all required APIs are enabled. - **Google Searches**: Perform web searches using the **Serper API**. [Get your API key here](https://serper.dev). - **LLM**: Leverages **Google Gemini LLM models** (Flash and Pro) and their Embedding model. [Get your API key here](https://ai.google.dev/gemini-api/docs/api-key). ## Tech Stack - **[Langchain](https://python.langchain.com/docs/introduction/)**: Framework for interacting with multiple LLMs like GPT-4, Gemini, LLAMA3 and building AI agents and RAG applications. - **[Langgraph](https://langchain-ai.github.io/langgraph/)**: Framework for building AI agents and automation workflows. ## How to Run ### Prerequisites - Python 3.9+ - Google Gemini API key (or choose other LLM providers like OpenAI or Groq). - Google APIs credentials. - API keys for integrated tools (RapidAPI, Serper API). - API keys and configurations for your chosen CRM (check `.env.example` for more information). - Necessary Python libraries (listed in `requirements.txt`). ### Setup 1. **Clone the repository:** ```sh git clone https://github.com/kaymen99/sales-outreach-automation-langgraph.git cd sales-outreach-automation-langgraph ``` 2. **Create and activate a virtual environment:** ```sh python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate` ``` 3. **Install dependencies:** ```sh pip install -r requirements.txt ``` 4. **Set up environment variables:** Create a copy of the `.env.example` file: ```bash cp .env.example .env ``` After running this command, open the new `.env` file and add your API keys as needed. --- ### Start the Application Run the main script to begin automation: ```sh python main.py ``` The system will connect with your CRM to fetch new leads, perform automated research, qualify leads, and generate personalized outreach materials (You can see examples of reports generated, including the personalized email in the `/reports` folder). --- ### Customizing the Automation For developers who wish to integrate their own CRM or customize the behavior of the automation, please refer to the [Customization Guide](./docs/customization.md). The guide covers: - **Add your own service/product data**: The `/data` folder includes agency details and past case studies used in reports, emails, and interviews generation. You should update these files to reflect your own service/product details and your past case studies. - **Integrating Custom CRMs**: Instructions for adding your CRM to the system by extending the base class. - **Customizing Lead Statuses**: Learn how to modify the statuses used to filter and fetch leads. - **Updating CRM Fields**: Tailor the functions in the `OutReachAutomationNodes` class to handle different CRM field names or additional fields. - **Customizing Prompts**: Update the prompts used for qualifying leads, generating reports, personalizing emails, and preparing interview questions. --- ## Contributing Contributions are welcome! Please open an issue or submit a pull request for any improvements or features you’d like to see. ## Contact For questions or suggestions, contact me at `[email protected]`.

Workflow Automation Sales & Outreach
311 Github Stars
langgraph-email-automation
Open Source

langgraph-email-automation

<!-- Title: Customer Support Email Automation System | Langchain/Langgraph Integration Description: Automate customer support emails with our system built using Langchain/Langgraph. Features include email categorization, query synthesis, draft email creation, and email verification. Keywords: Customer support automation, email automation, Langchain, Langgraph, AI email agents, Gmail API, Python email automation, email categorization, email verification, AI agents, AI tools Author: kaymen99 --> # 🚀 **Customer Support Email Automation with AI Agents and RAG** ## 📩 **FULL TUTORIAL: Build AI-Powered Email Automation Using AI Agents + RAG!** 👉 [Read Now](https://dev.to/kaymen99/boost-customer-support-ai-agents-langgraph-and-rag-for-email-automation-21hj) 🎯 ![customer-support-ai-automation](https://github.com/user-attachments/assets/eb061276-0579-4e28-9360-482c8da33a9d) ## **Introduction** In today's **fast-paced environment**, customers demand **quick, accurate, and personalized responses**—expectations that can overwhelm traditional support teams. Managing large volumes of emails, categorizing them, crafting appropriate replies, and ensuring quality consumes **significant time and resources**, often leading to **delays or errors**, which can harm customer satisfaction. **Customer Support Email Automation** is an **AI solution** designed to enhance **customer communication** for businesses. Leveraging a **Langgraph-driven workflow**, multiple **AI agents** collaborate to efficiently manage, categorize, and respond to customer emails. The system also implements **RAG (Retrieval-Augmented Generation)** technology to deliver **accurate responses** to any business or product-related questions. ## **Features** ### **Email Inbox Management with AI Agents** - **Continuously monitors** the agency's Gmail inbox - **Categorizes emails** into '**customer complaint**,' '**product inquiry**,' '**customer feedback**,' or '**unrelated**' - **Automatically handles irrelevant emails** to maintain efficiency ### **AI Response Generation** - **Quickly drafts emails** for customer complaints and feedback using **Langgraph** - Utilizes **RAG techniques** to answer **product/service-related questions** accurately - **Creates personalized email content** tailored to each customer's needs ### **Quality Assurance with AI** - **Automatically checks** email **quality, formatting, and relevance** - **Ensures every response** meets high standards before reaching the client ## **How It Works** 1. **Email Monitoring**: The system **constantly checks** for new emails in the agency's Gmail inbox using the **Gmail API**. 2. **Email Categorization**: **AI agents** sort each email into **predefined categories**. 3. **Response Generation**: - **For complaints or feedback**: The system **quickly drafts** a tailored email response. - **For service/product questions**: The system uses **RAG** to retrieve **accurate information** from agency documents and generates a response. 4. **Quality Assurance**: Each draft email undergoes **AI quality and formatting checks**. 5. **Sending**: **Approved emails** are sent to the client **promptly**, ensuring **timely communication**. ## System Flowchart This is the detailed flow of the system: [![](https://mermaid.ink/img/pako:eNqllEuP2jAQx7-KZa6AgAB5HFrxFlJBXbarIsIeTDwBi2CntrPAEr57TRIoW_Wwojk585_fvJLxCQeCAvZwGIl9sCFSox_9JUfm6fgTwZkWEo0mnfE3NOYrcXgtNFSpfEHd01jlZjTYxfr49Zyr3YuaTgWawt4ohEUqRQt_wCn6LkUASr3eOw5FYpQXTrjagwR6Q3p-j2hYC8neITcWXC_jXriEyDjQFHXv7b1EabEDiXpiF0eEcY1ME0MAuiLBNkV9_6dk2uidNXD9IaQpjyaBRgP-K2HymKKB_3zkegPqUsJTApKBQqEJN-uMCnKQzWLuj0CjTtYCCqXY3XnMM49_pu1n0tA3iUU4A0L_0odZWZ04luINUjTyn4HTD7PIPaamO4Vm8MYUE9z0mIujQjzonMkmlUtKHyMwHzJkUeSVQjcsKy3FFryS4zjFubJnVG-8RnwoByIS0ivVarV7vFvgq9Uf3LKsz-K9a_bV6hG8f80ePoQP_i_78DY69xF8VOBu-BA-v2Z_DF8UOKX08zguY7NW5j-i5sI4XcItsdmNHSyxZ46UyO0SL_nZ-JFEC7M5Afa0TKCMpUjWG-yFJFLmLYmp2ds-I2tJdjdrTDj2TviAvUbLrjYtt2G1XLdVr7XtZhkfjbnqNJyW4zZt17LdpuO0z2X8LoQJUau6rbbt2la7btmWW6s3s3iLTMxLAHq5zCb5dRcIHrI1Pv8GXQeX4g?type=png)](https://mermaid.live/edit#pako:eNqllEuP2jAQx7-KZa6AgAB5HFrxFlJBXbarIsIeTDwBi2CntrPAEr57TRIoW_Wwojk585_fvJLxCQeCAvZwGIl9sCFSox_9JUfm6fgTwZkWEo0mnfE3NOYrcXgtNFSpfEHd01jlZjTYxfr49Zyr3YuaTgWawt4ohEUqRQt_wCn6LkUASr3eOw5FYpQXTrjagwR6Q3p-j2hYC8neITcWXC_jXriEyDjQFHXv7b1EabEDiXpiF0eEcY1ME0MAuiLBNkV9_6dk2uidNXD9IaQpjyaBRgP-K2HymKKB_3zkegPqUsJTApKBQqEJN-uMCnKQzWLuj0CjTtYCCqXY3XnMM49_pu1n0tA3iUU4A0L_0odZWZ04luINUjTyn4HTD7PIPaamO4Vm8MYUE9z0mIujQjzonMkmlUtKHyMwHzJkUeSVQjcsKy3FFryS4zjFubJnVG-8RnwoByIS0ivVarV7vFvgq9Uf3LKsz-K9a_bV6hG8f80ePoQP_i_78DY69xF8VOBu-BA-v2Z_DF8UOKX08zguY7NW5j-i5sI4XcItsdmNHSyxZ46UyO0SL_nZ-JFEC7M5Afa0TKCMpUjWG-yFJFLmLYmp2ds-I2tJdjdrTDj2TviAvUbLrjYtt2G1XLdVr7XtZhkfjbnqNJyW4zZt17LdpuO0z2X8LoQJUau6rbbt2la7btmWW6s3s3iLTMxLAHq5zCb5dRcIHrI1Pv8GXQeX4g) ## Tech Stack * Langchain & Langgraph: for developing AI agents workflow. * Langserve: simplify API development & deployment (using FastAPI). * Groq and Gemini APIs: for LLMs access. * Google Gmail API ## How to Run ### Prerequisites - Python 3.7+ - Groq api key - Google Gemini api key (for embeddings) - Gmail API credentials - Necessary Python libraries (listed in `requirements.txt`) ### Setup 1. **Clone the repository:** ```sh git clone https://github.com/kaymen99/langgraph-email-automation.git cd langgraph-email-automation ``` 2. **Create and activate a virtual environment:** ```sh python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate` ``` 3. **Install the required packages:** ```sh pip install -r requirements.txt ``` 4. **Set up environment variables:** Create a `.env` file in the root directory of the project and add your GMAIL address, we are using the Groq llama-3.1-70b model and the Google gemini embedding model so you must also get API keys to access them: ```env [email protected] GROQ_API_KEY=your_groq_api_key GOOGLE_API_KEY=your_gemini_api_key ``` 5. **Ensure Gmail API is enabled:** Follow [this guide](https://developers.google.com/gmail/api/quickstart/python) to enable Gmail API and obtain your credentials. ### Running the Application 1. **Start the workflow:** ```sh python main.py ``` The application will start checking for new emails, categorizing them, synthesizing queries, drafting responses, and verifying email quality. 2. **Deploy as API:** you can deploy the workflow as an API using Langserve and FastAPI by running the command below: ```sh python deploy_api.py ``` The workflow api will be running on `localhost:8000`, you can consult the API docs on `/docs` and you can use the langsergve playground (on the route `/playground`) to test it out. ### Customization You can customize the behavior of each agent by modifying the corresponding methods in the `Nodes` class or the agents prompt `prompts` located in the `src` directory. You can also add your own agency data into the `data` folder, then you must create your own vector store by running (update first the data path): ```sh python create_index.py ``` ### Contributing Contributions are welcome! Please open an issue or submit a pull request for any changes. ### Contact If you have any questions or suggestions, feel free to contact me at `[email protected]`.

AI Agents Help Desk & Support
256 Github Stars
personal-ai-assistant
Open Source

personal-ai-assistant

# AI Personal Assistant **Imagine a personal assistant in your pocket 📱 that handles your emails 📧, schedule 📅, to-do lists ✅, keeps you updated on Slack messages 💬, and performs online research for you 🔍—all through your favorite messaging app.** **That's EXACTLY what this AI Personal Assistant does! 🤖✨** <p align="center"> <img src="https://github.com/user-attachments/assets/c284eb2d-1909-48cd-9ab7-b0fbe4709308" alt="personal_assistant"> </p> This project provides a personal assistant agent that manages tasks related to your email inbox, calendar, Notion to-do list, Slack interactions, and handles any research you may have. The assistant communicates with you via your preferred communication channel **(Telegram, Slack, or WhatsApp)**, keeping you informed about your schedule, tasks, emails, messages, and helping with research topics, people, or even companies. The personal assistant is a **hierarchical multi-agents** system with a **supervisor agent** (manager) and several sub-agents that handle specific tasks and tools for efficient task management. ## Overview ### Main Agent: Assistant Manager The Assistant Manager is your personal assistant that orchestrates the tasks and communication between you and the sub-agents. The manager is responsible for: - Receiving and analyzing your messages from your chosen communication channel. - Delegating tasks to the appropriate sub-agent (Email, Calendar, Notion, Slack, or Researcher). - Communicating updates, messages, and any queries back to you via your preferred channel. ### Sub-Agents The manager agent can communicate with five specialized sub-agents: 1. **Email Agent:** Can handle all your email-related tasks, including sending emails, retrieving specific emails, and checking for important messages from your contacts list. 2. **Calendar Agent:** Can manage your calendar by creating new events and retrieving and checking your scheduled events. 3. **Notion Agent:** Can manage your to-do list in Notion, helping you add, remove, or check tasks as needed. 4. **Slack Agent:** Can manage your Slack interactions by reading messages from channels or DMs and sending messages on your behalf. 5. **Researcher Agent:** Can perform web research, scrape websites, and gather information from LinkedIn profiles to assist with research tasks. All the sub-agents report back to the Assistant Manager after completing their respective tasks. ## Tech Stack - **LangGraph & LangChain**: Frameworks used for building the AI agents and interacting with LLMs (GPT-4, Llama 3, Gemini). - **LangSmith**: For monitoring the different LLM calls and AI agents' interactions. - **Google APIs**: Provides access to Google services like Calendar, Contacts, and Gmail. - **Notion Client**: Interface for interacting with Notion to manage and update to-do lists. - **Slack SDK**: For interacting with Slack, sending and receiving messages. - **Tavily Search API**: For performing web searches. - **Telegram API**: Depending on your choice of communication channel. - **WhatsApp API via Twilio Sandbox (for testing)**: A way to integrate WhatsApp communication. ## How to Run ### Prerequisites - Python 3.9+ - Your preferred LLM provider API keys (OpenAI, Claude, Gemini, Groq,...) - Google API credentials (for Calendar, Contacts, and Gmail access) - Notion API key - Tavily API key (for web research) - Slack Bot User OAuth Token and App Token - Telegram Bot Token (If you want to use telegram) - Twilio Account SID and Auth Token (If you want to test with WhatsApp) - Necessary Python libraries (listed in `requirements.txt`) ### Setup 1. **Clone the repository:** ```sh git clone https://github.com/kaymen99/AI-personal-assistant cd AI-personal-assistant ``` 2. **Create and activate a virtual environment:** ```sh python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate` ``` 3. **Install the required packages:** ```sh pip install -r requirements.txt ``` 4. **Set up environment variables:** Create a `.env` file in the root directory of the project and add your API keys, see `.env.example` to know all the parameters you will need. 5. **Configure Google API credentials:** Follow Google's documentation to set up credentials for Calendar, Contacts, and Gmail APIs. Save the credentials file in your project folder. 6. **Set up Communication Channel:** - **Telegram:** - Create a Telegram Bot: To interact with the assistant via Telegram, you will need to create a Telegram bot and obtain the bot token. Follow this [guide](https://www.youtube.com/watch?v=ozQfKhdNjJU) to create your bot and get the necessary information. - **Slack:** - Create a Slack App: Follow the official Slack documentation to create a new Slack app, add the necessary OAuth scopes (refer to the provided code and documentation for the required scopes). - Install the app to your workspace and obtain your Bot User OAuth Token and App-Level Token. - **WhatsApp (via Twilio Sandbox for Testing):** - **Important Note:** Normally, interacting with the **WhatsApp Business API** requires a **Meta Business Account**. However, for **testing purposes only**, this project utilizes the Twilio WhatsApp Sandbox. - **Twilio Sandbox Limitations:** As stated in the [Twilio documentation](https://www.twilio.com/docs/whatsapp/sandbox), "Use the Twilio Sandbox for WhatsApp for testing and discovery purposes only. You should not use it in production." - **Setup:** 1. Create a Twilio account and obtain your Account SID and Auth Token. 2. Follow Twilio's tutorial to set up the WhatsApp Sandbox: [Twilio WhatsApp Sandbox Setup](https://www.twilio.com/docs/whatsapp/sandbox). 3. Save your Twilio Account SID, Auth Token and Sandbox number in your `.env` file. 7. **Run the project**: - For running the personal assistant on **Slack or Telegram** you'll only need to run: ```bash python app.py ``` - For running the personal assistant on **whatsApp** you'll need to run: ```bash python run app_whatsapp.py ``` This will spin out a local fastAPI server, to enable the communication with the Twilio servers you need to make it public using **Ngrok**: 1. Expose the Webhook URL Using ngrok ```bash ngrok http 5000 ``` 2. Configure Twilio Webhook 1. Go to the Twilio Console > Messaging > Sandbox for WhatsApp. 2. In the Sandbox settings section: Set the "WHEN A MESSAGE COMES IN" URL to your ngrok URL and save your configuration. **You're done now you can talk with your assistant via whatsApp** ### Usage **Communicating with the Assistant**: Simply send a message to your configured communication channel (Telegram, Slack channel, or WhatsApp), and the assistant will analyze the message, delegate the tasks to the appropriate sub-agents, and report back to you with the results. ## Contribution Feel free to fork the repository, create a branch, and submit a pull request if you'd like to contribute to the project. ## Contact For any queries or suggestions, please reach out to [[email protected]](mailto:[email protected])

Communication AI Agents
145 Github Stars
Upwork-AI-jobs-applier
Open Source

Upwork-AI-jobs-applier

# UpworkScribe AI: Automated Jobs Application on Upwork **UpworkScribe AI is not just a tool; it's your partner in navigating the competitive world of freelancing, helping you secure more projects and grow your freelance career. 🚀** ## The Challenge of Modern Freelancing The freelance marketplace has undergone a dramatic transformation in the digital age. While platforms like Upwork have opened up a world of opportunities, they have also intensified competition. Freelancers often find themselves spending countless hours searching for suitable projects, tailoring proposals, and crafting unique cover letters. This process can be not only time-consuming but also mentally exhausting, leading to missed opportunities and proposal fatigue. ## How UpworkScribe AI Helps UpworkScribe AI simplifies the freelancing process by acting as your personal assistant. It offers: * **Automatic Job Scanning and Qualification:** Saves freelancers time by identifying and qualifying the most relevant job opportunities. * **Personalized Cover Letter:** automate the Creation of tailored cover letters for each project, increasing the chances of standing out to clients. * **Interview Preparation Support:** Generates materials to help freelancers prepare for client meetings and secure jobs with confidence. * **24/7 Availability:** can be setup to work around the clock, ensuring no opportunities are missed, even when you're offline. * **Cost-Effective:** Offers powerful features at a low cost, making it accessible to freelancers at all levels. * **Support For Multiple LLM Providers:** Can integrate with various large language models, offering flexibility and adaptability to meet different user needs. ## Features ### Jobs Scraping and Classification - **Job Monitoring**: The system scans Upwork for new project listings of the freelancer provided job titles, ensuring freelancer stay up-to-date. - **Intelligent Job Scoring**: Each job receives a score based on various criteria such: match with freelancer experience & skills, budget, duration, client history and past projects on the platform,etc. Only jobs scoring 7/10 or higher proceed for further analysis. ### AI Cover Letter and Interview Script Generation - **Dynamic Cover Letter Creation**: AI agents crafts custom cover letters based on each job description and. - **Personalized Content**: Tailors cover letters to reflect the user’s unique writing style, skills, and relevant experiences. - **Interview Script and Questions**: Prepares a list of potential interview questions and a script for the freelancer, covering job-specific topics to improve interview readiness. - **Keyword Optimization**: Incorporates job-related keywords to enhance proposal relevance and client interest. --- ## How It Works 1. **User Input**: The process starts with the user entering a job title. 2. **Job Scraping**: The system scrapes Upwork for job listings that match the user-provided search queries, gathering relevant opportunities in real-time. 3. **Job Scoring and Filtering**: Each job is scored by an AI agent, and only jobs with a score of 7/10 or higher are presented to the freelancer, filtering out lower-quality matches. 5. **Cover Letter and Interview Preparation**: For strong job matches, the system generates: - A personalized cover letter emphasizing the user’s qualifications and alignment with the job. - A custom interview preparation script including potential questions to prepare the user for discussions with potential clients. 6. **Review and Submission**: The generated cover letter, interview script, and questions are saved for user review, allowing for final adjustments before submission to prospective clients. ### System Flowchart This is the detailed flow of the system: [![](https://mermaid.ink/img/pako:eNqdlMGO2jAQhl_FMlJPoNJyKETtSiEBxGqL2rJ7Sjg49oRYBDuyHegKePc6TlKye1olUiJP8n_zz4xiXzCVDLCH94oUGXoOY4Hs9Ri9aFBoLYrSaPQoE_TMTQ47NBo9ID_aUqsG9FKcpTpUn_Wu5nwnmFuBVIBqGesK6ue8kl1r0Xf07fOX8RWF623g_wmjkGtKFENP8jyqFFzsuwm66MOPhg0uQQb0gFKpXLE_iaEZ6FvXM3DgLyUpaNeStp7RCgQoYsBhflHknBLDpUCBFAaE2XXhjWwzX9FiE0b2ftNW6Lpf3JMG8mSn-ATGgNp1Ncu7Zm191InDuRoXLwz6hH6XoKsi3g5t4chVtCUnQC3uhvuu2GUtrIOVC4JY1KE2r7ltFqU8z70BTdOhNkoewBtMJpNmPTpzZjLva_F3SGUulTcYj8dd3G_wdHbHp9PpR_F5gydJL_egdU-SPnjYuqe98EXrns764Mv_o-uFrxp81s-92WNNEsZYrwlseiXAQ3wEdSSc2dPmUiWMscngCDH27JIRdYhxLG5WR0ojt6-CYs-oEoZYyXKfYS8lubZRWTD744ec2CPr2Ly9_QPS1oVz?type=png)](https://mermaid.live/edit#pako:eNqdlMGO2jAQhl_FMlJPoNJyKETtSiEBxGqL2rJ7Sjg49oRYBDuyHegKePc6TlKye1olUiJP8n_zz4xiXzCVDLCH94oUGXoOY4Hs9Ri9aFBoLYrSaPQoE_TMTQ47NBo9ID_aUqsG9FKcpTpUn_Wu5nwnmFuBVIBqGesK6ue8kl1r0Xf07fOX8RWF623g_wmjkGtKFENP8jyqFFzsuwm66MOPhg0uQQb0gFKpXLE_iaEZ6FvXM3DgLyUpaNeStp7RCgQoYsBhflHknBLDpUCBFAaE2XXhjWwzX9FiE0b2ftNW6Lpf3JMG8mSn-ATGgNp1Ncu7Zm191InDuRoXLwz6hH6XoKsi3g5t4chVtCUnQC3uhvuu2GUtrIOVC4JY1KE2r7ltFqU8z70BTdOhNkoewBtMJpNmPTpzZjLva_F3SGUulTcYj8dd3G_wdHbHp9PpR_F5gydJL_egdU-SPnjYuqe98EXrns764Mv_o-uFrxp81s-92WNNEsZYrwlseiXAQ3wEdSSc2dPmUiWMscngCDH27JIRdYhxLG5WR0ojt6-CYs-oEoZYyXKfYS8lubZRWTD744ec2CPr2Ly9_QPS1oVz) --- ## Tech Stack - **LangGraph & LangChain**: Frameworks used for building AI agents and interacting with LLMs (GPT-4o, Llama 3, Gemini). - **LangSmith**: For monitoring the different LLM calls and AI agents' interactions. - **Playwright**: For scraping and crawling websites. --- ## How to Run ### Setup 1. **Clone the repository:** ```sh git clone https://github.com/kaymen99/Upwork-AI-jobs-applier.git cd Upwork-AI-jobs-applier ``` 2. **Set up environment variables:** Create a `.env` file in the root directory of the project and add your API keys, see `.env.example` to know all the parameters you will need. ### Run Locally #### Prerequisites - Python 3.9+ - Necessary Python libraries (listed in `requirements.txt`) - API keys for LLM models you want to use (OpenAI, Claude, Gemini, Groq,...) #### Running the Application 1. **Create and activate a virtual environment:** ```sh python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate` ``` 2. **Install the required packages:** ```sh pip install -r requirements.txt playwright install firefox ``` 3. **Start the workflow:** ```sh python main.py ``` The application will start scraping job listings, classifying them, generating cover letters, and saving the results. By default, all the generated cover letters will be saved in the `data/cover_letter.txt` file alongside a csv file including all the jobs details. 4. **Test the Upwork jobs scraping tool** by running: ```sh python scrape_upwork_jobs.py ``` --- ### Run in Docker #### Prerequisites - Docker installed on your machine. - API keys for LLM models you want to use (OpenAI, Claude, Gemini, Groq,...) #### Running the Application 1. **Build and run the Docker container:** ```sh docker build -t upwork-auto-jobs-applier-using-ai . docker run -e OPENAI_API_KEY=YOUR_API_KEY_HERE -v ./data:/usr/src/app/data upwork-auto-jobs-applier-using-ai ``` The application will start scraping job listings, classifying them, generating cover letters, and saving the results. By default, all the generated cover letters will be saved in the `data/cover_letters.txt` file. 2. **Test the Upwork jobs scraping tool** in Docker by running: ```sh docker run -e OPENAI_API_KEY=YOUR_API_KEY_HERE -v ./data:/usr/src/app/data upwork-auto-jobs-applier-using-ai python scrape_upwork_jobs.py ``` --- ### Customization - To use this automation for your own profile, just add your profile into `files/profile.md` and remove the example profile. - You can customize the behavior of each AI agent by modifying the corresponding agent prompt in the `prompts` script. ## Contributing Contributions are welcome! Please open an issue or submit a pull request for any changes. ## Contact If you have any questions or suggestions, feel free to contact me at `[email protected]`.

AI Agents Recruitment & ATS
144 Github Stars
local-rag-researcher-deepseek
Open Source

local-rag-researcher-deepseek

# 🚀 **Local RAG Researcher with DeepSeek R1 & Langgraph** ### 👉 **[Learn How to Build a Local RAG Researcher – Step-by-Step Guide Inside!](https://dev.to/kaymen99/build-your-own-local-rag-researcher-with-deepseek-r1-11m) 🚀** I built a **local adaptive RAG research agent** using **LangGraph** and a local **DeepSeek R1 model** running on **Ollama**. This agent act like a deep researcher, designed to gather, analyze, and summarize information based on user instructions. <div align="center"> <img src="https://github.com/user-attachments/assets/5dc34341-3a2f-461c-b66d-46b134fe5bd9" alt="Demo of Local RAG Researcher with LangGraph & DeepSeek"> </div> ## **How It Works** 1. **Generating Research Queries** – The agent takes user input and formulates relevant research questions to find the most useful information. 2. **Retrieving Documents** – It searches a local **Chroma database** to pull relevant documents related to the query. 3. **Evaluating Relevance** – Each document is checked against the original query to ensure it contains meaningful and accurate information. 4. **Expanding Search if Needed** – If the retrieved documents are not sufficient or relevant, the agent can **search the web** for additional sources. 5. **Summarizing Findings** – After gathering all necessary information, the agent processes the data and extracts key insights. 6. **Final Report Generation** – The summarized findings are sent to a **writer agent**, which structures the information into a **detailed and well-formatted report** based on a predefined format. This system allows for an **efficient and adaptive research process**, ensuring high-quality and relevant outputs while minimizing unnecessary or low-value data. ## **Key Features** - **Dynamic Search Through Local Documents** – Efficiently retrieves relevant information from your internal documents. - **Advanced Insight Extraction** – Leverages the reasoning power of **DeepSeek R1** model to evaluate, analyze, and extract the most valuable insights from documents. - **Real-Time Web Search** – Expands research by accessing online sources using **[Tavily API](https://tavily.com/)** when local documents are insufficient. - **Structured Report Generation** – Produces well-formatted reports based on your predefined reporting templates. ## System Flowchart This is the detailed flow of the system: <div align="center"> <img src="https://github.com/user-attachments/assets/5e06e948-c853-47d1-b25e-e3c5ca96b60d" alt="Langgraph Local Deepseek RAG researcher"> </div> ## Tech Stack - **[Ollama](https://ollama.com/)**: Runs the DeepSeek R1 model locally. - **[LangGraph](https://www.langchain.com/langgraph)**: Builds AI agents and defines the researcher's workflow. - **[ChromaDB](https://docs.trychroma.com/)**: Local vector database for RAG-based retrieval. - **[Streamlit](https://docs.streamlit.io/)**: Provides a UI for interacting with the researcher. - **[Tavily](https://tavily.com/)**: For searching the web. ## How to Run ### Prerequisites Ensure you have the following installed: - Python 3.9+ - Ollama - Tavily API key for web searchs - Necessary Python libraries (listed in `requirements.txt`) ### Setup #### Clone the Repository ```bash git clone https://github.com/kaymen99/local-rag-researcher-deepseek cd local-rag-researcher-deepseek ``` #### Create and Activate a Virtual Environment ```bash python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate` ``` #### Install Required Packages ```bash pip install -r requirements.txt ``` #### Set Up Environment Variables Create a `.env` file in the root directory and add necessary credentials: ```ini # Tavily API key for SearchTool (optional) TAVILY_API_KEY="your-api-key" ``` ## Running the Application ### Step 1: Install and Run Ollama Follow the official instructions to [install Ollama](https://ollama.com/download), then pull the DeepSeek R1 model (this project uses the 7b model but you can choose any other [models available](https://ollama.com/library/deepseek-r1)): ```bash ollama pull deepseek-r1:7b ``` ### Step 2: Launch the Streamlit App Run the following command to start the UI: ```bash streamlit run app.py ``` ### Step 3: Visualize in LangGraph Studio (Optional) Since the researcher is built with LangGraph, you can use **LangGraph Studio** to inspect the agent's workflow. To do this, run the following commands: ```bash pip install -U "langgraph-cli[inmem]" langgraph dev ``` ## Customization ### Modify Report Structures - Add custom structures inside the `report_structures` folder. - Select the preferred structure in the UI. ### Using an External LLM Provider By default, the researcher runs locally using the **DeepSeek R1 model** on **Ollama**. However, if you prefer to use a cloud-based LLM provider instead (such as **Cloud DeepSeek R1**, **OpenAI GPT-4o**, or **OpenAI o1**), follow these steps: 1. **Modify the Code**: - Go to `assistant/graph.py`. - Comment the code invoking Ollama model. - Uncomment the section of code that enables external LLM calls. - `invoke_llm` uses **[OpenRouter](https://openrouter.ai)**, which provides access to multiple LLMs. You can choose your preferred model from their [list](https://openrouter.ai/models). 🚀 - You can also modify the `invoke_llm` function to use a single LLM provider instead of **OpenRouter** if you want. 2. **Set Up API Keys**: - Obtain OpenRouter API key from [here](https://openrouter.ai/settings/keys). - Add these keys to your `.env` file in the following format: ```env OPENROUTER_API_KEY=your_openai_key ``` ## **📚 Further Reading & Resources** * Langchain: Building a fully local "deep researcher" with DeepSeek-R1[see](https://www.youtube.com/watch?v=sGUjmyfof4Q) * Langchain: Building a fully local research assistant from scratch with Ollama [see](https://www.youtube.com/watch?v=XGuTzHoqlj8) * LangGraph Template: Multi-Agent RAG Research [see](https://www.youtube.com/watch?v=JLDLANs_m_w) * LangGraph Adaptative RAG implementation [see](https://github.com/langchain-ai/langgraph/blob/main/examples/rag/langgraph_adaptive_rag_local.ipynb) ## Contributing Contributions are welcome! Please open an issue or submit a pull request for any changes. ## Contact If you have any questions or suggestions, feel free to contact me at [email protected].

LLM Tools & Chat UIs Knowledge Bases & RAG
140 Github Stars
ai-web-scraper
Open Source

ai-web-scraper

# AI Web Scraper with Crawl4AI ### 👉 **[Learn How to Scrape and Build Lead Lists Easily with Crawl4AI!](https://dev.to/kaymen99/scrape-any-website-fast-and-cheap-with-crawl4ai-3fj1)** This project is an AI-powered web scraper built with [**Crawl4AI**](https://docs.crawl4ai.com/). It automates **lead generation** by extracting local business (Dentists, restaurents,...) names, addresses, phone numbers, and more from [**YellowPages**](https://www.yellowpages.ca/). With the help of LLMs like GPT-4o, Claude, and DeepSeek, it intelligently processes data and saves it in **CSV files**, making it ready for outreach or analysis! ## Features - **Extract Business Information** – Scrape business names, contact details, and other key data. - **AI-Powered Data Processing** – Use LLMs to clean, format, and enhance the extracted data. - **Customizable Scraper** – Adapt it to different websites and data types. - **Flexible LLM Integration** – Choose from AI models like GPT-4, Claude, and DeepSeek. ## Adaptability This scraper is designed for **YellowPages** but can be used on **any website**. You can change the target URL, modify the AI instructions to adjust how the data is processed, and define new data fields based on your needs. ## Potential Use Cases - **Lead Generation** – Collect business emails, phone numbers, and addresses to build targeted outreach lists. - **Market Research** – Gather real-time industry data to analyze trends and customer behavior. - **Competitor Analysis** – Monitor pricing, services, and customer reviews to stay competitive. - **AI Data Enrichment** – Use LLMs to clean and categorize data for better insights. - **Research & Analysis** – Extract structured data from directories, reports, and other sources for business or academic studies. ## Project Structure ``` . ├── main.py # Main entry point for the crawler ├── config.py # Contains configuration constants (LLM Models, Base URL, CSS selectors, etc.) ├── models │ └── business.py # Defines the Local Business data model using Pydantic ├── src │ ├── utils.py # Utility functions for processing and saving data │ └── scraper.py # functions for configuring and running the crawler └── requirements.txt # Python package dependencies ``` # How to Run ## Prerequisites Ensure you have the following installed: - Python 3.11+ - LLM provider API key (OpenAI, Gemini, Claude,...) - Necessary Python libraries (listed in `requirements.txt`) ## Setup ### Clone the Repository ```bash git clone https://github.com/kaymen99/llm-web-scraper cd llm-web-scraper ``` ### Create and Activate a Virtual Environment ```bash python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate` ``` ### Install Required Packages ```bash pip install -r requirements.txt playwright install ``` ### Set Up Environment Variables Create a `.env` file in the root directory and add necessary credentials: ```ini # API keys for LLMs providers, add key for every provider you want to use OPENAI_API_KEY="" # OpenAI API key for accessing OpenAI's models and services GEMINI_API_KEY="" # Google Cloud API key for accessing Google Cloud services GROQ_API_KEY="" # GROQ platform API key for using GROQ's services ``` ## Running the scraper To start the scraper, run: ```bash python main.py ``` The script will crawl the specified website, extract data page by page, and save the complete venues to a `businesses_data.csv` file in the project directory. Additionally, usage statistics for the LLM strategy will be displayed after crawling. ## Configuration The `config.py` file contains key settings for controlling the scraper's behavior. You can modify these values to customize the scraping process: - **LLM_MODEL**: The AI model used for data extraction. Supports any LLM from **LiteLLM** (e.g., `gpt-4o`, `claude`, `deepseek-chat`, `gemini-2.0-flash`). - **BASE_URL**: The target website to scrape. By default, it extracts **dentists in Toronto** from Yellow Pages, but you can change this to any business category or location. - **CSS_SELECTOR**: The HTML selector used to pinpoint business details within the page. - **MAX_PAGES**: Limits the number of pages to crawl (default: `3`). Increase this value to scrape more data. - **SCRAPER_INSTRUCTIONS**: Custom LLM prompt defining what details to extract . # Contributing Contributions are welcome! Please open an issue or submit a pull request for any changes. # Contact If you have any questions or suggestions, feel free to contact me at `[email protected]`.

AI Agents Browser Automation Sales & Outreach
78 Github Stars
google-maps-lead-generator
Open Source

google-maps-lead-generator

# **Google Maps Lead Generation: Find Business data Using AI** ## 👉 **[How to Scrape Unlimited Google Maps Leads Using AI!](https://dev.to/kaymen99/how-to-scrape-unlimited-google-maps-leads-using-ai-4kem)** This **AI lead generation tool** helps you discover and enrich local businesses data from any location. It combines the power of **Serper Maps API** with intelligent **AI web scraping** to build comprehensive business prospect lists that are ready for your sales outreach campaigns! https://github.com/user-attachments/assets/e65275a6-0369-4f37-bb5d-f81f41f97409 ## **Why This Tool?** - **Cost-Efficient** – Generate lead lists at the fraction of the cost of other scrapers - **Fully Automated** – Handles the entire process from location search to lead enrichment - **Contact Detail Extraction** – Automatically finds emails, social media profiles, and more - **Smart Web Scraping** – Uses AI to navigate websites and extract relevant information - **Ready-to-Use Output** – Generates Excel files you can immediately use for outreach - **Multi-LLM Integration** – Choose any AI models like GPT-4.1, Claude or DeepSeek to run your search ## **How It Works** The tool workflow is simple: ### 1. Data Collection - Takes a location and search query input (e.g., "Toronto", "Realtors") - Uses **Serper Maps API** to scrape Google Maps places data - Returns a list of relevant places with basic information (business name, address, website, phone, etc.) ### 2. Data Enrichment - For each business found, the tool scrapes their website (landing or contact pages) - Uses an **AI agent (LLM)** to intelligently identify: - Email addresses - Detailed contact information - Social media links (Facebook, Twitter, Instagram, etc) - Other relevant data points for outreach ### 3. Data Export - Saves all collected and enriched data to an Excel file, under the `data` directory - Organizes information in a clean, ready-to-use format for sales outreach ## **Cost Implications** While other Google Maps scrapers like [Apify's Google Maps Extractor](https://apify.com/compass/google-maps-extractor) or [Crawler Google Places](https://apify.com/compass/crawler-google-places) charge **$5-10 per 1000 results** (depending on the options you choose), this system leverages the Serper API and efficient web scraping to deliver the same results for approximately **$0.2 per 1000 leads** – that's up to **50x cheaper**! Even better, Serper API offers **free credits** when you sign up, making your initial lead generation campaigns essentially **free**! ## 🛠️ **Project Structure** ``` . ├── main.py # Main application script ├── process_from_excel.py # Script to process existing Excel files ├── src/ │ ├── places_api.py # Serper Maps API integration │ ├── web_scraper.py # Web scraping utilities with Playwright │ ├── business_info.py # Contact extraction and business data enrichment │ ├── data_export.py # Excel export functions │ └── utils.py # Utility functions ├── data/ # Output folder for generated Excel files └── requirements.txt # Python dependencies ``` ## **How to Use** ### Prerequisites - Python 3.8+ installed - Serper API key ([Get one here](https://serper.dev/)) - [OpenRouter API key](https://openrouter.ai/) (to use any LLM model) or you preferred LLM API key, like OpenAI or Claude ### Setup Clone the repository and install dependencies: ```bash # Clone the repository git clone https://github.com/kaymen99/google-maps-lead-generator cd google-maps-lead-generator # Install dependencies pip install -r requirements.txt ``` ### Set up your API keys Create a `.env` file in the root directory of the project and add your API keys: ```bash SERPER_API_KEY=your-serper-api-key OPENROUTER_API_KEY=your-openrouter-api-key ``` ### Running the Tool Edit the parameters directly in `main.py` to customize your search: ```python # In main.py location = "Toronto" # Location to search into search_query = "Realtors" # Local business to search for num_pages = 1 # Each page contains 20 results ``` Then you can run the tool with: ```bash # Simply run the main.py file python main.py ``` ### Running from Streamlit App You can also run the tool from a Streamlit app by running: ```bash streamlit run app.py ``` ### 📊 **Output Files** The tool automatically generates an Excel file in the `/data` directory at the root of your project: - `data_[Query]_[Location]_[Date].xlsx`: Complete enriched business data including: - Business names and addresses - Phone numbers - Website URLs - **Extracted email addresses** - **Social media profiles** (Facebook, Twitter, Instagram) - **Contact information** - Additional business metadata (if you want to add more data like products, services, etc.) This file is ready to use for your outreach campaigns with all the necessary contact details in one place! ## **Contributing** Contributions are welcome! Please open an issue or submit a pull request for any changes. ## **Contact** If you have any questions or suggestions, feel free to reach out!

AI Agents Sales & Outreach
38 Github Stars
web3-Ecommerce-dapp
Open Source

web3-Ecommerce-dapp

<div id="top"></div> <!-- ABOUT THE PROJECT --> ## Decentralized Marketplace Dapp V2 <p align="center"> <img alt="Dark" src="https://user-images.githubusercontent.com/83681204/161353432-f63bd35b-14f6-4f49-8b53-a19599272af8.png" width="100%"> </p> This is my second implementation of a decentralized E-commerce marketplace built on top of EVM-compatible Blockchains such as Ethereum and Polygon. The previous dapp only allowed users to buy and sell single items without quantity. However, this new version is much more advanced and includes a wide range of features. Users can now create their own stores with customized branding and sell products with limited or unlimited quantities. Additionally, buyers have the ability to review the products they purchase. I have also introduced an Auction market, inspired by popular NFT marketplaces like OpenSea, however my implementation is more generalized and accepts a variety of products. It's important to note that all payments within the marketplace remain with cryptocurrency tokens. <p align="center"> <img alt="Dark" src="https://user-images.githubusercontent.com/83681204/161353476-c84cc1b8-dce9-4d02-afd6-e4b24d325528.png" width="100%"> </p> ### Built With * [Solidity](https://docs.soliditylang.org/) * [Brownie](https://eth-brownie.readthedocs.io) * [React.js](https://reactjs.org/) * [ethers.js](https://docs.ethers.io/v5/) * [web3modal](https://github.com/Web3Modal/web3modal) * [material ui](https://mui.com/getting-started/installation/) <details> <summary>Table of Contents</summary> <ol> <li> <a href="#getting-started">Getting Started</a> <ul> <li><a href="#prerequisites">Prerequisites</a></li> <li><a href="#installation">Installation</a></li> </ul> </li> <li> <a href="#how-it-works">How it Works</a> <ul> <li><a href="#main-market">Main Market</a></li> <li><a href="#the-store">The Store</a></li> <li><a href="#auction-market">Auction Market</a></li> </ul> </li> <li> <a href="#how-to-use">How to Use</a> <ul> <li><a href="#scripts">Scripts</a></li> <li><a href="#testing">Testing</a></li> <li><a href="#front-end">Front End</a></li> </ul> </li> <li><a href="#contact">Contact</a></li> <li><a href="#license">License</a></li> </ol> </details> <!-- GETTING STARTED --> ## Getting Started ### Prerequisites Please install or have installed the following: * [nodejs and npm](https://nodejs.org/en/download/) * [python](https://www.python.org/downloads/) * [MetaMask](https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn) Chrome extension installed in your browser ### Installation 1. Installing Brownie: Brownie is a python framework for smart contracts development,testing and deployments. It's quit like [HardHat](https://hardhat.org) but it uses python for writing test and deployements scripts instead of javascript. Here is a simple way to install brownie. ``` pip install --user pipx pipx ensurepath # restart your terminal pipx install eth-brownie ``` Or if you can't get pipx to work, via pip (it's recommended to use pipx) ``` pip install eth-brownie ``` Install [ganache-cli](https://www.npmjs.com/package/ganache-cli): ```sh npm install -g ganache-cli ``` 3. Clone the repo: ```sh git clone https://github.com/kaymen99/MarketPlace-Dapp-V2.git cd MarketPlace-Dapp-V2 ``` 3. Install Ganache: Ganache is a local blockchain that run on your machine, it's used during development stages because it allows quick smart contract testing and avoids all real Testnets problems. You can install ganache from this link : https://trufflesuite.com/ganache/ Next, you need to setup the ganache network with brownie : ```sh brownie networks add Ethereum ganache-local host=http://127.0.0.1:7545 chainid=5777 ``` 4. Set your environment variables To be able to deploy to real testnets you need to add your PRIVATE_KEY (You can find your PRIVATE_KEY from your ethereum wallet like metamask) and the infura project Id (just create an infura account it's free) to the .env file: ``` PRIVATE_KEY=<PRIVATE_KEY> WEB3_INFURA_PROJECT_ID=<< YOUR INFURA PROJECT ID >> ``` You can choose to use ethereum testnets like rinkeby, Kovan or any other evm compatible testnet. You'll also need some eth in the testnet. You can get it into your wallet by using a public faucet. 5. As infura recently removed its free IPFS gateway i used `web3.storage` api for storing data into IPFS, this api is as simple as infura it requires the creation of a free account and a new api token which you can do [here](https://web3.storage), when you finish add your api token into the `src/utils/ipfsStorage.js` file: ```js const web3storage_key = "YOUR-WEB3.STORAGE-API-TOKEN"; ``` <p align="right">(<a href="#top">back to top</a>)</p> <!-- Working EXAMPLES --> ## How it Works ### Main Market This is the core of the old version [marketplace V1](https://github.com/Aymen1001/MarketPlace-dapp) and it's made for single items purchase , User can add a product by providing the product name, description, price in $ and image. ![Capture d’écran 2022-03-03 à 22 36 53](https://user-images.githubusercontent.com/83681204/156660595-9432f950-941d-465f-ad69-bb0edaad32b7.png) The platform ensures a good interaction between the seller and the buyer by deviding the purchase process (product state) into 4 steps: <ul> <li><b>In Sale:</b> The first step when a seller list it's product on the market </li> <li><b>Pending:</b> When a product is bought the amount paid is locked in the smart contract and buyer waits for seller to sent the product </li> <li><b>Sent:</b> The seller sends the product and waits for the buyer confirmation</li> <li><b>Sold:</b> The buyer confirms the recieval and the funds are transfered to the seller </li> </ul> All this steps can be performed on the product page: <table> <tr> <td style="text-align:center;">Seller Point of view </td> <td style="text-align:center;">Buyer Point of view </td> </tr> <tr> <td valign="top"><img src="https://user-images.githubusercontent.com/83681204/156660145-aacb1ff4-2ba3-44d5-8bb9-87c927571b6b.png"></td> <td valign="top"><img src="https://user-images.githubusercontent.com/83681204/156660202-5bbb40db-ccf6-4a9f-88eb-3b407eca0211.png"></td> </tr> </table> ### The Store The dapp enables sellers to create their own order based stores, They can add limited and unlimited quantity products. Store Page: <img src="https://user-images.githubusercontent.com/83681204/161355217-4bebbe79-9a28-454d-8249-6db70213ce22.png"> <br/> Seller Dashboard: <img src="https://user-images.githubusercontent.com/83681204/161355756-faf21a74-6a5e-4cb3-af3e-01400bd273ff.png"> Each seller willing to create a new store must provide a name and the store logo: <p align="center"> <img alt="Dark" src="https://user-images.githubusercontent.com/83681204/161355090-cced48d8-d6f0-444e-a3c1-af8f62c9d698.png" width="100%"> </p> On the product page you can find all details regarding the product(seller, quantity, price,...) and the reviews posted by previous buyers, When an order is created it goes through 3 main states: <ul> <li><b>PENDING:</b> just created and waiting for seller acceptance</li> <li><b>SENT:</b> product sent and waiting for buyer recieval confirmation</li> <li><b>COMPLETED:</b> The order is complete so seller recieve payment and buyer can leave a review </li> </ul> ![store-product-page](https://user-images.githubusercontent.com/83681204/161357125-2a1cb716-be24-4382-8708-23d930afc983.png) ### Auction Market User can start an auction for any type of products by providing name, description, starting price, auction duration (in hours), item image. Bidders can offer an initial bid and outbid if necessary without having to withdraw their fund on each bid, the highest bidder will be determined after the end of the auction clock <table> <tr> <td valign="top"><img src="https://user-images.githubusercontent.com/83681204/161357638-e10c63c8-3f10-44ad-a8a3-34d492a6d2c0.png"></td> <td valign="top"><img src="https://user-images.githubusercontent.com/83681204/161357676-ebe2be3c-9922-4d1d-9d18-6e4291536d0f.png"></td> </tr> </table> <p align="right">(<a href="#top">back to top</a>)</p> <!-- USAGE EXAMPLES --> ## How to Use ### Scripts In the MarketPlace-Dapp-V2 folder you'll find a directory scripts, it contain all the python code for deploying your contracts and also some useful functions The reset.py file is used to remove all previous contracts deployments from build directory: ```sh brownie run scripts/reset.py ``` The deploy.py file allow the deployment to the testnet/local-network: ```sh brownie run scripts/deploy.py --network=ganache-local ``` The update_front_end.py is used to transfer all the smart contracts data (abi,...) and addresses to the front end in the artifacts directory: ```sh brownie run scripts/update_front_end.py ``` After running this 3 cammands, the MarketPlace contract is now deployed and is integrated with the front end <p align="right">(<a href="#top">back to top</a>)</p> ### Testing In the MarketPlace-Dapp-V2 folder you'll find a directory tests, it contain all the python code used for testing the smart contract functionalities You can run all the tests by : ```sh brownie test ``` Or you can test each function individualy: ```sh brownie test -k <function name> ``` <p align="right">(<a href="#top">back to top</a>)</p> ### Front-end The user interface of this application is build using React JS, it can be started by running: ```sh cd front-end yarn yarn start ``` It uses the following libraries: <ul> <li><b>Ethers.js:</b> used as interface between the UI and the deployed smart contract</li> <li><b>Web3modal:</b> for conecting to Metamask</li> <li><b>ipfs-http-client:</b> for connecting and uploading files to IPFS </li> <li><b>@reduxjs/toolkit & redux-persist:</b> for managing the app states (account, balance, blockchain) </li> <li><b>Material UI:</b> used for react components and styles </li> </ul> <p align="right">(<a href="#top">back to top</a>)</p> <!-- Contact --> ## Contact If you have any question or problem running this project just contact me: [email protected] <p align="right">(<a href="#top">back to top</a>)</p> <!-- LICENSE --> ## License Distributed under the MIT License. See `LICENSE.txt` for more information. <p align="right">(<a href="#top">back to top</a>)</p>

Crypto & Blockchain Marketplace & Multi-vendor
20 Github Stars