API.OLUWASETEMI.DEV
A comprehensive personal API repository that serves as a full-featured backend solution demonstrating modern development practices. Built with Hono.js for high performance, the platform features dual authentication systems, real-time analytics, interactive API documentation, websocket for real-time communication, pubsub for graphql subscription and a powerful GraphQL endpoint.
API.OLUWASETEMI.DEV
A comprehensive personal API repository that serves as a full-featured backend solution demonstrating modern development practices. Built with Hono.js for high performance, the platform features dual authentication systems, real-time analytics, interactive API documentation, websocket for real-time communication, pubsub for graphql subscription and a powerful GraphQL endpoint.
Key Features
Dual Authentication Systems
- Legacy JWT Authentication: Traditional JWT-based auth with register, login, refresh, and protected routes
- Better Auth Integration: Modern authentication with email/password, session management, and enhanced security
- Protected Routes: Comprehensive route protection with middleware
Real-Time Analytics
- Request Tracking: Comprehensive logging of all API requests with performance metrics
- Analytics Endpoints:
/analytics/requestsand/analytics/countsfor detailed insights - Filtering & Grouping: Advanced analytics with date ranges, method filtering, and grouping by day/path/method
- Performance Optimized: Minimal overhead (~1-2ms per request) with non-blocking database writes
- Webhooks: Webhooks are used to send notifications to the clients when a mutation is created. It is used to send notifications to the clients when a mutation(s) is created, can also receive notifications from the clients in the expected webhook standard for GitHub and Stripe.
GraphQL Integration
- Auto-generated Schema: Database tables automatically exposed as GraphQL types
- Authentication Support: Complete auth mutations (register, login, refreshToken) and queries (me)
- Custom Queries: Advanced analytics queries with filtering and grouping capabilities
- Interactive Playground: Development playground at
/playgroundfor testing queries - Subscriptions: GraphQL subscriptions help user to listen to mutations for instant notification(works only when you use REST api to create the mutation)
- PubSub: PubSub is used to publish and subscribe to events in the graphql server. It is used to send notifications to the clients when a mutation is created.
- Websocket: Websocket is used to send notifications to the clients when a mutation is created. It is used to send notifications to the clients when a mutation is created.
Comprehensive Documentation
- OpenAPI Specification: Full API documentation(json) with
/docendpoint - Scalar Documentation: Interactive API documentation at
https://api.oluwasetemi.dev/referenceandhttps://api.oluwasetemi.dev/api/auth/docs - Type-Safe Routes: All endpoints documented using @hono/zod-openapi
- Live Examples: Working examples and testing interface
Database & ORM
- Drizzle ORM: Type-safe database operations with SQLite
- Schema Management: Single source of truth for database schemas
- Migrations: Proper database migration system
- Type Safety: Full TypeScript integration throughout
API Endpoints
Visit the API Base URL to see the available endpoints.
My Role on the Project(AI assisted)
- Full-Stack Architecture: Designed and implemented the entire API architecture from scratch
- Authentication Systems: Implemented both JWT and Better Auth with comprehensive security
- Analytics Engine: Built real-time request tracking and analytics system
- GraphQL Implementation: Set up Apollo Server with auto-generated schemas and custom queries
- Database Design: Created and maintained database schemas using Drizzle ORM
- API Documentation: Implemented comprehensive OpenAPI documentation with Scalar interface
- Testing Strategy: Established comprehensive testing patterns with Vitest
- DevOps & Deployment: Configured deployment pipeline and hosted at api.oluwasetemi.dev
- Code Quality: Implemented ESLint configuration with @setemiojo/eslint-config
Technical Architecture
Core Technologies
- Framework: Hono.js for high-performance web framework
- Database: SQLite with Drizzle ORM for type-safe operations
- Authentication: Dual JWT and Better Auth systems
- GraphQL: Apollo Server with Drizzle GraphQL integration
- Validation: Zod schemas for runtime validation and OpenAPI docs
- Logging: Structured logging with Pino for production monitoring
- Testing: Vitest for comprehensive testing with proper organization
Development Tools
- Package Manager: pnpm with workspace configuration
- Code Quality: ESLint with @setemiojo/eslint-config
- Type Safety: Full TypeScript integration
- Process Management: PM2 ecosystem configuration
- Documentation: Scalar for interactive API docs
Live Demo & Resources
- API Base URL: api.oluwasetemi.dev
- Interactive Documentation: api.oluwasetemi.dev/reference
- GraphQL Endpoint: api.oluwasetemi.dev/graphql
- OpenAPI Spec: api.oluwasetemi.dev/doc
- Source Code: GitHub Repository
Motivation & Impact
This project serves as both a practical personal API and a comprehensive showcase of modern backend development practices. It demonstrates:
- Production-Ready Architecture: Real-world authentication, analytics, and monitoring
- Developer Experience: Interactive documentation, GraphQL playground, and comprehensive testing
- Performance: High-performance Hono.js framework with optimized analytics
- Type Safety: Full TypeScript integration with Zod validation
- Modern Practices: Latest development tools and best practices
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.
Updated on 16th October 2025 for the new features like products, posts, websocket, websocket testing client and webhooks.