This is a personal portfolio API built with Hono running on Vercel. The API integrates with various external services including MyAnimeList, Spotify, Steam, and WakaTime to provide a unified interface for personal data.
- GitHub Integration - Fetch repository data and project information
- MyAnimeList Integration - Fetch anime lists and handle OAuth authentication
- Spotify Integration - Get currently playing tracks and recently played history
- Steam Integration - Access Steam profile and game data
- WakaTime Integration - Track coding statistics and time spent programming
- Hono - Lightweight, fast web framework for API development
- Vercel - Deployment platform
- Drizzle ORM - TypeScript ORM for database operations
- Turso - SQLite database service (LibSQL)
- Node.js
- npm or yarn
- Vercel CLI
- Clone the repository
- Install dependencies
npm install
# or
bun install- Set up environment variables in a
.envfile:
# Turso Database
TURSO_DATABASE_URL=your_turso_db_url
TURSO_AUTH_TOKEN=your_turso_auth_token
# GitHub (optional - no auth required for public repos)
# Uses GitHub API v3 with rate limits: 60 requests/hour unauthenticated, 5000/hour authenticated
# Add token for higher rate limits:
# GITHUB_TOKEN=your_github_token
# MyAnimeList
MAL_CLIENT_ID=your_mal_client_id
MAL_CLIENT_SECRET=your_mal_client_secret
# Spotify
SPOTIFY_CLIENT_ID=your_spotify_client_id
SPOTIFY_CLIENT_SECRET=your_spotify_client_secret
SPOTIFY_REFRESH_TOKEN=your_spotify_refresh_token
# Steam
STEAM_API_KEY=your_steam_api_key
STEAM_ID=your_steam_id
# WakaTime
WAKATIME_API_KEY=your_wakatime_api_key
Run the development server:
npm run start
# or
bun startAlternatively, use nodemon for auto-reloading:
npm run dev
# or
bun devDeploy to Vercel:
npm run deploy
# or
bun deploy/api- Base path for all endpoints
-
GET /api/github/project?username={username}&limit={limit}- Get repositories by username (default limit: 10)- Returns non-fork, non-archived repos sorted by most recently updated
- Includes language colors for visualization
- Query Params:
username- GitHub username (required ifreposnot provided)limit- Number of repos to fetch (default: 10)
-
GET /api/github/project?repos={url1},{url2}- Get specific repositories by URL- Accept comma-separated or multiple
reposquery parameters - URLs can be in format:
https://github.com/owner/repo - Response includes language colors with fallback color
#6b7280
- Accept comma-separated or multiple
GET /api/mal/auth- Initiate OAuth flowGET /api/mal/callback- OAuth callback handlerGET /api/mal/anime-list- Get full anime list
GET /api/spotify/now-playing- Get currently playing trackGET /api/spotify/recently-played- Get recently played tracks
GET /api/steam/owned-games- Get list of all owned games with detailsGET /api/steam/player-summary- Get current player status and game activityGET /api/steam/recently-played- Get recently played games with playtime
GET /api/wakatime/stats- Get coding statistics including:- Total coding time
- Programming languages used
- Editors used
- Statistics since first tracked day
iaMJ アーリャ