Monorepo Structure
Aqua Stark follows a monorepo architecture, streamlining development across multiple components.
π Structure
Frontend β Next.js-based interface for the game and marketplace.
Backend β Node.js server handling API calls and Starknet interactions.
Smart Contracts β Cairo-based contracts deployed on Starknet.
Shared Utilities β Reusable libraries for blockchain integration and game mechanics.
/aquarium-game
βββ /backend # Backend with Node.js + Express
β βββ /src
β β βββ /controllers # Business logic (management of users, aquariums, marketplace)
β β βββ /models # Database models (Fish, Users, Transactions)
β β βββ /routes # API routes (REST Endpoints)
β β βββ /services # Connection to blockchain and contract logic
β β βββ /utils # Helpers and auxiliary functions
β β βββ app.ts # Server configuration Express
β βββ package.json # Backend dependencies
β βββ tsconfig.json # TypeScript configuration
β
βββ /frontend # Frontend with React + Next.js
β βββ /public # Images, fonts, icons
β βββ /src
β β βββ /app # Next.js main pages
β β βββ /components # Reusable components (Aquarium, PezCard, Marketplace, etc.)
β β βββ /context # Global state with React Context
β β βββ /hooks # Custom hooks for logic specific
β β βββ /services # Connection to backend and blockchain
β β βββ /styles # Style files (TailwindCSS)
β β βββ /utils # Helper functions
β β βββ /assets # Sprites, images, decorations
β βββ next.config.js # Next.js configuration
β βββ package.json # Frontend dependencies
β βββ tsconfig.json # TypeScript configuration
β
βββ /smart-contracts # Smart contracts in Cairo
β βββ /contracts # Contracts code (Fish, Marketplace, Evolution)
β βββ /tests # Testing contracts in Cairo
β βββ compile.sh # Script to compile the contracts
β βββ deploy.sh # Script to deploy to StarkNet
β βββ README.md # Documentation about smart contracts
β
βββ .github # CI/CD configuration (optional)
βββ .env # Environment variables
βββ README.md # General project documentation
π₯ Why Use a Monorepo?
Unified Codebase β Easier management of interdependent components.
Improved Collaboration β Developers work within a centralized structure.
Consistent Dependencies β Reduces version conflicts across services.
Faster Deployment β Automated CI/CD pipelines improve efficiency.
Last updated