Skip to content

feat: implement caching layer and roadmap db indexing#853

Merged
ayomideadeniran merged 2 commits into
StellarDevHub:mainfrom
ekelemepraise-code:feat/caching-and-indexing
Jun 28, 2026
Merged

feat: implement caching layer and roadmap db indexing#853
ayomideadeniran merged 2 commits into
StellarDevHub:mainfrom
ekelemepraise-code:feat/caching-and-indexing

Conversation

@ekelemepraise-code

Copy link
Copy Markdown
Contributor

🚀 Feature Overview

This pull request implements two MVP-critical features for the Web3 Student Lab platform, targeting both the Soroban smart contract architecture and the React-based curriculum frontend.

Fixes Issues


🛠️ Implementation Details

1. Smart Contract Caching Layer (#786)

Developed an on-chain caching mechanism to enhance the execution efficiency and overall user experience for the Smart Contract Playground module.

  • Contract Created: contracts/src/playground_cache.rs
  • Features:
    • Implemented core key-value persistent storage via the PlaygroundCacheContract.
    • Secured caching mutations (set_cache) behind administrative RBAC validation logic.
    • Added inline comprehensive test suites utilizing soroban_sdk::testutils to validate state hydration, administrative restrictions, and caching data accuracy.
    • Registered the new module safely within the contract lib.rs exports.

2. Frontend Roadmap Database Indexing (#785)

Integrated an offline-first indexed storage mechanism into the Web3 Learning Roadmap, converting it from a stateless component into a fully dynamic and persistent user journey tracking system.

  • Database Manager Expanded: Upgraded the internal IndexedDB schema to DB_VERSION = 2 within DatabaseManager.ts by introducing the roadmap_nodes Object Store.
  • Indexing Capabilities: Setup dual-indexing for node query tracking (status and updatedAt).
  • Roadmap Component (page.tsx) Updated:
    • Refactored the UI component to securely hydrate progress from IndexedDB seamlessly on initialization.
    • Ensured dynamic user interactions automatically sync progression changes (IN_PROGRESS to COMPLETED) down to the newly-created local database layer.

✅ Acceptance Criteria Validated

  • Caching Layer feature is fully functional and passes all automated Soroban Rust tests.
  • Roadmap Database Indexing is strictly typed and handles node progressions seamlessly.
  • Implementation preserves backward compatibility with existing Web3 Learning Roadmap and Smart Contract Playground infrastructure.
  • Code meets project style guidelines (TypeScript, Rust, Tailwind CSS).

🗂️ Checklist

  • Performed a self-review of the code
  • Verified local test suites pass (cargo test)
  • Verified frontend build completes securely (npm run build)
  • Minimal changes ensuring stability across existing implementations

Closes #786
Closes #792
Closes #788
Closes #785

@vercel

vercel Bot commented Jun 28, 2026

Copy link
Copy Markdown

@EDOHWARES is attempting to deploy a commit to the Ayomide Adeniran's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 28, 2026

Copy link
Copy Markdown

@ekelemepraise-code 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! 🚀

Learn more about application limits

@ayomideadeniran

Copy link
Copy Markdown
Contributor

Well implemented

@ayomideadeniran

Copy link
Copy Markdown
Contributor

Still Under review

@ayomideadeniran ayomideadeniran merged commit a451275 into StellarDevHub:main Jun 28, 2026
0 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants