Appearance

Visual style

Mode
Theme
Accent
Advanced
Text sizeScales the whole site
16 px
Reduce motionReduce animations or match your system
Separate light and darkChoose a theme, accent and font for each
50

Service · Backend, Cloud Infrastructure & AI Integration

Backend and API development

I build backends and APIs: REST services in Hono, GraphQL over Postgres with Hasura, webhook handlers, queues and scheduled jobs, in TypeScript on Cloudflare Workers. The focus is clear contracts, validated inputs, idempotent side effects and an architecture that stays testable.

Ekonavi marketplace seller admin dashboard
Ekonavi · Marketplace admin

Who it's for

Where backend & api development pays off

  • A product that needs a real API

    Mobile apps, dashboards and partners all need the same data. A documented API with validation and auth serves them consistently.

  • Integrations that keep breaking

    Payment, shipping or CRM integrations wired directly into frontends. Moving them into a backend service makes them reliable and testable.

  • Work that shouldn't block a request

    Emails, file processing and payment reconciliation, moved to queues and scheduled jobs.

What's included

Capabilities and features

  • REST APIs

    Versioned Hono APIs with Zod validation, consistent error responses and OpenAPI documentation.

  • GraphQL data layer

    Hasura over Postgres for data access, with role-based row and column permissions.

  • Layered architecture

    Routes, use cases, domain entities and infrastructure adapters, so business rules are testable without HTTP or a database.

  • Webhooks and queues

    Signed webhook verification, queue-backed processing with retries and dead-letter queues, and idempotent handlers.

  • Auth and access

    JWT-based authentication, admin-only routes and permission checks at the data layer.

  • Files and storage

    Private object storage (R2), signed short-lived URLs and resumable uploads.

Layered API architecture

On a creator commerce platform I built, the Hono API is organised in four layers:

presentation/   routes, auth middleware, validation, error handler
application/    use cases (CreateOrder, ConfirmPayment, RequestFreshLink) and ports (interfaces)
domain/         entities and rules (Order.markPaid, DownloadToken expiry and limits)
infrastructure/ Drizzle + Neon repositories, Razorpay, R2 storage, Resend email, queue

Use cases depend on interfaces, not on Razorpay or Postgres directly, so they can be unit-tested with fakes and a provider can be replaced without touching business rules.

Handling side effects safely

In payment and order code, most failures happen in side effects (writes, emails, calls to other services) rather than reads. The patterns I use:

  • Webhooks are queued. Webhook routes verify and enqueue; a queue consumer does the work.
  • Idempotency. Every handler checks current state before acting, so retries are safe.
  • Atomic transitions. State changes such as “pending → paid” should be conditional updates, so two concurrent workers can’t both win. This is the first thing I’d tighten in my own creator-store code, where the check and the write are separate steps (see the webhooks article).
  • Reconciliation. A cron job looks for inconsistent state (paid but unfulfilled) and repairs it.

Evidence

  • Ekonavi: core backend on Workers and Hasura (auth, data pipelines) and the Mercado commerce API (cart, checkout, Mercado Pago, order lifecycle, shipping) documented with OpenAPI and Zod.
  • Creator commerce platform: Hono on Workers with Drizzle and Neon Postgres, Razorpay, R2 private files, Cloudflare Queues with a dead-letter queue, and a six-hourly fulfilment sweep.

Approach

How a backend & api development project runs

  1. Contract first

    Resources, endpoints, payloads and error cases agreed before implementation, so frontend and backend can work in parallel.

  2. Data model

    Entities, relationships, constraints and migrations, with Drizzle or a GraphQL layer depending on the product.

  3. Implement in layers

    Use cases with unit tests, then adapters for databases and third-party services, then routes.

  4. Operate

    Per-environment configuration, logging, a dead-letter queue for failures, and scheduled reconciliation jobs.

FAQ

Backend & API Development: common questions

REST or GraphQL for my API?

GraphQL suits several clients reading different shapes of the same data, such as a storefront, seller dashboard and admin panel. REST suits workflows with side effects (checkout, payments, webhooks) and public or partner APIs. Ekonavi uses both: Hasura GraphQL for data and Hono REST services for commerce.

Why run a backend on Cloudflare Workers?

No servers to manage, fast cold starts, global deployment and built-in queues, storage and cron jobs. It suits most business APIs. CPU-heavy or long-running work belongs on a different platform.

How do you make webhook handling reliable?

Verify the signature against the raw body, enqueue the event and respond quickly, process it idempotently in a consumer with retries and a dead-letter queue, and run a scheduled sweep that reconciles anything missed.

Which database do you use?

Usually PostgreSQL, either behind Hasura GraphQL or accessed with Drizzle ORM through Neon's serverless driver from Cloudflare Workers. The choice depends on the data's shape and the hosting platform; relational data with clear relationships fits Postgres best.

Need an API you can rely on?

Describe the clients that will use it and the systems it needs to talk to. I'll outline a contract and an architecture.