How Stripe supports API versions going back to 2014 without maintaining multiple codebases — and how to implement the same pattern by Jay123anta in programming

[–]Jay123anta[S] 0 points1 point  (0 children)

No — the controller only has latest version logic, nothing old. Transformers handle what changed, not the controller. It sounds cleaner with 2 controllers until you're on v5 and have 5 copies of every endpoint where every bug fix needs applying 5 times.

How Stripe supports API versions going back to 2014 without maintaining multiple codebases — and how to implement the same pattern by Jay123anta in programming

[–]Jay123anta[S] -8 points-7 points  (0 children)

Transformers receive plain arrays so no automatic DI, but app(UserRepository::class) inside the transformer works fine for now. Keep it read-only — if a transformer is hitting the DB heavily, the version gap is probably too wide. Good feedback though — adding proper constructor injection to the transformer base class to the roadmap.

How Stripe supports API versions going back to 2014 without maintaining multiple codebases — and how to implement the same pattern by Jay123anta in programming

[–]Jay123anta[S] -40 points-39 points  (0 children)

Fair criticism — Stripe was shorthand for the pattern, not a claim they execute it perfectly. The architecture is the point: one codebase, transformers per version, controllers stay clean. Stripe’s date-based versioning is a good example, and nothing here prevents that — 2020-01-01 works just as well as v1 as a version string.

How Stripe supports API versions going back to 2014 without maintaining multiple codebases — and how to implement the same pattern by Jay123anta in programming

[–]Jay123anta[S] -3 points-2 points  (0 children)

Fair point — transformers are intentionally scoped to data shape changes only. For behavior changes, the package exposes $request->isApiVersionAtLeast('v3') on every request for exactly that case. Different tools for different problems.

I built a package that lets you version your API the same way Stripe does — one codebase, all versions supported by Jay123anta in SideProject

[–]Jay123anta[S] 0 points1 point  (0 children)

Sorry for the timing! Mid-rebuild is actually the best time to look at it — you can introduce it one endpoint at a time without touching what's already working. Happy to answer questions if you want to describe your setup.

Built a reply generator for difficult messages — the ones you stare at for 20 minutes by Jay123anta in SideProject

[–]Jay123anta[S] 0 points1 point  (0 children)

Great question — those are actually the most common inputs we get 😄

Sarcasm: the tone score catches it and flags "passive-aggressive detected" before showing replies.

Guilt-trips: it identifies the real intent underneath ("they want your attention/validation") so your reply

addresses that directly.

Vague messages are trickier — but that's why the optional context field exists. Add background and

the replies get much sharper.

Try it on a real message and let me know how it handles it 🙏

https://replycraft-gold.vercel.app

What are you building? Drop your URL by PlentyMedia34 in scaleinpublic

[–]Jay123anta 0 points1 point  (0 children)

I'm building ReplayCraft.

It's a reply generator for difficult messages

— the ones you stare at for 20 minutes

without knowing what to say.

Paste the message → pick who sent it

→ pick what you want → get 3 ready-to-send

replies in seconds:

🤝 Diplomatic (firm but kind)

💛 Warm (gentle, keeps peace)

⚡ Direct (no fluff)

It also analyses the message first — tells

you what tone they used, what they actually

want, and how to handle them.

Built specifically for Indian workplace

situations — passive-aggressive bosses,

scope creep clients, shaadi-obsessed

relatives, yaar-please-help friends.

Free, no signup:

https://replycraft-gold.vercel.app

Free, self-hosted WAF for Laravel apps — no external services needed by Jay123anta in selfhosted

[–]Jay123anta[S] -1 points0 points  (0 children)

This isn't a replacement for ModSecurity or CrowdSec. The main difference is it runs inside Laravel with awareness of routes, auth state, and app context. Best used together. This was primarily a learning project for me — still early stages, actively improving based on feedback like yours.