This guide outlines the technical stack, branching strategy, development workflow, and coding standards at LXDAO. Forum Discussion
Keep the stack simple. Avoid introducing unnecessary tools or libraries.
- JavaScript / TypeScript: Full-stack development.
- Solidity: Smart contracts.
- Others: Project-specific requirements.
- Bun: Default package manager. Please migrate existing npm/yarn/pnpm projects to Bun.
- React Ecosystem: The core foundation.
- Mantine: Recommended UI library. Preferred for its completeness, lightweight nature, and high-quality components (e.g., DatePicker) over MUI/AntDesign/shadcn.
- Web App:
- React + Vite (SPA): Default recommendation.
- Next.js: For applications requiring server-side rendering (SSR) or SEO.
- TanStack Query: Data fetching and state management.
- RainbowKit: Wallet connection.
- wagmi + viem: The professional standard for Ethereum interactions. Use
wagmifor React Hooks andviemfor low-level type-safe interfaces. - Thegraph: For blockchain data
- tRPC: End-to-end type-safe APIs (with Next.js or SPA).
- Better Auth: Authentication.
- Zod: Schema validation.
- PostgreSQL + Prisma: ORM. Prisma's Schema Definition Language (SDL) is preferred over Drizzle's JS abstraction for its clarity and alignment with database modeling.
We prioritize Self-Hosting over managed services (Vercel, Supabase, Heroku, AWS) to ensure transparency, control, and cost-efficiency.
Recommended Stack:
- Hetzner: High-performance, cost-effective dedicated servers.
- Coolify: Open-source, self-hosted PaaS ("Private Vercel") for CI/CD.
- Docker: Containerization.
- Cloudflare: CDN, DNS, and Security (Critical for accelerating and protecting EU-based servers).
Rationale:
- Cost: A single powerful dedicated server is significantly cheaper than usage-based serverless billing at scale.
- Control: Eliminates vendor lock-in and "black box" debugging issues.
- Simplicity: Consolidates
Next.js,tRPC,Prisma, andPostgreSQLinto a unified environment.
- Scaffolding: create-t3-app (Recommended for bootstrapping Next.js + tRPC + Prisma projects).
- Formatting: Prettier
- Linting: ESLint
- CI/CD: GitHub Actions
- Editor: VSCode, Cursor, or Antigravity
- AI Coding: Codex, Claude Code (latest models)
- Writing: Chinese Copywriting Guidelines
- Smart Contracts: DappReader (Debug contracts like Postman)
- Local: Your local development machine.
- DEV: Remote testing and preview environment.
- Production: Live environment for users.
All three environments (Local, DEV, Production) are required.
main: Production. Protected branch reflecting the latest stable release.develop(ordev): DEV. Latest integration branch.feature/[name]: Specific feature implementation.fix/[name]: Bug fixes.
- Create Issue: Create or assign a GitHub Issue for the task.
- Branch: Checkout a new branch from
develop(ordev):feature/[name]orfix/[name]. - Develop: implementations on your local machine.
- Pull Request (Dev): Submit a PR to
develop/dev. Verify and test on theDEVenvironment. - Pull Request (Main): Submit a PR from
develop/devtomain. Request code review and approval. - Deploy: Merging into
maintriggers deployment to Production.
We follow a loose version of the Airbnb JavaScript Style Guide. Install the Prettier plugin and use the default configuration with these overrides:
{
"singleQuote": true,
"trailingComma": "all"
}Follow the Conventional Commits specification:
feat:New features.chore:Maintenance (e.g., formatting, dependencies).fix:Bug fixes.docs:Documentation updates.