Skip to content

Conversation

@delfinacorr
Copy link
Collaborator

@delfinacorr delfinacorr commented Jan 30, 2026

Change Summary

The state mapping logic for the Didit identity provider has been centralized. Previously, the logic for converting Didit states to the application's internal states was duplicated across multiple files, making maintenance difficult and increasing the risk of inconsistencies.

🛠️ Technical Details

1 Creation of the Centralized Service:

  • The file apps/web/lib/services/didit.ts was created, containing the pure function mapDiditStatusToKYC.

  • This function standardizes the inputs (e.g., Approved, Declined) to our state system (approved, rejected, pending).

2: Redundancy Removal (DRY - Don't Repeat Yourself):

  • Manual switch blocks and repeated mapping logic were removed from:

  • apps/web/app/(routes)/profile/page.tsx (User Interface).

  • apps/web/app/api/kyc/didit/webhook/route.ts (Automatic Events).

  • apps/web/app/api/kyc/didit/check-status/route.ts (Status Inquiry).

  • apps/web/app/api/kyc/didit/callback/route.ts (User Return).

3 Typing and Routing Corrections:

  • Imports were adjusted using relative paths to ensure compatibility with the monorepo structure.

  • Discrepancies in variable names (e.g., diditData) were corrected to ensure data flow.

✅ Verification and Testing

  • Unit Testing: A test script was run using Bun, validating all possible Didit response cases and confirming that the mapping function responds correctly in all scenarios.

  • Development Environment Testing: The application's stability was verified locally , confirming that critical paths and the authentication middleware function without errors.

Captura de pantalla 2026-01-30 200807 Captura de pantalla 2026-01-30 200828 Captura de pantalla 2026-01-30 200843
  • Static Analysis: TypeScript does not report any typing errors in the modified files.

💡 Impact

  • Maintainability: If Didit introduces new states in its API, only one file will need to be modified instead of four.

  • Robustness: Reduced the likelihood of errors when processing webhooks and status queries identically.

Note: Tested with a test session (test123) and the corresponding URL parameters, obtaining a successful response (HTTP 200) from the server.

Captura de pantalla 2026-01-30 200631

closes #770

Summary by CodeRabbit

  • Refactor

    • Improved consistency of KYC verification status processing across verification endpoints.
    • Streamlined logging output by removing decorative formatting.
  • Chores

    • Updated TypeScript JSX transformation configuration.

✏️ Tip: You can customize this high-level summary in your review settings.

@vercel
Copy link
Contributor

vercel bot commented Jan 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
kindfi Ready Ready Preview, Comment Jan 31, 2026 0:16am

Request Review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 30, 2026

Walkthrough

This PR extracts duplicated Didit-to-KYC status mapping logic from four files into a shared utility function mapDiditStatusToKYC in the didit service layer. The refactoring consolidates a repeated switch statement across the profile page and three API routes. Additionally, the JSX compilation strategy in tsconfig is updated from "preserve" to "react-jsx".

Changes

Cohort / File(s) Summary
Didit Status Mapping Consolidation
apps/web/app/(routes)/profile/page.tsx, apps/web/app/api/kyc/didit/callback/route.ts, apps/web/app/api/kyc/didit/check-status/route.ts, apps/web/app/api/kyc/didit/webhook/route.ts
Replaced inline switch-based status mappings with calls to the centralized mapDiditStatusToKYC() helper function; removed emojis from log messages in profile page.
Didit Service Utility
apps/web/lib/services/didit.ts
Added exported KYCStatus type and new mapDiditStatusToKYC() function to provide a single source of truth for Didit-to-KYC status conversions.
TypeScript Configuration
apps/web/tsconfig.json
Updated JSX compiler option from "preserve" to "react-jsx" to enable React 17+ automatic JSX runtime.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Possibly related PRs

  • feat: add didit KYC user flow #768: Related PR that also modifies the Didit KYC flow; this PR completes the refactoring by extracting the duplicated status mapping logic into a shared utility.

Suggested reviewers

  • Bran18
  • AndlerRL

Poem

📦 Four switches become one,
Duplication undone,
A mapping utility shines bright,
DRY principles taking flight,
Status flows clean and aligned! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The JSX tsconfig change from 'preserve' to 'react-jsx' appears unrelated to the core refactoring objective of centralizing Didit status mapping. Consider moving the tsconfig.json JSX update to a separate PR or clarify its necessity for this refactoring's functionality and testing.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: centralization of duplicated Didit KYC status mapping logic into a shared utility function across four files.
Linked Issues check ✅ Passed The PR successfully implements all coding objectives from #770: creates mapDiditStatusToKYC function with correct status mappings and replaces all four inline mapping blocks with calls to this utility.
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/didit-kyc-mapping

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai bot added backend Back-end development related difficulty: medium This issue requires a moderate to a little challenge effort on complexity kyc server kyc server app related refactor Code refactoring and improvements webapp web app related labels Jan 30, 2026
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 8

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
apps/web/app/api/kyc/didit/callback/route.ts (1)

14-32: ⚠️ Potential issue | 🟠 Major

Good consolidation of mapping logic; we should add rate limiting to this API route. This endpoint is publicly reachable and should be protected against abuse.

As per coding guidelines: “**/app/api/**/*.{ts,tsx}: Implement rate limiting for API routes”.

apps/web/app/api/kyc/didit/webhook/route.ts (1)

35-113: ⚠️ Potential issue | 🟠 Major

Solid mapping refactor; we should add rate limiting for this webhook route. Even signed webhooks benefit from rate limiting to mitigate abuse and retries.

As per coding guidelines: “**/app/api/**/*.{ts,tsx}: Implement rate limiting for API routes”.

apps/web/app/api/kyc/didit/check-status/route.ts (1)

15-70: ⚠️ Potential issue | 🟠 Major

Nice consolidation of status logic; we should add rate limiting for this API route. This endpoint is user‑triggered and should be protected from excessive polling.

As per coding guidelines: “**/app/api/**/*.{ts,tsx}: Implement rate limiting for API routes”.

🤖 Fix all issues with AI agents
In `@apps/web/app/`(routes)/profile/page.tsx:
- Line 7: The import for the shared mapper mapDiditStatusToKYC in page.tsx uses
a brittle relative path; update the import to use the project alias (e.g.,
replace '../../../lib/services/didit' with the configured '~' alias such as
'~/lib/services/didit') so mapDiditStatusToKYC is imported via the aliased path
for consistency and maintainability.
- Line 92: The log message console.log('Creating new KYC record for declined
status') is misleading because "declined" may not be the actual status; update
the log in the handler that creates a KYC record (replace that console.log call)
to interpolate the actual status variable in scope (e.g., status, kycStatus, or
result.status) and include minimal context like the kyc id or user id if
available so the message accurately reflects the real status when creating the
record.

In `@apps/web/app/api/kyc/didit/callback/route.ts`:
- Line 6: Replace the relative import for mapDiditStatusToKYC with the project
"~" alias so it matches other Didit utilities; locate the import statement that
brings in mapDiditStatusToKYC and change it to use the alias form (e.g., from
"~lib/services/didit") to keep imports consistent across the codebase.

In `@apps/web/app/api/kyc/didit/check-status/route.ts`:
- Line 7: The import of mapDiditStatusToKYC should be consolidated into the
existing Didit service import to keep module paths consistent: locate the
current separate import statement for mapDiditStatusToKYC and merge it with the
existing Didit service import (the import that brings in the Didit service
functions/classes), so that both mapDiditStatusToKYC and the Didit service
symbols are imported from the same module in a single import line; update any
renamed bindings as needed to avoid conflicts.

In `@apps/web/app/api/kyc/didit/webhook/route.ts`:
- Line 10: Replace the deep relative import of mapDiditStatusToKYC with the same
project import alias used by the signature helpers to keep imports consistent;
locate the import statement for mapDiditStatusToKYC in route.ts and change it
from the long relative path to the shared alias (the same module path pattern
used by the signature helper imports) so future refactors and tooling resolve
imports uniformly.

In `@apps/web/lib/services/didit.ts`:
- Around line 280-295: Replace the function declaration mapDiditStatusToKYC with
a const arrow function export to match project TypeScript style: export const
mapDiditStatusToKYC = (diditStatus: string): KYCStatus => { ... }; keep the same
switch logic and return values, retain the exported KYCStatus type, and ensure
the explicit parameter and return type annotations are present so the signature
and behavior are unchanged.

In `@test-kyc.ts`:
- Around line 1-9: The test's case matrix should be strongly typed: import the
KYC return type with "import type { KYCStatus } from
'./apps/web/lib/services/didit'" (or the appropriate exported type) and change
the cases declaration to be typed (e.g., const cases: { input: string; expected:
KYCStatus }[]), and explicitly annotate any test helper or iteration callback
parameter types so the expected values align with mapDiditStatusToKYC's return
type; locate the symbol mapDiditStatusToKYC and the const cases in test-kyc.ts
to apply these changes.
- Around line 11-22: The test script only logs mismatches and doesn't fail CI;
update the test to track failures (e.g., a failure counter) while iterating over
cases and call process.exit(1) if any failures occurred after the loop; also add
an explicit TestCase type/interface and annotate the cases array (referencing
the cases variable and the mapDiditStatusToKYC function) to improve type safety
and clarity.

test-kyc.ts Outdated
Comment on lines 1 to 9
import { mapDiditStatusToKYC } from './apps/web/lib/services/didit'

const cases = [
{ input: 'Approved', expected: 'approved' },
{ input: 'Declined', expected: 'rejected' },
{ input: 'In Review', expected: 'pending' },
{ input: 'Abandoned', expected: 'pending' },
{ input: 'UnknownStatus', expected: 'pending' },
]
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Nice use of a compact case matrix; we could enhance type safety with a typed case list. This keeps expected values aligned to the mapper’s return type.

🔒 Suggested typing with `import type`
-import { mapDiditStatusToKYC } from './apps/web/lib/services/didit'
+import { mapDiditStatusToKYC } from './apps/web/lib/services/didit'
+import type { KYCStatus } from './apps/web/lib/services/didit'

-const cases = [
+const cases: Array<{ input: string; expected: KYCStatus }> = [
 	{ input: 'Approved', expected: 'approved' },
 	{ input: 'Declined', expected: 'rejected' },
 	{ input: 'In Review', expected: 'pending' },
 	{ input: 'Abandoned', expected: 'pending' },
 	{ input: 'UnknownStatus', expected: 'pending' },
 ]
As per coding guidelines: “Import types using the `import type` syntax for TypeScript type declarations” and “Explicitly annotate function parameters and return types in TypeScript”.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import { mapDiditStatusToKYC } from './apps/web/lib/services/didit'
const cases = [
{ input: 'Approved', expected: 'approved' },
{ input: 'Declined', expected: 'rejected' },
{ input: 'In Review', expected: 'pending' },
{ input: 'Abandoned', expected: 'pending' },
{ input: 'UnknownStatus', expected: 'pending' },
]
import { mapDiditStatusToKYC } from './apps/web/lib/services/didit'
import type { KYCStatus } from './apps/web/lib/services/didit'
const cases: Array<{ input: string; expected: KYCStatus }> = [
{ input: 'Approved', expected: 'approved' },
{ input: 'Declined', expected: 'rejected' },
{ input: 'In Review', expected: 'pending' },
{ input: 'Abandoned', expected: 'pending' },
{ input: 'UnknownStatus', expected: 'pending' },
]
🤖 Prompt for AI Agents
In `@test-kyc.ts` around lines 1 - 9, The test's case matrix should be strongly
typed: import the KYC return type with "import type { KYCStatus } from
'./apps/web/lib/services/didit'" (or the appropriate exported type) and change
the cases declaration to be typed (e.g., const cases: { input: string; expected:
KYCStatus }[]), and explicitly annotate any test helper or iteration callback
parameter types so the expected values align with mapDiditStatusToKYC's return
type; locate the symbol mapDiditStatusToKYC and the const cases in test-kyc.ts
to apply these changes.

test-kyc.ts Outdated
Comment on lines 11 to 22
console.log(' Iniciando prueba de mapeo KYC...\n')

cases.forEach(({ input, expected }) => {
const result = mapDiditStatusToKYC(input)
if (result === expected) {
console.log(`✅ PASÓ: Input "${input}" -> Result "${result}"`)
} else {
console.log(
`❌ FALLÓ: Input "${input}" -> Se esperaba "${expected}" pero llegó "${result}"`,
)
}
})
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

fd test-kyc.ts

Repository: kindfi-org/kindfi

Length of output: 72


🏁 Script executed:

cat -n test-kyc.ts

Repository: kindfi-org/kindfi

Length of output: 934


Consider signaling test failures via process exit code to prevent CI from passing on mismatches. Currently, test failures only log to the console, allowing CI pipelines to pass even when assertions fail. We could enhance this by tracking failures and setting the appropriate exit code.

Additionally, for better type safety and clarity, consider adding an explicit type annotation for the cases array:

interface TestCase {
  input: string
  expected: string
}

const cases: TestCase[] = [
  { input: 'Approved', expected: 'approved' },
  // ...
]
Suggested fix to signal failure
+interface TestCase {
+  input: string
+  expected: string
+}
+
 import { mapDiditStatusToKYC } from './apps/web/lib/services/didit'
 
-const cases = [
+const cases: TestCase[] = [
 	{ input: 'Approved', expected: 'approved' },
 	{ input: 'Declined', expected: 'rejected' },
 	{ input: 'In Review', expected: 'pending' },
 	{ input: 'Abandoned', expected: 'pending' },
 	{ input: 'UnknownStatus', expected: 'pending' },
 ]
 
 console.log(' Iniciando prueba de mapeo KYC...\n')
 
+let hasFailure = false
+
 cases.forEach(({ input, expected }) => {
 	const result = mapDiditStatusToKYC(input)
 	if (result === expected) {
 		console.log(`✅ PASÓ: Input "${input}" -> Result "${result}"`)
 	} else {
+		hasFailure = true
 		console.log(
 			`❌ FALLÓ: Input "${input}" -> Se esperaba "${expected}" pero llegó "${result}"`,
 		)
 	}
 })
 
+if (hasFailure) {
+	process.exitCode = 1
+}
 console.log('\n Prueba terminada.')
🤖 Prompt for AI Agents
In `@test-kyc.ts` around lines 11 - 22, The test script only logs mismatches and
doesn't fail CI; update the test to track failures (e.g., a failure counter)
while iterating over cases and call process.exit(1) if any failures occurred
after the loop; also add an explicit TestCase type/interface and annotate the
cases array (referencing the cases variable and the mapDiditStatusToKYC
function) to improve type safety and clarity.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@apps/web/app/`(routes)/profile/page.tsx:
- Around line 86-88: Remove the leading spaces in the console messages around
the KYC update so logs are consistent: update the console.error call that logs
updateResult.error and the console.log call that logs kycStatus (referenced as
updateResult and kycStatus) to use trimmed messages without the prefixed space,
e.g., change "' Failed to update KYC record:'" and "' Successfully updated KYC
status to:'" to "'Failed to update KYC record:'" and "'Successfully updated KYC
status to:'".

Comment on lines +86 to +88
console.error(' Failed to update KYC record:', updateResult.error)
} else {
console.log(' Successfully updated KYC status to:', kycStatus)
console.log(' Successfully updated KYC status to:', kycStatus)
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

Consider removing the leading spaces from log messages.

It appears the emoji prefixes were removed but left behind leading spaces. We could enhance consistency by trimming these:

🔧 Suggested cleanup
 			if (updateResult.error) {
-				console.error(' Failed to update KYC record:', updateResult.error)
+				console.error('Failed to update KYC record:', updateResult.error)
 			} else {
-				console.log(' Successfully updated KYC status to:', kycStatus)
+				console.log('Successfully updated KYC status to:', kycStatus)
 			}
🤖 Prompt for AI Agents
In `@apps/web/app/`(routes)/profile/page.tsx around lines 86 - 88, Remove the
leading spaces in the console messages around the KYC update so logs are
consistent: update the console.error call that logs updateResult.error and the
console.log call that logs kycStatus (referenced as updateResult and kycStatus)
to use trimmed messages without the prefixed space, e.g., change "' Failed to
update KYC record:'" and "' Successfully updated KYC status to:'" to "'Failed to
update KYC record:'" and "'Successfully updated KYC status to:'".

@Bran18 Bran18 merged commit 980700d into develop Jan 31, 2026
3 of 4 checks passed
Bran18 added a commit that referenced this pull request Feb 5, 2026
* feat: add didit KYC user flow (#768)

* feat: add dididt KYC user flow

* fix: build issues

* fix(auth): add pending role state and fix user signup default role

* chore: generate Supabase types from remote instance

* fix: configure Vercel for monorepo and add Supabase types

* feat: kindfi nft open zeppelin (#769)

* feat: add KindFi NFT contract structure and types

- Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies
- Add types.rs with NFTMetadata struct and StorageKey enum
- Add errors.rs with custom error definitions
- Add events.rs with metadata update events

* feat: implement KindFi NFT core functionality

- Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions
- Add metadata.rs for on-chain metadata storage and retrieval
- Add mint.rs for sequential token ID minting with metadata
- Add burn.rs for token burning functionality
- Implement role-based access control (minter, burner, metadata_manager)
- Add OpenZeppelin Stellar Contracts integration

* fix: update workspace members for compilation

- Comment out non-existent contract members to allow compilation
- Add nft-kindfi to implemented contracts
- Reorganize workspace members with clear sections

* chore: update Cargo.lock with new contract dependencies

* feat: update to OpenZeppelin Stellar Contracts v0.6.0

- Update soroban-sdk from 22.0.6 to 23.4.0
- Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0
- Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens

* feat: update nft-kindfi dependencies for v0.6.0

- Update contract dependencies to use new package structure
- stellar-access-control → stellar-access
- stellar-access-control-macros → stellar-macros
- stellar-non-fungible → stellar-tokens

* refactor: update imports for OpenZeppelin v0.6.0

- Update stellar_access_control imports to stellar_access::access_control
- Update stellar_non_fungible imports to stellar_tokens::non_fungible
- Update stellar_access_control_macros to stellar_macros
- Fix AccessControl trait method signatures to match v0.6.0 API

* chore: kindfi information in the workspace.package and comments added in members

* fix: target changed to wasm32v1-none and leaving necessary components

* chore: Add additional information about kindfi to contract cargo.toml and change crate-type to just (cdylib)

* fix: config.toml file removed since it generated conflicts with rust base and the tests did not compile

* refactor: change in the use of events, since due to the sdk update they are now used with the contractevent and topic macro

* refactor: structure change in the use of events of the form .publish(e) for the different files that propagate the events

* doc: detailed documentation about the nft-kindfi contract

* chore: add admin.require_auth() add admin.require_auth() for validation and security of contract initialization

* fix: validation was added for the metadata and the event was created to send this

* feat: Reputation Contract for NFT Level Management (#773)

* feat: add KindFi NFT contract structure and types

- Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies
- Add types.rs with NFTMetadata struct and StorageKey enum
- Add errors.rs with custom error definitions
- Add events.rs with metadata update events

* feat: implement KindFi NFT core functionality

- Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions
- Add metadata.rs for on-chain metadata storage and retrieval
- Add mint.rs for sequential token ID minting with metadata
- Add burn.rs for token burning functionality
- Implement role-based access control (minter, burner, metadata_manager)
- Add OpenZeppelin Stellar Contracts integration

* fix: update workspace members for compilation

- Comment out non-existent contract members to allow compilation
- Add nft-kindfi to implemented contracts
- Reorganize workspace members with clear sections

* chore: update Cargo.lock with new contract dependencies

* feat: update to OpenZeppelin Stellar Contracts v0.6.0

- Update soroban-sdk from 22.0.6 to 23.4.0
- Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0
- Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens

* feat: update nft-kindfi dependencies for v0.6.0

- Update contract dependencies to use new package structure
- stellar-access-control → stellar-access
- stellar-access-control-macros → stellar-macros
- stellar-non-fungible → stellar-tokens

* refactor: update imports for OpenZeppelin v0.6.0

- Update stellar_access_control imports to stellar_access::access_control
- Update stellar_non_fungible imports to stellar_tokens::non_fungible
- Update stellar_access_control_macros to stellar_macros
- Fix AccessControl trait method signatures to match v0.6.0 API

* chore: kindfi information in the workspace.package and comments added in members

* fix: target changed to wasm32v1-none and leaving necessary components

* chore: Add additional information about kindfi to contract cargo.toml and change crate-type to just (cdylib)

* fix: config.toml file removed since it generated conflicts with rust base and the tests did not compile

* refactor: change in the use of events, since due to the sdk update they are now used with the contractevent and topic macro

* refactor: structure change in the use of events of the form .publish(e) for the different files that propagate the events

* doc: detailed documentation about the nft-kindfi contract

* chore: add admin.require_auth() add admin.require_auth() for validation and security of contract initialization

* fix: validation was added for the metadata and the event was created to send this

* feat: add root cargo manifest for contracts workspace

* feat(reputation): add cargo manifest for reputation contract

* feat(reputation): add reputation contract main library

* feat(reputation): add reputation contract types and data structures

* feat(reputation): add reputation contract storage layer

* feat(reputation): add reputation contract error types

* feat(reputation): add reputation contract events

* feat(reputation): add NFT client integration for reputation contract

* docs(reputation): add reputation contract documentation

---------

Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com>

* feat: Comprehensive Tests and Integration for NFT & Reputation Contracts (#774)

* feat: add KindFi NFT contract structure and types

- Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies
- Add types.rs with NFTMetadata struct and StorageKey enum
- Add errors.rs with custom error definitions
- Add events.rs with metadata update events

* feat: implement KindFi NFT core functionality

- Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions
- Add metadata.rs for on-chain metadata storage and retrieval
- Add mint.rs for sequential token ID minting with metadata
- Add burn.rs for token burning functionality
- Implement role-based access control (minter, burner, metadata_manager)
- Add OpenZeppelin Stellar Contracts integration

* fix: update workspace members for compilation

- Comment out non-existent contract members to allow compilation
- Add nft-kindfi to implemented contracts
- Reorganize workspace members with clear sections

* chore: update Cargo.lock with new contract dependencies

* feat: update to OpenZeppelin Stellar Contracts v0.6.0

- Update soroban-sdk from 22.0.6 to 23.4.0
- Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0
- Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens

* feat: update nft-kindfi dependencies for v0.6.0

- Update contract dependencies to use new package structure
- stellar-access-control → stellar-access
- stellar-access-control-macros → stellar-macros
- stellar-non-fungible → stellar-tokens

* refactor: update imports for OpenZeppelin v0.6.0

- Update stellar_access_control imports to stellar_access::access_control
- Update stellar_non_fungible imports to stellar_tokens::non_fungible
- Update stellar_access_control_macros to stellar_macros
- Fix AccessControl trait method signatures to match v0.6.0 API

* chore: kindfi information in the workspace.package and comments added in members

* fix: target changed to wasm32v1-none and leaving necessary components

* chore: Add additional information about kindfi to contract cargo.toml and change crate-type to just (cdylib)

* fix: config.toml file removed since it generated conflicts with rust base and the tests did not compile

* refactor: change in the use of events, since due to the sdk update they are now used with the contractevent and topic macro

* refactor: structure change in the use of events of the form .publish(e) for the different files that propagate the events

* doc: detailed documentation about the nft-kindfi contract

* chore: add admin.require_auth() add admin.require_auth() for validation and security of contract initialization

* fix: validation was added for the metadata and the event was created to send this

* feat: add root cargo manifest for contracts workspace

* feat(reputation): add cargo manifest for reputation contract

* feat(reputation): add reputation contract main library

* feat(reputation): add reputation contract types and data structures

* feat(reputation): add reputation contract storage layer

* feat(reputation): add reputation contract error types

* feat(reputation): add reputation contract events

* feat(reputation): add NFT client integration for reputation contract

* docs(reputation): add reputation contract documentation

* test(reputation): add reputation contract tests

* test(nft): add NFT contract tests

---------

Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com>

* feat: Deployment Scripts and Configuration for NFT & Reputation Contracts (#775)

* feat: add KindFi NFT contract structure and types

- Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies
- Add types.rs with NFTMetadata struct and StorageKey enum
- Add errors.rs with custom error definitions
- Add events.rs with metadata update events

* feat: implement KindFi NFT core functionality

- Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions
- Add metadata.rs for on-chain metadata storage and retrieval
- Add mint.rs for sequential token ID minting with metadata
- Add burn.rs for token burning functionality
- Implement role-based access control (minter, burner, metadata_manager)
- Add OpenZeppelin Stellar Contracts integration

* fix: update workspace members for compilation

- Comment out non-existent contract members to allow compilation
- Add nft-kindfi to implemented contracts
- Reorganize workspace members with clear sections

* chore: update Cargo.lock with new contract dependencies

* feat: update to OpenZeppelin Stellar Contracts v0.6.0

- Update soroban-sdk from 22.0.6 to 23.4.0
- Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0
- Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens

* feat: update nft-kindfi dependencies for v0.6.0

- Update contract dependencies to use new package structure
- stellar-access-control → stellar-access
- stellar-access-control-macros → stellar-macros
- stellar-non-fungible → stellar-tokens

* refactor: update imports for OpenZeppelin v0.6.0

- Update stellar_access_control imports to stellar_access::access_control
- Update stellar_non_fungible imports to stellar_tokens::non_fungible
- Update stellar_access_control_macros to stellar_macros
- Fix AccessControl trait method signatures to match v0.6.0 API

* chore: kindfi information in the workspace.package and comments added in members

* fix: target changed to wasm32v1-none and leaving necessary components

* chore: Add additional information about kindfi to contract cargo.toml and change crate-type to just (cdylib)

* fix: config.toml file removed since it generated conflicts with rust base and the tests did not compile

* refactor: change in the use of events, since due to the sdk update they are now used with the contractevent and topic macro

* refactor: structure change in the use of events of the form .publish(e) for the different files that propagate the events

* doc: detailed documentation about the nft-kindfi contract

* chore: add admin.require_auth() add admin.require_auth() for validation and security of contract initialization

* fix: validation was added for the metadata and the event was created to send this

* feat: add root cargo manifest for contracts workspace

* feat(reputation): add cargo manifest for reputation contract

* feat(reputation): add reputation contract main library

* feat(reputation): add reputation contract types and data structures

* feat(reputation): add reputation contract storage layer

* feat(reputation): add reputation contract error types

* feat(reputation): add reputation contract events

* feat(reputation): add NFT client integration for reputation contract

* docs(reputation): add reputation contract documentation

* test(reputation): add reputation contract tests

* test(nft): add NFT contract tests

* chore: update cargo lock file

* docs: update contracts README

* script: add NFT contract deployment script

* script: add reputation contract deployment script

* chore: add environment example file

---------

Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com>

* feat: refactor nft-kindfi with SEP-0050 compatibility (#778)

* feat: add SEP-0050 compliant NFTAttribute struct to nft-kindfi types

Replace Vec<String> attributes with Vec<NFTAttribute> using structured
fields (trait_type, value, display_type, max_value) to comply with the
SEP-0050 Non-Fungible Metadata JSON Schema.

* feat: update nft-kindfi tests to use NFTAttribute struct

Adapt all test helpers and test cases to use the new SEP-0050 compliant
NFTAttribute struct instead of plain strings for metadata attributes.

* feat: update reputation nft_client to SEP-0050 attribute format

Refactor NFTMetadata mirror and level attribute helpers to use the new
NFTAttribute struct. Update cross-contract call types and all related
tests for SEP-0050 compliance.

* fix(kyc): prevent URL params cleanup on failure and add error toasts (#777)

* fix(kyc): prevent URL params cleanup on failure and add error toasts

* refactor(kyc): deduplicate error message string per code review

* fix(kyc): sync with develop and add error logging per code review

* refactor: centralize didit kyc status mapping logic (#779)

* refactor: centralize didit kyc status mapping logic

* refactor: apply code review feedback (arrow functions, type-only imports, and alias paths)

* style(ui): use bg-primary token instead of hex code in progress bar (#780)

Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com>

* chore: add vercel skills set for OSS

* fix: add new migration strategy

* feat: add fundation support

* chore: generate Supabase database types using MCP tool

- Generated complete TypeScript types from Supabase database
- Includes all tables, enums, functions, and relationships
- Fixes Vercel build error: Module '@services/supabase' has no exported member 'Database'

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: add complete Supabase database types

- Generated TypeScript types from Supabase database using MCP tool
- Includes all tables, enums, functions, and relationships
- Fixes Vercel build error: Module '@services/supabase' has no exported member 'Database'

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: add complete Supabase database types

- Generated TypeScript types from Supabase database using MCP tool
- Includes all tables, enums, functions, and relationships
- Fixes Vercel build error: Module '@services/supabase' has no exported member 'Database'

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Matias Aguilar <aaguilar1x@gmail.com>
Co-authored-by: Karen Giannetto <karengiannetto99@gmail.com>
Co-authored-by: Delfina luna Corradini <105253541+delfinacorr@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Bran18 added a commit that referenced this pull request Feb 5, 2026
* feat: add didit KYC user flow (#768)

* feat: add dididt KYC user flow

* fix: build issues

* fix(auth): add pending role state and fix user signup default role

* chore: generate Supabase types from remote instance

* fix: configure Vercel for monorepo and add Supabase types

* feat: kindfi nft open zeppelin (#769)

* feat: add KindFi NFT contract structure and types

- Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies
- Add types.rs with NFTMetadata struct and StorageKey enum
- Add errors.rs with custom error definitions
- Add events.rs with metadata update events

* feat: implement KindFi NFT core functionality

- Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions
- Add metadata.rs for on-chain metadata storage and retrieval
- Add mint.rs for sequential token ID minting with metadata
- Add burn.rs for token burning functionality
- Implement role-based access control (minter, burner, metadata_manager)
- Add OpenZeppelin Stellar Contracts integration

* fix: update workspace members for compilation

- Comment out non-existent contract members to allow compilation
- Add nft-kindfi to implemented contracts
- Reorganize workspace members with clear sections

* chore: update Cargo.lock with new contract dependencies

* feat: update to OpenZeppelin Stellar Contracts v0.6.0

- Update soroban-sdk from 22.0.6 to 23.4.0
- Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0
- Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens

* feat: update nft-kindfi dependencies for v0.6.0

- Update contract dependencies to use new package structure
- stellar-access-control → stellar-access
- stellar-access-control-macros → stellar-macros
- stellar-non-fungible → stellar-tokens

* refactor: update imports for OpenZeppelin v0.6.0

- Update stellar_access_control imports to stellar_access::access_control
- Update stellar_non_fungible imports to stellar_tokens::non_fungible
- Update stellar_access_control_macros to stellar_macros
- Fix AccessControl trait method signatures to match v0.6.0 API

* chore: kindfi information in the workspace.package and comments added in members

* fix: target changed to wasm32v1-none and leaving necessary components

* chore: Add additional information about kindfi to contract cargo.toml and change crate-type to just (cdylib)

* fix: config.toml file removed since it generated conflicts with rust base and the tests did not compile

* refactor: change in the use of events, since due to the sdk update they are now used with the contractevent and topic macro

* refactor: structure change in the use of events of the form .publish(e) for the different files that propagate the events

* doc: detailed documentation about the nft-kindfi contract

* chore: add admin.require_auth() add admin.require_auth() for validation and security of contract initialization

* fix: validation was added for the metadata and the event was created to send this

* feat: Reputation Contract for NFT Level Management (#773)

* feat: add KindFi NFT contract structure and types

- Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies
- Add types.rs with NFTMetadata struct and StorageKey enum
- Add errors.rs with custom error definitions
- Add events.rs with metadata update events

* feat: implement KindFi NFT core functionality

- Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions
- Add metadata.rs for on-chain metadata storage and retrieval
- Add mint.rs for sequential token ID minting with metadata
- Add burn.rs for token burning functionality
- Implement role-based access control (minter, burner, metadata_manager)
- Add OpenZeppelin Stellar Contracts integration

* fix: update workspace members for compilation

- Comment out non-existent contract members to allow compilation
- Add nft-kindfi to implemented contracts
- Reorganize workspace members with clear sections

* chore: update Cargo.lock with new contract dependencies

* feat: update to OpenZeppelin Stellar Contracts v0.6.0

- Update soroban-sdk from 22.0.6 to 23.4.0
- Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0
- Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens

* feat: update nft-kindfi dependencies for v0.6.0

- Update contract dependencies to use new package structure
- stellar-access-control → stellar-access
- stellar-access-control-macros → stellar-macros
- stellar-non-fungible → stellar-tokens

* refactor: update imports for OpenZeppelin v0.6.0

- Update stellar_access_control imports to stellar_access::access_control
- Update stellar_non_fungible imports to stellar_tokens::non_fungible
- Update stellar_access_control_macros to stellar_macros
- Fix AccessControl trait method signatures to match v0.6.0 API

* chore: kindfi information in the workspace.package and comments added in members

* fix: target changed to wasm32v1-none and leaving necessary components

* chore: Add additional information about kindfi to contract cargo.toml and change crate-type to just (cdylib)

* fix: config.toml file removed since it generated conflicts with rust base and the tests did not compile

* refactor: change in the use of events, since due to the sdk update they are now used with the contractevent and topic macro

* refactor: structure change in the use of events of the form .publish(e) for the different files that propagate the events

* doc: detailed documentation about the nft-kindfi contract

* chore: add admin.require_auth() add admin.require_auth() for validation and security of contract initialization

* fix: validation was added for the metadata and the event was created to send this

* feat: add root cargo manifest for contracts workspace

* feat(reputation): add cargo manifest for reputation contract

* feat(reputation): add reputation contract main library

* feat(reputation): add reputation contract types and data structures

* feat(reputation): add reputation contract storage layer

* feat(reputation): add reputation contract error types

* feat(reputation): add reputation contract events

* feat(reputation): add NFT client integration for reputation contract

* docs(reputation): add reputation contract documentation

---------

Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com>

* feat: Comprehensive Tests and Integration for NFT & Reputation Contracts (#774)

* feat: add KindFi NFT contract structure and types

- Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies
- Add types.rs with NFTMetadata struct and StorageKey enum
- Add errors.rs with custom error definitions
- Add events.rs with metadata update events

* feat: implement KindFi NFT core functionality

- Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions
- Add metadata.rs for on-chain metadata storage and retrieval
- Add mint.rs for sequential token ID minting with metadata
- Add burn.rs for token burning functionality
- Implement role-based access control (minter, burner, metadata_manager)
- Add OpenZeppelin Stellar Contracts integration

* fix: update workspace members for compilation

- Comment out non-existent contract members to allow compilation
- Add nft-kindfi to implemented contracts
- Reorganize workspace members with clear sections

* chore: update Cargo.lock with new contract dependencies

* feat: update to OpenZeppelin Stellar Contracts v0.6.0

- Update soroban-sdk from 22.0.6 to 23.4.0
- Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0
- Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens

* feat: update nft-kindfi dependencies for v0.6.0

- Update contract dependencies to use new package structure
- stellar-access-control → stellar-access
- stellar-access-control-macros → stellar-macros
- stellar-non-fungible → stellar-tokens

* refactor: update imports for OpenZeppelin v0.6.0

- Update stellar_access_control imports to stellar_access::access_control
- Update stellar_non_fungible imports to stellar_tokens::non_fungible
- Update stellar_access_control_macros to stellar_macros
- Fix AccessControl trait method signatures to match v0.6.0 API

* chore: kindfi information in the workspace.package and comments added in members

* fix: target changed to wasm32v1-none and leaving necessary components

* chore: Add additional information about kindfi to contract cargo.toml and change crate-type to just (cdylib)

* fix: config.toml file removed since it generated conflicts with rust base and the tests did not compile

* refactor: change in the use of events, since due to the sdk update they are now used with the contractevent and topic macro

* refactor: structure change in the use of events of the form .publish(e) for the different files that propagate the events

* doc: detailed documentation about the nft-kindfi contract

* chore: add admin.require_auth() add admin.require_auth() for validation and security of contract initialization

* fix: validation was added for the metadata and the event was created to send this

* feat: add root cargo manifest for contracts workspace

* feat(reputation): add cargo manifest for reputation contract

* feat(reputation): add reputation contract main library

* feat(reputation): add reputation contract types and data structures

* feat(reputation): add reputation contract storage layer

* feat(reputation): add reputation contract error types

* feat(reputation): add reputation contract events

* feat(reputation): add NFT client integration for reputation contract

* docs(reputation): add reputation contract documentation

* test(reputation): add reputation contract tests

* test(nft): add NFT contract tests

---------

Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com>

* feat: Deployment Scripts and Configuration for NFT & Reputation Contracts (#775)

* feat: add KindFi NFT contract structure and types

- Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies
- Add types.rs with NFTMetadata struct and StorageKey enum
- Add errors.rs with custom error definitions
- Add events.rs with metadata update events

* feat: implement KindFi NFT core functionality

- Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions
- Add metadata.rs for on-chain metadata storage and retrieval
- Add mint.rs for sequential token ID minting with metadata
- Add burn.rs for token burning functionality
- Implement role-based access control (minter, burner, metadata_manager)
- Add OpenZeppelin Stellar Contracts integration

* fix: update workspace members for compilation

- Comment out non-existent contract members to allow compilation
- Add nft-kindfi to implemented contracts
- Reorganize workspace members with clear sections

* chore: update Cargo.lock with new contract dependencies

* feat: update to OpenZeppelin Stellar Contracts v0.6.0

- Update soroban-sdk from 22.0.6 to 23.4.0
- Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0
- Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens

* feat: update nft-kindfi dependencies for v0.6.0

- Update contract dependencies to use new package structure
- stellar-access-control → stellar-access
- stellar-access-control-macros → stellar-macros
- stellar-non-fungible → stellar-tokens

* refactor: update imports for OpenZeppelin v0.6.0

- Update stellar_access_control imports to stellar_access::access_control
- Update stellar_non_fungible imports to stellar_tokens::non_fungible
- Update stellar_access_control_macros to stellar_macros
- Fix AccessControl trait method signatures to match v0.6.0 API

* chore: kindfi information in the workspace.package and comments added in members

* fix: target changed to wasm32v1-none and leaving necessary components

* chore: Add additional information about kindfi to contract cargo.toml and change crate-type to just (cdylib)

* fix: config.toml file removed since it generated conflicts with rust base and the tests did not compile

* refactor: change in the use of events, since due to the sdk update they are now used with the contractevent and topic macro

* refactor: structure change in the use of events of the form .publish(e) for the different files that propagate the events

* doc: detailed documentation about the nft-kindfi contract

* chore: add admin.require_auth() add admin.require_auth() for validation and security of contract initialization

* fix: validation was added for the metadata and the event was created to send this

* feat: add root cargo manifest for contracts workspace

* feat(reputation): add cargo manifest for reputation contract

* feat(reputation): add reputation contract main library

* feat(reputation): add reputation contract types and data structures

* feat(reputation): add reputation contract storage layer

* feat(reputation): add reputation contract error types

* feat(reputation): add reputation contract events

* feat(reputation): add NFT client integration for reputation contract

* docs(reputation): add reputation contract documentation

* test(reputation): add reputation contract tests

* test(nft): add NFT contract tests

* chore: update cargo lock file

* docs: update contracts README

* script: add NFT contract deployment script

* script: add reputation contract deployment script

* chore: add environment example file

---------

Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com>

* feat: refactor nft-kindfi with SEP-0050 compatibility (#778)

* feat: add SEP-0050 compliant NFTAttribute struct to nft-kindfi types

Replace Vec<String> attributes with Vec<NFTAttribute> using structured
fields (trait_type, value, display_type, max_value) to comply with the
SEP-0050 Non-Fungible Metadata JSON Schema.

* feat: update nft-kindfi tests to use NFTAttribute struct

Adapt all test helpers and test cases to use the new SEP-0050 compliant
NFTAttribute struct instead of plain strings for metadata attributes.

* feat: update reputation nft_client to SEP-0050 attribute format

Refactor NFTMetadata mirror and level attribute helpers to use the new
NFTAttribute struct. Update cross-contract call types and all related
tests for SEP-0050 compliance.

* fix(kyc): prevent URL params cleanup on failure and add error toasts (#777)

* fix(kyc): prevent URL params cleanup on failure and add error toasts

* refactor(kyc): deduplicate error message string per code review

* fix(kyc): sync with develop and add error logging per code review

* refactor: centralize didit kyc status mapping logic (#779)

* refactor: centralize didit kyc status mapping logic

* refactor: apply code review feedback (arrow functions, type-only imports, and alias paths)

* style(ui): use bg-primary token instead of hex code in progress bar (#780)

Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com>

* chore: add vercel skills set for OSS

* fix: add new migration strategy

* feat: add fundation support

* chore: generate Supabase database types using MCP tool

- Generated complete TypeScript types from Supabase database
- Includes all tables, enums, functions, and relationships
- Fixes Vercel build error: Module '@services/supabase' has no exported member 'Database'

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: add complete Supabase database types

- Generated TypeScript types from Supabase database using MCP tool
- Includes all tables, enums, functions, and relationships
- Fixes Vercel build error: Module '@services/supabase' has no exported member 'Database'

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: add complete Supabase database types

- Generated TypeScript types from Supabase database using MCP tool
- Includes all tables, enums, functions, and relationships
- Fixes Vercel build error: Module '@services/supabase' has no exported member 'Database'

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix: WebAuthn cross environments

---------

Co-authored-by: Matias Aguilar <aaguilar1x@gmail.com>
Co-authored-by: Karen Giannetto <karengiannetto99@gmail.com>
Co-authored-by: Delfina luna Corradini <105253541+delfinacorr@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Bran18 added a commit that referenced this pull request Feb 5, 2026
* feat: add didit KYC user flow (#768)

* feat: add dididt KYC user flow

* fix: build issues

* fix(auth): add pending role state and fix user signup default role

* chore: generate Supabase types from remote instance

* fix: configure Vercel for monorepo and add Supabase types

* feat: kindfi nft open zeppelin (#769)

* feat: add KindFi NFT contract structure and types

- Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies
- Add types.rs with NFTMetadata struct and StorageKey enum
- Add errors.rs with custom error definitions
- Add events.rs with metadata update events

* feat: implement KindFi NFT core functionality

- Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions
- Add metadata.rs for on-chain metadata storage and retrieval
- Add mint.rs for sequential token ID minting with metadata
- Add burn.rs for token burning functionality
- Implement role-based access control (minter, burner, metadata_manager)
- Add OpenZeppelin Stellar Contracts integration

* fix: update workspace members for compilation

- Comment out non-existent contract members to allow compilation
- Add nft-kindfi to implemented contracts
- Reorganize workspace members with clear sections

* chore: update Cargo.lock with new contract dependencies

* feat: update to OpenZeppelin Stellar Contracts v0.6.0

- Update soroban-sdk from 22.0.6 to 23.4.0
- Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0
- Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens

* feat: update nft-kindfi dependencies for v0.6.0

- Update contract dependencies to use new package structure
- stellar-access-control → stellar-access
- stellar-access-control-macros → stellar-macros
- stellar-non-fungible → stellar-tokens

* refactor: update imports for OpenZeppelin v0.6.0

- Update stellar_access_control imports to stellar_access::access_control
- Update stellar_non_fungible imports to stellar_tokens::non_fungible
- Update stellar_access_control_macros to stellar_macros
- Fix AccessControl trait method signatures to match v0.6.0 API

* chore: kindfi information in the workspace.package and comments added in members

* fix: target changed to wasm32v1-none and leaving necessary components

* chore: Add additional information about kindfi to contract cargo.toml and change crate-type to just (cdylib)

* fix: config.toml file removed since it generated conflicts with rust base and the tests did not compile

* refactor: change in the use of events, since due to the sdk update they are now used with the contractevent and topic macro

* refactor: structure change in the use of events of the form .publish(e) for the different files that propagate the events

* doc: detailed documentation about the nft-kindfi contract

* chore: add admin.require_auth() add admin.require_auth() for validation and security of contract initialization

* fix: validation was added for the metadata and the event was created to send this

* feat: Reputation Contract for NFT Level Management (#773)

* feat: add KindFi NFT contract structure and types

- Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies
- Add types.rs with NFTMetadata struct and StorageKey enum
- Add errors.rs with custom error definitions
- Add events.rs with metadata update events

* feat: implement KindFi NFT core functionality

- Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions
- Add metadata.rs for on-chain metadata storage and retrieval
- Add mint.rs for sequential token ID minting with metadata
- Add burn.rs for token burning functionality
- Implement role-based access control (minter, burner, metadata_manager)
- Add OpenZeppelin Stellar Contracts integration

* fix: update workspace members for compilation

- Comment out non-existent contract members to allow compilation
- Add nft-kindfi to implemented contracts
- Reorganize workspace members with clear sections

* chore: update Cargo.lock with new contract dependencies

* feat: update to OpenZeppelin Stellar Contracts v0.6.0

- Update soroban-sdk from 22.0.6 to 23.4.0
- Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0
- Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens

* feat: update nft-kindfi dependencies for v0.6.0

- Update contract dependencies to use new package structure
- stellar-access-control → stellar-access
- stellar-access-control-macros → stellar-macros
- stellar-non-fungible → stellar-tokens

* refactor: update imports for OpenZeppelin v0.6.0

- Update stellar_access_control imports to stellar_access::access_control
- Update stellar_non_fungible imports to stellar_tokens::non_fungible
- Update stellar_access_control_macros to stellar_macros
- Fix AccessControl trait method signatures to match v0.6.0 API

* chore: kindfi information in the workspace.package and comments added in members

* fix: target changed to wasm32v1-none and leaving necessary components

* chore: Add additional information about kindfi to contract cargo.toml and change crate-type to just (cdylib)

* fix: config.toml file removed since it generated conflicts with rust base and the tests did not compile

* refactor: change in the use of events, since due to the sdk update they are now used with the contractevent and topic macro

* refactor: structure change in the use of events of the form .publish(e) for the different files that propagate the events

* doc: detailed documentation about the nft-kindfi contract

* chore: add admin.require_auth() add admin.require_auth() for validation and security of contract initialization

* fix: validation was added for the metadata and the event was created to send this

* feat: add root cargo manifest for contracts workspace

* feat(reputation): add cargo manifest for reputation contract

* feat(reputation): add reputation contract main library

* feat(reputation): add reputation contract types and data structures

* feat(reputation): add reputation contract storage layer

* feat(reputation): add reputation contract error types

* feat(reputation): add reputation contract events

* feat(reputation): add NFT client integration for reputation contract

* docs(reputation): add reputation contract documentation

---------

Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com>

* feat: Comprehensive Tests and Integration for NFT & Reputation Contracts (#774)

* feat: add KindFi NFT contract structure and types

- Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies
- Add types.rs with NFTMetadata struct and StorageKey enum
- Add errors.rs with custom error definitions
- Add events.rs with metadata update events

* feat: implement KindFi NFT core functionality

- Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions
- Add metadata.rs for on-chain metadata storage and retrieval
- Add mint.rs for sequential token ID minting with metadata
- Add burn.rs for token burning functionality
- Implement role-based access control (minter, burner, metadata_manager)
- Add OpenZeppelin Stellar Contracts integration

* fix: update workspace members for compilation

- Comment out non-existent contract members to allow compilation
- Add nft-kindfi to implemented contracts
- Reorganize workspace members with clear sections

* chore: update Cargo.lock with new contract dependencies

* feat: update to OpenZeppelin Stellar Contracts v0.6.0

- Update soroban-sdk from 22.0.6 to 23.4.0
- Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0
- Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens

* feat: update nft-kindfi dependencies for v0.6.0

- Update contract dependencies to use new package structure
- stellar-access-control → stellar-access
- stellar-access-control-macros → stellar-macros
- stellar-non-fungible → stellar-tokens

* refactor: update imports for OpenZeppelin v0.6.0

- Update stellar_access_control imports to stellar_access::access_control
- Update stellar_non_fungible imports to stellar_tokens::non_fungible
- Update stellar_access_control_macros to stellar_macros
- Fix AccessControl trait method signatures to match v0.6.0 API

* chore: kindfi information in the workspace.package and comments added in members

* fix: target changed to wasm32v1-none and leaving necessary components

* chore: Add additional information about kindfi to contract cargo.toml and change crate-type to just (cdylib)

* fix: config.toml file removed since it generated conflicts with rust base and the tests did not compile

* refactor: change in the use of events, since due to the sdk update they are now used with the contractevent and topic macro

* refactor: structure change in the use of events of the form .publish(e) for the different files that propagate the events

* doc: detailed documentation about the nft-kindfi contract

* chore: add admin.require_auth() add admin.require_auth() for validation and security of contract initialization

* fix: validation was added for the metadata and the event was created to send this

* feat: add root cargo manifest for contracts workspace

* feat(reputation): add cargo manifest for reputation contract

* feat(reputation): add reputation contract main library

* feat(reputation): add reputation contract types and data structures

* feat(reputation): add reputation contract storage layer

* feat(reputation): add reputation contract error types

* feat(reputation): add reputation contract events

* feat(reputation): add NFT client integration for reputation contract

* docs(reputation): add reputation contract documentation

* test(reputation): add reputation contract tests

* test(nft): add NFT contract tests

---------

Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com>

* feat: Deployment Scripts and Configuration for NFT & Reputation Contracts (#775)

* feat: add KindFi NFT contract structure and types

- Add Cargo.toml for nft-kindfi contract with OpenZeppelin dependencies
- Add types.rs with NFTMetadata struct and StorageKey enum
- Add errors.rs with custom error definitions
- Add events.rs with metadata update events

* feat: implement KindFi NFT core functionality

- Add lib.rs with main contract implementing NonFungibleToken, AccessControl, and custom metadata functions
- Add metadata.rs for on-chain metadata storage and retrieval
- Add mint.rs for sequential token ID minting with metadata
- Add burn.rs for token burning functionality
- Implement role-based access control (minter, burner, metadata_manager)
- Add OpenZeppelin Stellar Contracts integration

* fix: update workspace members for compilation

- Comment out non-existent contract members to allow compilation
- Add nft-kindfi to implemented contracts
- Reorganize workspace members with clear sections

* chore: update Cargo.lock with new contract dependencies

* feat: update to OpenZeppelin Stellar Contracts v0.6.0

- Update soroban-sdk from 22.0.6 to 23.4.0
- Update all OpenZeppelin dependencies from v0.3.0 to v0.6.0
- Restructure dependencies: stellar-access-control → stellar-access, stellar-non-fungible → stellar-tokens

* feat: update nft-kindfi dependencies for v0.6.0

- Update contract dependencies to use new package structure
- stellar-access-control → stellar-access
- stellar-access-control-macros → stellar-macros
- stellar-non-fungible → stellar-tokens

* refactor: update imports for OpenZeppelin v0.6.0

- Update stellar_access_control imports to stellar_access::access_control
- Update stellar_non_fungible imports to stellar_tokens::non_fungible
- Update stellar_access_control_macros to stellar_macros
- Fix AccessControl trait method signatures to match v0.6.0 API

* chore: kindfi information in the workspace.package and comments added in members

* fix: target changed to wasm32v1-none and leaving necessary components

* chore: Add additional information about kindfi to contract cargo.toml and change crate-type to just (cdylib)

* fix: config.toml file removed since it generated conflicts with rust base and the tests did not compile

* refactor: change in the use of events, since due to the sdk update they are now used with the contractevent and topic macro

* refactor: structure change in the use of events of the form .publish(e) for the different files that propagate the events

* doc: detailed documentation about the nft-kindfi contract

* chore: add admin.require_auth() add admin.require_auth() for validation and security of contract initialization

* fix: validation was added for the metadata and the event was created to send this

* feat: add root cargo manifest for contracts workspace

* feat(reputation): add cargo manifest for reputation contract

* feat(reputation): add reputation contract main library

* feat(reputation): add reputation contract types and data structures

* feat(reputation): add reputation contract storage layer

* feat(reputation): add reputation contract error types

* feat(reputation): add reputation contract events

* feat(reputation): add NFT client integration for reputation contract

* docs(reputation): add reputation contract documentation

* test(reputation): add reputation contract tests

* test(nft): add NFT contract tests

* chore: update cargo lock file

* docs: update contracts README

* script: add NFT contract deployment script

* script: add reputation contract deployment script

* chore: add environment example file

---------

Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com>

* feat: refactor nft-kindfi with SEP-0050 compatibility (#778)

* feat: add SEP-0050 compliant NFTAttribute struct to nft-kindfi types

Replace Vec<String> attributes with Vec<NFTAttribute> using structured
fields (trait_type, value, display_type, max_value) to comply with the
SEP-0050 Non-Fungible Metadata JSON Schema.

* feat: update nft-kindfi tests to use NFTAttribute struct

Adapt all test helpers and test cases to use the new SEP-0050 compliant
NFTAttribute struct instead of plain strings for metadata attributes.

* feat: update reputation nft_client to SEP-0050 attribute format

Refactor NFTMetadata mirror and level attribute helpers to use the new
NFTAttribute struct. Update cross-contract call types and all related
tests for SEP-0050 compliance.

* fix(kyc): prevent URL params cleanup on failure and add error toasts (#777)

* fix(kyc): prevent URL params cleanup on failure and add error toasts

* refactor(kyc): deduplicate error message string per code review

* fix(kyc): sync with develop and add error logging per code review

* refactor: centralize didit kyc status mapping logic (#779)

* refactor: centralize didit kyc status mapping logic

* refactor: apply code review feedback (arrow functions, type-only imports, and alias paths)

* style(ui): use bg-primary token instead of hex code in progress bar (#780)

Co-authored-by: Brandon Fernández <31634868+Bran18@users.noreply.github.com>

* chore: add vercel skills set for OSS

* fix: add new migration strategy

* feat: add fundation support

* chore: generate Supabase database types using MCP tool

- Generated complete TypeScript types from Supabase database
- Includes all tables, enums, functions, and relationships
- Fixes Vercel build error: Module '@services/supabase' has no exported member 'Database'

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: add complete Supabase database types

- Generated TypeScript types from Supabase database using MCP tool
- Includes all tables, enums, functions, and relationships
- Fixes Vercel build error: Module '@services/supabase' has no exported member 'Database'

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: add complete Supabase database types

- Generated TypeScript types from Supabase database using MCP tool
- Includes all tables, enums, functions, and relationships
- Fixes Vercel build error: Module '@services/supabase' has no exported member 'Database'

Co-authored-by: Cursor <cursoragent@cursor.com>

* Fix: WebAuthn cross environments

* Fix: WebAuthn non dynamic

* Fix: add path alias

---------

Co-authored-by: Matias Aguilar <aaguilar1x@gmail.com>
Co-authored-by: Karen Giannetto <karengiannetto99@gmail.com>
Co-authored-by: Delfina luna Corradini <105253541+delfinacorr@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Back-end development related difficulty: medium This issue requires a moderate to a little challenge effort on complexity kyc server kyc server app related refactor Code refactoring and improvements webapp web app related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor: Extract Didit-to-KYC status mapping into shared utility

2 participants