templates icon indicating copy to clipboard operation
templates copied to clipboard

added near social agent

Open Immanuel-john opened this issue 4 months ago • 4 comments

User description

Project Title: Near Social AI Agent Plugin

Project Description: The Near Social AI Agent Plugin provides users with a seamless interface to set up profiles and manage posts on the Near Social platform. This plugin simplifies the process of user engagement by guiding users through collecting necessary profile details and generating content for posts. By integrating AI assistance, it enhances the overall user experience on the Near Social platform.

Technologies Used:

Node.js: The server-side runtime environment for building the API. NEAR Blockchain: For secure interactions and management of user profiles and posts. OpenAI: Utilized for generating content based on user prompts. mintbase.js: Used to facilitate interactions with Mintbase services for NFT functionalities. How did you use mintbase.js?: In the Near Social AI Agent Plugin, mintbase.js is employed to interact with the Mintbase API for handling user profiles and managing post uploads. This integration allows users to easily set up their profiles and share content on the blockchain, ensuring a smooth and efficient process. The plugin provides a guided experience, making it accessible for all users.

Working Demo Link:


PR Type

enhancement, documentation


Description

  • Added routes for managing user profiles, posts, and follow actions with NEAR blockchain integration.
  • Implemented utility functions for data handling, NEAR interactions, and image uploads to IPFS.
  • Set up Express server with necessary routes and middleware.
  • Added OpenAPI specification for AI plugin and detailed README with project information and setup instructions.
  • Initialized project with necessary dependencies and configuration for Vercel deployment.

Changes walkthrough 📝

Relevant files
Enhancement
8 files
profile.js
Add profile management routes and NEAR integration             

near-social-ai-agent/routes/profile.js

  • Added GET and POST routes for managing user profiles.
  • Implemented profile data formatting and validation.
  • Integrated NEAR blockchain interactions for profile management.
  • +146/-0 
    nearSocialUtils.js
    Add utility functions for NEAR social interactions             

    near-social-ai-agent/utils/nearSocialUtils.js

  • Added utility functions for fetching social profiles, followers, and
    following.
  • Implemented NEAR blockchain queries for social data.
  • +137/-0 
    utils.js
    Add data utility functions for NEAR interactions                 

    near-social-ai-agent/utils/utils.js

  • Added utility functions for data size estimation and NEAR amount
    calculation.
  • Implemented functions for data conversion and duplication removal.
  • +117/-0 
    post.js
    Add post creation route and NEAR integration                         

    near-social-ai-agent/routes/post.js

  • Added POST route for creating user posts.
  • Implemented content and optional image handling.
  • Integrated NEAR blockchain interactions for post management.
  • +120/-0 
    follow.js
    Add follow management route and NEAR integration                 

    near-social-ai-agent/routes/follow.js

  • Added POST route for managing user follow actions.
  • Implemented NEAR blockchain interactions for follow management.
  • +106/-0 
    imageUtils.js
    Add image upload utility for IPFS                                               

    near-social-ai-agent/utils/imageUtils.js

  • Added utility function for uploading images to IPFS.
  • Implemented image handling and conversion functions.
  • +95/-0   
    app.js
    Set up Express server and route configurations                     

    near-social-ai-agent/app.js

  • Set up Express server with routes for profile, post, and follow
    management.
  • Configured environment variables and static file serving.
  • +25/-0   
    constant.js
    Define constants for NEAR social contract                               

    near-social-ai-agent/utils/constant.js

    • Defined constants for NEAR social contract and network ID.
    +4/-0     
    Documentation
    2 files
    ai-plugin.json
    Add OpenAPI specification for AI plugin                                   

    near-social-ai-agent/public/.well-known/ai-plugin.json

  • Added OpenAPI specification for AI plugin.
  • Defined endpoints for profile and post management.
  • +238/-0 
    README.md
    Add README with project details and setup instructions     

    near-social-ai-agent/README.md

  • Added project introduction and key features.
  • Provided user flow and setup instructions.
  • +84/-0   
    Configuration changes
    2 files
    package.json
    Initialize project with dependencies and metadata               

    near-social-ai-agent/package.json

  • Initialized project with dependencies and scripts.
  • Defined project metadata and author information.
  • +23/-0   
    vercel.json
    Add Vercel configuration for deployment                                   

    near-social-ai-agent/vercel.json

    • Added Vercel configuration for deployment.
    +20/-0   
    Additional files (token-limit)
    1 files
    package-lock.json
    ...                                                                                                           

    near-social-ai-agent/package-lock.json

    ...

    +1769/-0

    💡 PR-Agent usage: Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    Immanuel-john avatar Sep 28 '24 12:09 Immanuel-john