How jk-labs-inc/jokerace works
Project’s Main Components
• Frontend: The “react-app-revamp” package is the main NextJS application. It contains a rich collection of components, pages, layouts, and configurations (using Tailwind CSS and Headless UI) to provide the user interface and manage interactions. It also handles environment configuration for things like Supabase, WalletConnect, and other APIs.
• Smart Contracts / Blockchain Layer: The “forge” package under “packages/forge” holds the Ethereum smart contracts. These are managed using Foundry—that includes compile, deploy, and test scripts—and come with automated testing workflows. There is a clear process in the README for updating bytecode and ABIs when changes happen.
• Worker Processes: The “image-processing-worker” package represents a background process that likely handles offloading image manipulations independent of the frontend.
• Worker Scripts and Utilities: There are additional scripts (in workers, lib, and hooks folders) that serve functions such as batching, interacting with blockchain, processing CSVs, and more.
Relationships and Data Flows
• The frontend may also access bytecode/ABI files (maintained and versioned within the “react-app-revamp” package) to determine the deployed contract versions.
• Additionally, note that there are GitHub workflows and automated testing pipelines (e.g., “forge_tests.yml”, “nextjs_build.yml”) that ensure continuous integration and deployment. You might represent these as ancillary processes that interact with both the code repositories and deployment targets.
Architectural Patterns and Technologies
• Versioning of contracts: Indicate the process that involves generating, versioning, and copying the smart contract bytecode and ABI from the Foundry build to the frontend, ensuring consistency between the deployed contracts and the client-side usage.
• Technology stack: Label key libraries and frameworks such as NextJS, Tailwind CSS, Foundry (forge), ethers, wagmi, and RainbowKit.
– Frontend (React App - “react-app-revamp”)
– Smart Contracts / Blockchain Layer (Foundry contracts in “forge”)
– Worker Service (Image Processing Worker)
– External Services/Dependencies (Supabase, API keys, Ethereum wallets, etc.)
– CI/CD/Automation workflows (GitHub Actions, etc.)
– User interactions from the frontend that trigger blockchain transactions.
– Contract versioning updates flowing from the Forge build process to the frontend.
• With key technologies:
– NextJS, Tailwind CSS, ethers, wagmi, Foundry, etc.