#!/bin/bash echo "๐Ÿš€ Setting up Soroban Flashcard Generator Development Environment" echo "" # Check for required tools echo "๐Ÿ“‹ Checking requirements..." if ! command -v pnpm &> /dev/null; then echo "โŒ pnpm is required but not installed. Please install pnpm first." echo " npm install -g pnpm" exit 1 fi if ! command -v python3 &> /dev/null; then echo "โŒ Python 3 is required but not installed." exit 1 fi echo "โœ… All requirements satisfied" echo "" # Install dependencies echo "๐Ÿ“ฆ Installing dependencies..." pnpm install --frozen-lockfile=false if [ $? -ne 0 ]; then echo "โŒ Failed to install dependencies" exit 1 fi echo "โœ… Dependencies installed" echo "" # Build core packages echo "๐Ÿ”จ Building core packages..." # Build TypeScript client echo " Building @soroban/client..." cd packages/core/client/typescript pnpm build cd ../../../../ # Build Node client echo " Building @soroban/core..." cd packages/core/client/node pnpm build cd ../../../../ echo "โœ… Core packages built" echo "" # Build web app dependencies echo "๐ŸŽจ Setting up Panda CSS..." cd apps/web pnpm build:css --config cd ../../ echo "โœ… Panda CSS configured" echo "" # Final verification echo "๐Ÿงช Running type checks..." pnpm turbo run type-check if [ $? -eq 0 ]; then echo "" echo "๐ŸŽ‰ Development environment setup complete!" echo "" echo "๐Ÿ“‹ Next steps:" echo " โ€ข Run 'pnpm dev' to start development server" echo " โ€ข Run 'pnpm build' to build all packages" echo " โ€ข Run 'pnpm turbo run dev' to start all services" echo "" else echo "โš ๏ธ Setup complete but type checks failed. Review the output above." fi