Skip to content

uber clone blog#2852

Merged
atharvadeosthale merged 5 commits intomainfrom
atharva/exp-uber-clone
Apr 3, 2026
Merged

uber clone blog#2852
atharvadeosthale merged 5 commits intomainfrom
atharva/exp-uber-clone

Conversation

@atharvadeosthale
Copy link
Copy Markdown
Member

No description provided.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 2, 2026

Greptile Summary

This PR adds a new blog post tutorial demonstrating how to build an Uber-like ride-hailing app with Next.js and Appwrite, showcasing geo queries (Query.distanceLessThan), spatial indexes, realtime subscriptions, and row-level permissions.

Improvements from the previous revision (all previously flagged issues resolved):

  • OTP generation now correctly uses crypto.randomInt instead of Math.random()
  • updateDriverLocationAction properly re-throws non-404 errors via AppwriteException check
  • acceptRideAction scopes post-acceptance permissions to Role.user(riderId) and Role.user(driverId) rather than the overly-broad Role.users()
  • The race condition in ride acceptance is now addressed with an Appwrite transaction + conflict-on-commit pattern

One remaining issue:

  • The post-commit getRow in acceptRideAction sits inside the same try block that triggers a rollback. A transient failure of that read would cause the rollback path to fire against an already-committed transaction, then throw a misleading "Ride is no longer available" error to the caller even though the driver did successfully accept the ride.

Confidence Score: 4/5

Safe to merge after fixing the post-commit getRow placement in acceptRideAction to avoid a misleading error on a successful commit.

All four previously flagged P0/P1 issues have been correctly addressed. One new P1 logic bug remains: a successful transaction commit followed by a transient getRow failure causes a spurious rollback attempt and an incorrect "Ride is no longer available" error, leaving the driver's UI out of sync with the (correctly committed) database state. This is a present defect in the tutorial code path and warrants a fix before publishing.

src/routes/blog/post/uber-clone-nextjs-appwrite/+page.markdoc — the acceptRideAction transaction block needs the post-commit getRow moved outside the rollback catch.

Important Files Changed

Filename Overview
src/routes/blog/post/uber-clone-nextjs-appwrite/+page.markdoc New blog tutorial covering an Uber-clone built with Next.js and Appwrite geo queries + realtime; previously flagged issues (insecure OTP, error swallowing, overly-permissive permissions, race condition) are all resolved, but the post-commit getRow is inside the rollback catch block which can surface a misleading "Ride is no longer available" error after a successful commit.
.optimize-cache.json Cache entries added for the new blog post images; no issues.

Reviews (5): Last reviewed commit: "fixes" | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

@adityaoberai adityaoberai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving with some comments

@atharvadeosthale atharvadeosthale merged commit 6f521e9 into main Apr 3, 2026
6 checks passed
@atharvadeosthale atharvadeosthale deleted the atharva/exp-uber-clone branch April 3, 2026 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants