Skip to content

A powerful API service for analyzing technology stacks in repositories, extracting metadata from web pages, and discovering social media links. Built with Bun, Hono, and TypeScript.

License

Notifications You must be signed in to change notification settings

pirmax/tools-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tools Analyzer

A powerful API service for analyzing technology stacks in repositories, extracting metadata from web pages, and discovering social media links. Built with Bun, Hono, and TypeScript.

Features

  • 🔍 Repository Stack Analysis: Automatically detect technologies, frameworks, and tools used in GitHub repositories
  • 📄 Metadata Extraction: Extract comprehensive metadata from any web page including title, description, Open Graph data, and more
  • 🌐 Social Media Discovery: Find and extract social media links from websites with occurrence counting
  • 🔐 API Key Authentication: Secure endpoints with API key authentication
  • Fast Performance: Built with Bun for optimal performance

Installation

Prerequisites

  • Bun (version 1.2.2 or higher)
  • Node.js environment variables configuration

Setup

  1. Clone the repository

    git clone https://github.com/pirmax/tools-analyzer
    cd stack-analyzer
  2. Install dependencies

    bun install
  3. Environment Configuration

    Create a .env file in the root directory with the following variables:

    NODE_ENV=development
    PORT=3000
    API_KEY=your-secret-api-key
    LOG_LEVEL=info

    Environment Variables:

    • NODE_ENV: Environment mode (development or production)
    • PORT: Server port (default: 3000)
    • API_KEY: Required API key for authentication
    • LOG_LEVEL: Logging level (debug, info, warn, error)
  4. Start the server

    Development mode (with hot reload):

    bun run dev

    Production mode:

    bun start

The server will start on http://localhost:3000 (or your configured PORT).

API Endpoints

All endpoints require authentication via the X-API-Key header.

Authentication

Include your API key in the request headers:

X-API-Key: your-secret-api-key

1. Repository Stack Analysis

Endpoint: POST /api/analyze

Analyzes a Git repository to detect the technology stack, frameworks, languages, and tools used.

Request Body:

{
  "repositoryUrl": "https://github.com/username/repository"
}

Response:

{
  "technologies": [
    "typescript",
    "react",
    "nodejs",
    "webpack"
  ],
  "details": {
    // Detailed analysis results
  }
}

Use Cases:

  • Technology stack discovery for due diligence
  • Competitive analysis
  • Project assessment and planning
  • Developer skill requirement identification

2. Website Metadata Extraction

Endpoint: POST /api/metadata

Extracts comprehensive metadata from any web page including HTML meta tags, Open Graph data, Twitter Cards, and more.

Request Body:

{
  "url": "https://example.com"
}

Response:

{
  "title": "Page Title",
  "description": "Page description",
  "openGraph": {
    "title": "OG Title",
    "description": "OG Description",
    "image": "https://example.com/image.jpg",
    "url": "https://example.com"
  },
  "twitter": {
    "card": "summary_large_image",
    "title": "Twitter Title",
    "description": "Twitter Description"
  },
  "general": {
    "canonical": "https://example.com/canonical",
    "author": "Author Name",
    "publisher": "Publisher Name"
  }
}

Use Cases:

  • SEO analysis and optimization
  • Social media preview generation
  • Content management systems
  • Web scraping and data collection

3. Social Media Links Discovery

Endpoint: POST /api/social

Discovers and extracts social media links from websites with occurrence counting and profile information.

Request Body:

{
  "url": "https://example.com"
}

Response:

{
  "twitter": [
    {
      "url": "https://twitter.com/username",
      "user": "username",
      "provider": {
        "name": "X (Twitter)",
        "value": "x"
      },
      "occurrences": 3
    }
  ],
  "linkedin": [
    {
      "url": "https://linkedin.com/in/username",
      "user": "username",
      "provider": {
        "name": "LinkedIn",
        "value": "linkedin"
      },
      "occurrences": 1
    }
  ],
  "tiktok": [
    {
      "url": "https://www.tiktok.com/@username",
      "user": "username",
      "provider": {
        "name": "TikTok",
        "value": "tiktok"
      },
      "occurrences": 2
    }
  ]
}

Supported Social Platforms:

  • Facebook
  • X (Twitter)
  • Instagram
  • LinkedIn
  • YouTube
  • TikTok
  • GitHub
  • Bluesky
  • Pinterest
  • Threads
  • Mastodon
  • Twitch

Use Cases:

  • Contact information discovery
  • Social media audit
  • Competitor social presence analysis
  • Lead generation and outreach

Error Handling

All endpoints return appropriate HTTP status codes:

  • 200: Success
  • 401: Unauthorized (missing or invalid API key)
  • 400: Bad Request (invalid input)
  • 500: Internal Server Error

Error responses include a descriptive error message:

{
  "error": "Unauthorized"
}

Development

Project Structure

src/
├── index.ts         # Main server and API routes
├── env.ts           # Environment configuration
├── helpers.ts       # Utility functions
└── tools/
    ├── analyzer.ts  # Repository stack analysis
    ├── metadata.ts  # Web page metadata extraction
    └── social.ts    # Social media links discovery

Available Scripts

  • bun run dev: Start development server with hot reload
  • bun start: Start production server

Code Quality

The project uses Biome for code formatting and linting:

bunx @biomejs/biome check .
bunx @biomejs/biome format .

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests and linting
  5. Submit a pull request

License

This project is licensed under the MIT License. See the LICENSE file for details.

Support

For issues, questions, or contributions, please open an issue on the GitHub repository.

About

A powerful API service for analyzing technology stacks in repositories, extracting metadata from web pages, and discovering social media links. Built with Bun, Hono, and TypeScript.

Topics

Resources

License

Stars

Watchers

Forks