API.OLUWASETEMI.DEV
A personal API repository built with Hono, featuring structured logging, type-safe routes with OpenAPI documentation, GraphQL endpoint powered by Apollo Server, and a modern tech stack including Drizzle ORM, Zod validation, and comprehensive testing with Vitest.
API.OLUWASETEMI.DEV
A personal API repository that serves as a comprehensive backend solution with modern development practices. The platform features structured logging with Pino, type-safe routes documented with OpenAPI, interactive API documentation via Scalar, and a GraphQL endpoint powered by Drizzle GraphQL and Apollo Server.
Key Features
- Structured Logging: Implemented with Pino and Hono-Pino for comprehensive request/response logging
- Type-Safe API: All routes are documented and type-safe using @hono/zod-openapi with Zod validation
- Interactive Documentation: Self-hosted API documentation using Scalar for seamless developer experience
- GraphQL Endpoint: Full GraphQL API powered by Drizzle GraphQL and Apollo Server
- Database Management: Single source of truth database schemas with Drizzle ORM and SQLite
- Comprehensive Testing: Full test coverage with Vitest and proper test organization
- Modern Development: ESLint configuration with @antfu/eslint-config for consistent code quality
My Role on the Project
- Full-Stack Development: Designed and implemented the entire API architecture from scratch
- Database Design: Created and maintained database schemas using Drizzle ORM with proper migrations
- API Documentation: Implemented comprehensive OpenAPI documentation with interactive Scalar interface
- GraphQL Integration: Set up and configured Apollo Server with Drizzle GraphQL for flexible data querying
- Testing Strategy: Established comprehensive testing patterns with Vitest and proper test organization
- DevOps & Deployment: Configured deployment pipeline and hosted the API at api.oluwasetemi.dev
- Code Quality: Implemented ESLint configuration and maintained high code standards
Technical Architecture
The API is built with a modern, type-safe architecture:
- Framework: Hono.js for high-performance web framework
- Database: SQLite with Drizzle ORM for type-safe database operations
- Validation: Zod schemas for runtime type validation and OpenAPI documentation
- GraphQL: Apollo Server integration with Drizzle GraphQL for flexible data access
- Logging: Structured logging with Pino for production-ready monitoring
- Testing: Vitest for fast, comprehensive testing with proper test organization
- Deployment: Deployed on a VPS with Caddy as a reverse proxy.
Motivation
This project was motivated by the need for a personal API that demonstrates modern backend development practices. It serves as both a practical tool for personal projects and a showcase of current best practices in API development, including type safety, comprehensive documentation, and developer experience considerations.
The API is publicly available at api.oluwasetemi.dev with interactive documentation at api.oluwasetemi.dev/reference. The graphql endpoint is available at api.oluwasetemi.dev/graphql.