docsTechnicalQuick Start

πŸš€ Quickstart

Clone the repository and install dependencies:

git clone https://github.com/AlexisHerrera/cryptotrophy-platform
cd cryptotrophy-platform
yarn install

Build and run the platform locally:

# Build project
yarn build
 
# Start a local Hardhat blockchain node
yarn hardhat:chain
 
# Deploy contracts to the local chain
yarn hardhat:deploy
 
# Start frontend and backoffice apps (Next.js)
yarn start
 
# Start the Ponder indexer in development mode
yarn ponder:dev
 
# Run tests
yarn test

πŸ—‚οΈ Monorepo Structure

CryptoTrophy uses a monorepo architecture, with specialized packages for each domain:

crypto-trophy/
β”‚
β”œβ”€β”€ packages/
β”‚   β”œβ”€β”€ hardhat/            # Smart contracts & deployment scripts
β”‚   β”œβ”€β”€ contracts/          # Main contracts with business logic
β”‚   β”œβ”€β”€ nextjs/             # Web frontend (Next.js)
β”‚   β”œβ”€β”€ backoffice/         # Admin backoffice for organizations
β”‚   β”œβ”€β”€ trophy-app/         # End user application
β”‚   β”œβ”€β”€ ponder/             # Blockchain event indexer
β”‚
β”œβ”€β”€ circuits/               # ZK-SNARK circuits (Circom)
β”œβ”€β”€ docker-compose.yml      # Orchestrates local dev services