> ## Documentation Index
> Fetch the complete documentation index at: https://new-docs.squads.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Building with Squads

> Set up a Node.js or Next.js project with the Squads V4 SDK

Get started building with Squads Protocol in a JavaScript or TypeScript application.

## Prerequisites

* Node.js 22.x or above
* npm, yarn, or pnpm
* Basic TypeScript/JavaScript knowledge

## Installation

```bash theme={null}
npm install @sqds/multisig @solana/web3.js
```

## Initialize the SDK

```typescript theme={null}
import * as multisig from "@sqds/multisig";
import { Connection, Keypair } from "@solana/web3.js";

const connection = new Connection("<your rpc url>", "confirmed");

// Derive multisig PDA
const createKey = Keypair.generate();
const [multisigPda] = multisig.getMultisigPda({
  createKey: createKey.publicKey,
});
```

## Framework setup

<Tabs>
  <Tab title="Node.js">
    No additional configuration is required. Install the dependencies and import the SDK as shown above.

    Find the complete code for the Node.js quickstart [here](https://github.com/Squads-Protocol/v4-examples/blob/main/typescript/main.ts).
  </Tab>

  <Tab title="Next.js">
    **Time to complete:** \~10 minutes

    Create a new Next.js project:

    ```bash theme={null}
    npx create-next-app squads-quickstart-next
    ```

    Next.js requires additional configuration for Solana libraries. Update your `next.config.js`:

    ```javascript theme={null}
    /** @type {import('next').NextConfig} */
    const nextConfig = {
      webpack: (config) => {
        config.resolve.fallback = {
          fs: false,
          path: false,
          os: false,
        };
        return config;
      },
    };

    module.exports = nextConfig;
    ```

    <Info>
      Use server-side rendering (SSR) for sensitive operations and environment variables for RPC URLs.
    </Info>

    Find the complete code for this guide [here](https://github.com/Squads-Protocol/v4-examples/blob/main/typescript/main.ts).
  </Tab>
</Tabs>

## Next steps

<CardGroup cols={2}>
  <Card title="SDK patterns" href="/developers/quickstarts/sdk-patterns">
    Derive PDAs, fetch accounts, and other common SDK operations
  </Card>

  <Card title="TypeScript SDK" href="/developers/typescript-sdk/overview">
    Full SDK reference and guides
  </Card>

  <Card title="CLI" href="/developers/cli/cli-install-and-commands">
    Interact with Squads Protocol from the command line
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.