Skip to content

chore: Configure environment and Firestore for pool creation #81

Description

@rafamiziara

Overview

Set up environment variables and Firestore collections for pool creation feature.

Tasks

Mobile Environment Variables

  • Add EXPO_PUBLIC_POOL_FACTORY_ADDRESS_AMOY to apps/mobile/.env
  • Add EXPO_PUBLIC_BACKEND_URL for Firebase Functions
  • Update chain configurations with PoolFactory addresses

Firestore Collections Setup

  • Create pools collection with composite key ${chainId}-${poolId}
  • Create event_sync_state collection with document per chain
  • Set up Firestore security rules for read/write permissions
  • Add indexes for common queries (chainId, poolOwner, createdAt)

Collection Schemas

pools

Document ID: ${chainId}-${poolId}
Fields: {
  poolId, poolAddress, poolOwner, name, description,
  maxLoanAmount, interestRate, loanDuration,
  chainId, createdAt, transactionHash,
  blockNumber, isActive
}

event_sync_state

Document ID: ${chainId}
Fields: {
  chainId, lastProcessedBlock,
  lastSyncedAt, totalPoolsIndexed
}

Acceptance Criteria

  • All environment variables configured and documented
  • Firestore collections created with proper schema
  • Security rules enforce proper access control
  • Indexes optimize common query patterns

Related Documentation

  • See docs/POOL_CREATION_ARCHITECTURE.md Configuration section
  • See docs/POOL_CREATION_TASKS.md Tasks 19-21

Labels: type: chore

Milestone: Sprint 3: Pool Creation

Part of Epic: #35

Metadata

Metadata

Assignees

Labels

type: choreA routine task that doesn't add new features or fix a bug

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions