feat: implement JWT auth, organizer profiles, Soroban listener, and currency rates#559
Merged
Merged
Conversation
|
@Divine-designs is attempting to deploy a commit to the oseh-svg's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@Divine-designs Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
Contributor
Author
|
done |
Contributor
Author
|
More instances of tests passing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Description
Description:
This PR implements four features across the Rust backend and Next.js frontend:
#484 — JWT Authentication Challenge-response flow: backend issues a random nonce, frontend signs it with the Stellar wallet's Ed25519 key, backend verifies the signature and issues a 24-hour JWT. Protected routes extract user_address from the Authorization: Bearer header. Nonces are stored in a new jwt_nonces table with 5-minute expiry and single-use enforcement.
#486 — Organizer Profile Management New organizer_profiles table keyed by Stellar wallet address. PUT /api/v1/profile upserts the profile with validation (display_name ≤ 50 chars, bio ≤ 500 chars). Profile data is returned in GET /api/v1/events/:id responses. Mirrored in the Next.js app at PUT /api/profile.
#490 — Soroban Event Listener Background task that long-polls the Stellar RPC getEvents endpoint every 5 seconds. Parses ticket_purchased, ticket_refunded, event_registered, and event_status_updated events. Re-org protection via MIN_CONFIRMATIONS = 2. Idempotent upserts on stellar_id.
#495 — Multiple Currency Support GET /api/v1/rates fetches USDC conversion rates from CoinGecko for 10 currencies (USD, NGN, EUR, GBP, KES, GHS, ZAR, CAD, AUD, JPY), cached in Redis for 60 seconds. Proxied to the frontend at GET /api/rates with a static fallback.
Also fixes pre-existing clippy and fmt issues across the server and contracts.
Checklist:
Closes #484
Closes #486
Closes #490
Closes #495