How yaasiinaxmed/voting-dapp-solana works
Project type and purpose
• This is a full-stack blockchain dApp (“legacy-voting-dapp”) comprised of two halves:
a. An on-chain Solana program written in Rust using the Anchor framework (in the anchor/ directory).
b. A Next.js React web client (in the project root under src/) that uses the Anchor‐generated TypeScript client to interact with that program.
• The purpose is to deploy a voting program on Solana and offer a web UI for account management, cluster selection, and voting functionality.
File structure
• Top-level directories and files:
• anchor/ – Anchor project with programs/voting (Rust source), migrations, tests, and generated IDL/types in target/.
• src/app/ – Next.js “App Router” folder containing pages and API routes.
• src/components/ – Organized per domain (account, cluster, votingdapp) into UI/feature/data-access subfolders.
• Config/build files: package.json, pnpm-lock.yaml, tsconfig.json, next.config.mjs, Tailwind and PostCSS configs.
• Patterns:
• MVC-like separation in the React client: data-access → feature → UI.
• Next.js App Router conventions (page.tsx, layout.tsx).
• Anchor’s standard project layout (migrations/, programs/, tests/, target/idl, target/types).
README for additional insights
• Confirms two primary “apps”:
1. anchor: build, test, deploy commands for the on-chain program.
2. web: pnpm dev and pnpm build for the React/Next.js front end.
• Specifies required CLIs (Rust, Anchor CLI, Solana CLI) and sync steps for program IDs.