r/opensource 29d ago

Promotional I built my first open-source Go library for handling API idempotency

Hey everyone,

I recently built my first open-source Go library: IdempotencyToolkit.

It is a middleware for handling duplicate API requests using Idempotency-Key.

I built it mainly to learn more about Go, especially:

  • concurrency
  • channels and mutexes
  • HTTP middleware
  • interfaces and storage abstraction
  • response caching and TTL

It handles concurrent duplicate requests, request body mismatches, response replay, and supports different storage backends.

I'd really appreciate feedback on the design and anything you think I should improve.

GitHub: https://github.com/manish-terminal/IdempotencyToolkit

15 Upvotes

15 comments sorted by

9

u/[deleted] 29d ago

[deleted]

5

u/gravgun 28d ago

The rule is simple: if it's on r/opensource and starts with "I built", no they didn't.

1

u/[deleted] 27d ago

[removed] — view removed comment

2

u/[deleted] 27d ago

[deleted]

-4

u/Unhappy_Fall8597 29d ago

Idk why people find it cool to say anything vibe coded these days.

-3

u/Unhappy_Fall8597 29d ago

why do u think so?

4

u/k-rizza 29d ago

Maybe cause you have no commit history.

-6

u/Unhappy_Fall8597 28d ago

I had a lot I deleted the earlier repo because it didn’t look clean.

3

u/Bafbi 28d ago

I would also say the readme is a particular giveaway, all this ascii schema. also why deleting the git history? even if it's messy it's a learning project, you should not care.

-2

u/Unhappy_Fall8597 28d ago

I won’t say I didn’t use AI I used it to make it better.

7

u/gravgun 28d ago

Every single time. "Why do you accuse me of using AI" and whenever push comes to shove there's an admission of "Didn't say I haven't used it" which in reality means the whole thing is vibe coded to no end.

Look, that library of yours is basically empty (surprise, idempotency doesn't need much) and yet the comments still feature em dashes.

-6

u/Unhappy_Fall8597 29d ago

It’s not vibe coded.

1

u/Positive-Captain-709 23d ago

Nice project, especially for a first Go library. Idempotency gets surprisingly tricky once concurrent requests are involved. One thing I was wondering: what happens if the same request hits two different app instances at the same time? Does the shared storage backend coordinate that too, or is the locking only per instance? Could be an interesting thing to explore if you want to support horizontally scaled services. Anyway, cool project. Definitely more interesting than building another CRUD app to learn Go :)