> For the complete documentation index, see [llms.txt](https://crowdfunding-ugmbcc.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://crowdfunding-ugmbcc.gitbook.io/docs/architecture/tech-comparison.md).

# Tech Comparison

How does CrowdFUNding's tech stack compare to alternatives? This document provides a detailed comparison.

### Blockchain Choice: Why Base?

Choosing the right blockchain is critical for a crowdfunding platform. We need low fees for micro-donations, fast confirmations for good UX, and strong security for financial transactions.

#### Comparison with Other L2s

Base competes with other Ethereum Layer 2 solutions. Here's how they compare:

| Feature                  | Base          | Arbitrum     | Optimism      | Polygon PoS    |
| ------------------------ | ------------- | ------------ | ------------- | -------------- |
| **Gas Fees**             | \~$0.001-0.01 | \~$0.01-0.05 | \~$0.001-0.01 | \~$0.001-0.05  |
| **Finality**             | \~2 seconds   | \~1 second   | \~2 seconds   | \~2 seconds    |
| **Security**             | Ethereum L1   | Ethereum L1  | Ethereum L1   | Own validators |
| **Ecosystem**            | Growing fast  | Mature       | Mature        | Very mature    |
| **Coinbase Integration** | Native        | No           | No            | No             |
| **OnchainKit**           | Native        | No           | No            | No             |

**Why we chose Base:**

* Native Coinbase wallet support
* Lowest fees among L2s
* OnchainKit for seamless onboarding
* Ethereum-inherited security

#### Comparison with L1s

Compared to Layer 1 blockchains, Base offers significant advantages for consumer applications:

| Feature                 | Base (L2)      | Ethereum | Solana     | BNB Chain |
| ----------------------- | -------------- | -------- | ---------- | --------- |
| **Gas Fees**            | \~$0.01        | \~$5-50  | \~$0.00025 | \~$0.05   |
| **TPS**                 | \~2,000        | \~15     | \~65,000   | \~100     |
| **Decentralization**    | High (via ETH) | Highest  | Medium     | Lower     |
| **EVM Compatible**      | Yes            | Yes      | No         | Yes       |
| **Smart Contract Lang** | Solidity       | Solidity | Rust       | Solidity  |

***

### Wallet Integration: Why RainbowKit?

Wallet connectivity is often the biggest barrier to Web3 adoption. We use **RainbowKit** for wallet connections and **Google OAuth 2.0** for social authentication.

#### Comparison

Here's how popular wallet integration solutions compare:

| Feature                  | RainbowKit  | Web3Modal | Thirdweb  | WalletConnect |
| ------------------------ | ----------- | --------- | --------- | ------------- |
| **Social Login**         | Via Backend | Yes (v3)  | Yes       | No            |
| **Wallet Support**       | 100+        | 100+      | 50+       | 100+          |
| **UI Customization**     | High        | Medium    | High      | Low           |
| **Developer Experience** | Excellent   | Good      | Good      | Good          |
| **Pricing**              | Free        | Free      | Free tier | Free          |
| **Built for Base**       | Yes         | Yes       | Yes       | Yes           |

**Our Approach:**

* **Google OAuth 2.0**: Server-side authentication via Passport.js for social login
* **RainbowKit**: For Web3 wallet connections (MetaMask, Coinbase Wallet, WalletConnect, etc)
* **Wallet Sync**: Users can link their Web3 wallet to their Google account

**Why This Architecture?**

* **Separation of Concerns**: Authentication (backend) vs wallet connection (frontend)
* **Security**: OAuth handled server-side with secure JWT cookies
* **Flexibility**: Users can login with Google, wallet, or both
* **Better UX**: No need for embedded wallets or complex account abstraction

***

### Frontend Framework: Why Next.js?

The frontend framework choice impacts performance, SEO, and developer productivity. We chose Next.js for its mature ecosystem and excellent Web3 support.

#### Comparison

Modern frontend frameworks offer different tradeoffs:

| Feature           | Next.js 16 | Vite + React | Remix     | SvelteKit |
| ----------------- | ---------- | ------------ | --------- | --------- |
| **SSR/SSG**       | Built-in   | Plugin       | Yes       | Yes       |
| **App Router**    | Yes        | No           | Yes       | Yes       |
| **Performance**   | Excellent  | Excellent    | Excellent | Best      |
| **Ecosystem**     | Largest    | Large        | Growing   | Smaller   |
| **Web3 Support**  | Excellent  | Good         | Good      | Limited   |
| **Vercel Deploy** | Native     | Yes          | Yes       | Yes       |

**Why Next.js:**

* Best-in-class SSR for SEO
* App Router for modern routing
* First-class wagmi/viem support
* Massive ecosystem

***

### Backend: Why Express.js?

The backend handles API requests, authentication, and data synchronization. We prioritized simplicity and ecosystem maturity.

#### Comparison

Node.js backend frameworks vary in performance and complexity:

| Feature            | Express.js | Fastify  | NestJS   | Hono     |
| ------------------ | ---------- | -------- | -------- | -------- |
| **Performance**    | Good       | Best     | Good     | Best     |
| **Learning Curve** | Easy       | Easy     | Steep    | Easy     |
| **Middleware**     | Excellent  | Good     | Built-in | Good     |
| **Type Safety**    | Optional   | Optional | Built-in | Built-in |
| **Ecosystem**      | Massive    | Growing  | Large    | Growing  |

**Why Express:**

* Most widely used Node.js framework
* Massive middleware ecosystem
* Fast development speed
* Easy to find developers

***

### Smart Contract Framework: Why Foundry?

Smart contract development requires fast iteration and thorough testing. Foundry excels at both.

#### Comparison

Different frameworks offer varying developer experiences:

| Feature         | Foundry   | Hardhat    | Brownie | Truffle    |
| --------------- | --------- | ---------- | ------- | ---------- |
| **Language**    | Solidity  | JavaScript | Python  | JavaScript |
| **Speed**       | Fastest   | Fast       | Medium  | Slow       |
| **Testing**     | Solidity  | JS/TS      | Python  | JS         |
| **Debugging**   | Excellent | Good       | Good    | Basic      |
| **Fuzzing**     | Built-in  | Plugin     | Plugin  | No         |
| **Gas Reports** | Built-in  | Plugin     | Plugin  | Plugin     |

**Why Foundry:**

* Blazingly fast compilation and tests
* Write tests in Solidity (same language as contracts)
* Excellent debugging with traces
* Built-in fuzz testing

***

### Indexer: Why Ponder?

The indexer translates blockchain events into queryable data. We needed something self-hostable with fast development cycles.

#### Comparison

Blockchain indexing solutions range from managed services to self-hosted options:

| Feature           | Ponder     | The Graph      | Subsquid   | Envio      |
| ----------------- | ---------- | -------------- | ---------- | ---------- |
| **Setup**         | Easy       | Complex        | Medium     | Medium     |
| **Self-hostable** | Yes        | No (managed)   | Yes        | Yes        |
| **Language**      | TypeScript | AssemblyScript | TypeScript | TypeScript |
| **GraphQL**       | Yes        | Yes            | Yes        | Yes        |
| **REST API**      | Yes        | No             | Yes        | Yes        |
| **Hot Reload**    | Yes        | No             | No         | Yes        |
| **Cost**          | Free       | $$/month       | Free tier  | Free tier  |

**Why Ponder:**

* Fastest development cycle with hot reload
* 100% self-hosted (no vendor lock-in)
* TypeScript for type safety
* Both GraphQL and REST APIs

***

### Database: Why PostgreSQL?

The database stores off-chain campaign data and user information. Financial applications require ACID compliance and reliability.

#### Comparison

Database options offer different tradeoffs for our use case:

| Feature             | PostgreSQL | MySQL             | MongoDB   | SQLite  |
| ------------------- | ---------- | ----------------- | --------- | ------- |
| **ACID Compliance** | Full       | Full              | Partial   | Full    |
| **JSON Support**    | Excellent  | Good              | Native    | Basic   |
| **Performance**     | Excellent  | Excellent         | Excellent | Good    |
| **Scalability**     | Excellent  | Excellent         | Excellent | Limited |
| **Cloud Options**   | Many       | Many              | Atlas     | Limited |
| **Open Source**     | Yes        | Yes (with limits) | Partial   | Yes     |

**Why PostgreSQL:**

* Full ACID compliance for financial data
* Excellent for relational + JSON data
* Easy cloud hosting (Supabase, Neon, etc.)
* Fully open source

***

### Stablecoin: Why IDRX?

The choice of settlement currency directly impacts the off-ramp experience for Indonesian campaign creators.

#### Comparison with Other Stablecoins

Different stablecoins serve different markets:

| Feature             | IDRX            | USDT     | USDC     | DAI      |
| ------------------- | --------------- | -------- | -------- | -------- |
| **Pegged To**       | IDR (Rupiah)    | USD      | USD      | USD      |
| **Decimals**        | 2               | 6        | 6        | 18       |
| **Collateral**      | Fiat            | Fiat     | Fiat     | Crypto   |
| **Regulated**       | Yes (Indonesia) | No       | Yes      | No       |
| **Local Relevance** | Yes Indonesia   | Global   | Global   | Global   |
| **Fiat Off-ramp**   | Direct          | Exchange | Exchange | Exchange |

**Why IDRX:**

* Native Indonesian currency representation
* Direct IDR off-ramp for creators
* 2 decimals matches real Rupiah
* Regulated in Indonesia

***

### Summary: Our Stack Choices

Each technology was chosen based on specific project requirements. Here's a summary of our decisions:

| Layer               | Choice                        | Key Reason                      |
| ------------------- | ----------------------------- | ------------------------------- |
| **Blockchain**      | Base                          | Coinbase integration + low fees |
| **Authentication**  | Google OAuth 2.0 + RainbowKit | Dual auth for Web2 & Web3 users |
| **Frontend**        | Next.js 16                    | SSR + Web3 ecosystem            |
| **Backend**         | Express.js                    | Simplicity + ecosystem          |
| **Smart Contracts** | Foundry                       | Speed + Solidity testing        |
| **Indexer**         | Ponder                        | Self-hosted + TypeScript        |
| **Database**        | PostgreSQL                    | ACID + JSON support             |
| **Stablecoin**      | IDRX                          | Indonesian market fit           |
