https://github.com/pirmax/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.
https://github.com/pirmax/tools-analyzer
analyzer biome biomejs github hono honojs media metadata repository social social-media social-network social-network-analysis stack stack-analyzer tools typescript url website
Last synced: 2 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/pirmax/tools-analyzer
- Owner: pirmax
- License: mit
- Created: 2025-10-01T11:25:39.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-10-01T11:30:21.000Z (9 months ago)
- Last Synced: 2026-02-12T08:08:13.586Z (5 months ago)
- Topics: analyzer, biome, biomejs, github, hono, honojs, media, metadata, repository, social, social-media, social-network, social-network-analysis, stack, stack-analyzer, tools, typescript, url, website
- Language: TypeScript
- Homepage: http://127.0.0.1:3000/api/*
- Size: 21.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://bun.sh/) (version 1.2.2 or higher)
- Node.js environment variables configuration
### Setup
1. **Clone the repository**
```bash
git clone https://github.com/pirmax/tools-analyzer
cd stack-analyzer
```
2. **Install dependencies**
```bash
bun install
```
3. **Environment Configuration**
Create a `.env` file in the root directory with the following variables:
```env
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):**
```bash
bun run dev
```
**Production mode:**
```bash
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:**
```json
{
"repositoryUrl": "https://github.com/username/repository"
}
```
**Response:**
```json
{
"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:**
```json
{
"url": "https://example.com"
}
```
**Response:**
```json
{
"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:**
```json
{
"url": "https://example.com"
}
```
**Response:**
```json
{
"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:
```json
{
"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:
```bash
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](LICENSE) file for details.
## Support
For issues, questions, or contributions, please open an issue on the GitHub repository.