A personal API built with Hono for Cloudflare Workers, providing information about me, my skills, projects, and integrations with services like Spotify.
- 🧑 Profile Information: Basic info, location, work experience, education history, and interests
- 💻 Skills: Programming languages, frameworks, tools, and other technical skills
- 🚀 Projects: Featured projects and portfolio work
- 📝 Blog Integration: Latest posts, archives, and search functionality
- 🎵 Spotify Integration: Currently playing track, listening history, and top tracks/artists
- Hono - Lightweight web framework
- TypeScript - Type safety and better developer experience
- Cloudflare Workers - Serverless deployment platform
- spotify-web-api-node - Spotify API integration
- fast-xml-parser - XML parsing for blog feeds
src/
├── data/ # Data files
│ ├── profile/ # Profile information
│ │ ├── index.ts
│ │ ├── location.ts
│ │ ├── experiences.ts
│ │ ├── education.ts
│ │ └── interests.ts
│ ├── skills/ # Skills data
│ │ ├── index.ts
│ │ ├── languages.ts
│ │ ├── frameworks.ts
│ │ ├── tools.ts
│ │ └── others.ts
│ └── projects.ts # Projects data
├── routes/ # API routes
│ ├── root.ts # API overview
│ ├── profile/ # Profile routes
│ ├── skills/ # Skills routes
│ ├── projects/ # Projects routes
│ ├── blog/ # Blog routes
│ └── spotify/ # Spotify routes
├── services/ # External services
│ ├── blog.ts # Blog service
│ └── spotify.ts # Spotify service
└── types/ # TypeScript types
├── bindings.ts # Environment variables
├── profile.ts # Profile types
├── skills.ts # Skills types
├── projects.ts # Projects types
├── blog.ts # Blog types
└── spotify.ts # Spotify types
-
Clone the repository:
git clone https://github.com/yourusername/honolifeapi.git cd honolifeapi
-
Install dependencies:
npm install
-
Set up environment variables:
SPOTIFY_CLIENT_ID=your_spotify_client_id SPOTIFY_CLIENT_SECRET=your_spotify_client_secret SPOTIFY_REFRESH_TOKEN=your_spotify_refresh_token
-
Run development server:
npm run dev
- API Documentation - Detailed API documentation
- OpenAPI Specification - OpenAPI/Swagger specification
-
Login to Cloudflare:
npx wrangler login
-
Deploy to Cloudflare Workers:
npm run deploy
npm run dev
- Start development servernpm run build
- Build for productionnpm run deploy
- Deploy to Cloudflare Workersnpm run test
- Run testsnpm run lint
- Run linternpm run format
- Format code
Required environment variables in your Cloudflare Workers settings:
SPOTIFY_CLIENT_ID
: Spotify API client IDSPOTIFY_CLIENT_SECRET
: Spotify API client secretSPOTIFY_REFRESH_TOKEN
: Spotify refresh token
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.