Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Repository Purpose

Official Pluggy quickstart repository with integration examples for the Pluggy financial data aggregation API and Connect widget. Complements [Pluggy docs](https://docs.pluggy.ai). Each subdirectory is an independent project with its own dependencies.

## Architecture

```
quickstart/
├── frontend/ # Client-side integration examples
│ ├── react/ # React (CRA) + react-pluggy-connect
│ ├── nextjs/ # Next.js 15 (Pages Router) + pluggy-sdk server-side
│ ├── react-native/ # React Native 0.66 (bare workflow)
│ ├── react-native-expo/ # Expo SDK 54 + expo-router
│ ├── flutter/ # Flutter WebView integration
│ ├── cordova/ # Apache Cordova iOS
│ ├── html/ # Vanilla HTML + CDN script
│ └── flask/ # Python Flask with templates
├── examples/ # Backend/deployment examples
│ ├── vercel-quickdeploy-nextjs/ # Full-stack Next.js 16 + Supabase + webhooks
│ ├── node-nestjs/ # NestJS 11 + Sequelize + PostgreSQL
│ ├── aws-sst/ # AWS Lambda + DynamoDB (SST v1, legacy)
│ ├── vercel-node-connect-token/ # Minimal Vercel serverless token endpoint
│ └── vercel-node-mongo/ # Vercel serverless + MongoDB
├── java/ # Spring Boot 2.6 + pluggy-java
└── ios/ # Native Swift iOS app
```

## Key Concepts

**Two-token security model**: All examples implement this pattern:
1. **Access token** (server-side only) - created with CLIENT_ID + CLIENT_SECRET
2. **Connect token** (client-side safe) - scoped to single session, used by widgets

**Environment variables** (common across all projects):
- `PLUGGY_CLIENT_ID` / `PLUGGY_CLIENT_SECRET` - required for all backends
- Project-specific: Supabase keys (quickdeploy), DB credentials (nestjs), AWS creds (sst)

## Commands by Project

Each project is independent. `cd` into the project directory first.

| Project | Dev | Build | Test | Lint |
|---------|-----|-------|------|------|
| frontend/react | `npm start` | `npm run build` | `npm test` | (CRA built-in) |
| frontend/nextjs | `npm run dev` | `npm run build` | - | `npm run lint` |
| frontend/react-native | `npx react-native start` | - | `npm test` | `npm run lint` |
| frontend/react-native-expo | `npm start` | - | - | `npm run lint` |
| examples/vercel-quickdeploy-nextjs | `npm run dev` | `npm run build` | - | `npm run lint` |
| examples/node-nestjs | `npm run start:dev` | `npm run build` | `npm test` | `npm run lint` |
| examples/aws-sst | `npm start` | `npm run build` | `npm test` | - |
| java/ | `./mvnw spring-boot:run` | `./mvnw package` | `./mvnw test` | - |

NestJS additional: `npm run db:setup` (starts PostgreSQL via docker-compose), `npm run test:e2e`.

## SDK Packages

- **pluggy-sdk** (Node.js) - Server-side SDK, used in backends
- **react-pluggy-connect** - React component for Connect widget
- **react-native-pluggy-connect** - React Native component
- **pluggy-js** - Browser/Node SDK (used in Expo example)
- **pluggy-java** - Java SDK (used in Spring Boot example)

## Notable Patterns

- `examples/vercel-quickdeploy-nextjs` is the most complete example: Next.js App Router, Supabase RLS, webhook-driven data sync, Chakra UI
- `frontend/nextjs` uses Pages Router (older pattern) vs quickdeploy which uses App Router
- `frontend/react-native` is on React Native 0.66 / React 17 (very outdated)
- `examples/aws-sst` uses SST v1 which is deprecated (legacy project)
- `examples/vercel-node-connect-token` and `vercel-node-mongo` use pluggy-sdk 0.7.0 (very old)

## Code Owners

All PRs require review from `@pluggyai/ramen` and `@pluggyai/tech-leaders`.
60 changes: 56 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,59 @@
# Pluggy quickstart
# Pluggy Quickstart

Integrate Pluggy into your application in a matter of minutes. This repository is meant to complement [Pluggy official docs](https://docs.pluggy.ai)
Integrate [Pluggy](https://pluggy.ai) into your application in minutes. This repository provides working examples across multiple platforms and frameworks.

For client-side integration examples navigate to [frontend](frontend) folder
For full documentation, see [docs.pluggy.ai](https://docs.pluggy.ai).

For examples and utilities to create your Pluggy application navigate to [examples](examples) folder
## Getting Started

1. Create an account at [dashboard.pluggy.ai](https://dashboard.pluggy.ai)
2. Create an application to get your **Client ID** and **Client Secret**
3. Pick a quickstart below that matches your stack

## Frontend Examples

Client-side integrations using the Pluggy Connect widget. See [frontend/README.md](frontend/README.md) for the connect token flow and widget configuration.

| Framework | Directory | Stack |
|-----------|-----------|-------|
| [Next.js (full-stack)](examples/vercel-quickdeploy-nextjs) | `examples/vercel-quickdeploy-nextjs/` | Next.js 16 + Supabase + Webhooks |
| [Next.js](frontend/nextjs) | `frontend/nextjs/` | Next.js 15 + Pages Router |
| [React](frontend/react) | `frontend/react/` | React 19 + CRA |
| [React Native (Expo)](frontend/react-native-expo) | `frontend/react-native-expo/` | Expo SDK 54 + Expo Router |
| [React Native](frontend/react-native) | `frontend/react-native/` | React Native 0.66 |
| [Flutter](frontend/flutter) | `frontend/flutter/` | Flutter + WebView |
| [HTML](frontend/html) | `frontend/html/` | Vanilla JS + CDN |
| [Flask](frontend/flask) | `frontend/flask/` | Python Flask |
| [Cordova](frontend/cordova) | `frontend/cordova/` | Apache Cordova iOS |

## Backend Examples

Server-side implementations for connect token generation, webhooks, and data persistence.

| Framework | Directory | Stack |
|-----------|-----------|-------|
| [Vercel + Next.js + Supabase](examples/vercel-quickdeploy-nextjs) | `examples/vercel-quickdeploy-nextjs/` | Next.js 16 + Supabase |
| [NestJS](examples/node-nestjs) | `examples/node-nestjs/` | NestJS 11 + PostgreSQL |
| [Vercel Serverless (Token)](examples/vercel-node-connect-token) | `examples/vercel-node-connect-token/` | Vercel + Node.js |
| [Vercel + MongoDB](examples/vercel-node-mongo) | `examples/vercel-node-mongo/` | Vercel + MongoDB |
| [AWS (SST)](examples/aws-sst) | `examples/aws-sst/` | Lambda + DynamoDB |
| [Java Spring Boot](java) | `java/` | Spring Boot 2.6 |

## Native Mobile

| Platform | Directory |
|----------|-----------|
| [iOS (Swift)](ios) | `ios/` |

## Quick Deploy

The fastest way to get started is the one-click Vercel deploy:

[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https://github.com/pluggyai/quickstart/tree/master/examples/vercel-quickdeploy-nextjs&env=PLUGGY_CLIENT_ID,PLUGGY_CLIENT_SECRET,NEXT_PUBLIC_SUPABASE_URL,SUPABASE_SERVICE_ROLE_KEY&envDescription=Get%20your%20Pluggy%20credentials%20from%20dashboard.pluggy.ai%20and%20Supabase%20credentials%20from%20your%20Supabase%20project%20settings&envLink=https://dashboard.pluggy.ai)

## Resources

- [Pluggy Documentation](https://docs.pluggy.ai)
- [Pluggy Dashboard](https://dashboard.pluggy.ai)
- [Pluggy API Reference](https://docs.pluggy.ai/reference)
- [Pluggy Connect Widget Docs](https://docs.pluggy.ai/#pluggy-connect-widget)
2 changes: 2 additions & 0 deletions examples/aws-sst/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
save-exact=true
min-release-age=7d
78 changes: 31 additions & 47 deletions examples/aws-sst/README.md
Original file line number Diff line number Diff line change
@@ -1,68 +1,52 @@
# Implementation of all resources in AWS
# Pluggy - AWS Serverless (SST) Example

The project is built on top of [Serverless Framework](https://serverless.com/framework/) and [Pluggy](https://pluggy.ai).
AWS serverless infrastructure for Pluggy integration using Lambda, DynamoDB, and the [Serverless Stack (SST)](https://sst.dev/) framework.

This project is a 2 minute setup to quickly start using Pluggy on your AWS environment.
> **Note**: This example uses SST v1 (`@serverless-stack/*`), which is deprecated. For new projects, consider using [SST v3](https://sst.dev/) or the [Vercel quickdeploy](../vercel-quickdeploy-nextjs) example.

## Quick start
## Prerequisites

### Prerequisites
- Node.js 18+
- AWS account with configured credentials ([IAM setup guide](https://docs.sst.dev/advanced/iam-credentials))
- Pluggy API credentials from [dashboard.pluggy.ai](https://dashboard.pluggy.ai)

Before you can deploy this project's infrastructure you will need to setup an AWS account on your environment.
For more information on how to configure you IAM Credentials visit [SST IAM Setup](https://docs.serverless-stack.com/advanced/iam-credentials).
## Setup

### Running the example
1. Create a `.env` file with:

- AWS credentials
- `PLUGGY_CLIENT_ID`
- `PLUGGY_CLIENT_SECRET`

2. Install and run:

```bash
npm install
npm start
```

### Configuration

Setup your `.env` with your AWS credentials & your Pluggy Client ID and Secret, before running `npm start` or `npm deploy`.

With the created resources you can already start using Pluggy's widget on your website.

## Architecture

In the following image the high-level architecture of the project is shown.

![Architecture](docs/diagram.png)


The following resources are implemented:
- DynamoDB: [DynamoDB](https://docs.serverless-stack.com/packages/dynamodb)
Stores the items created on Pluggy to recover by it's id.
- Labda: [Lambda](https://docs.serverless-stack.com/packages/lambda)
- Notification: Process webhooks from Pluggy [Pluggy](https://docs.pluggy.ai/webhooks)
- Connect Token: Recovers a connect token to inializate a Widget instance.
| Resource | Purpose |
|----------|---------|
| **DynamoDB** | Stores items created via Pluggy |
| **Lambda (Notification)** | Processes Pluggy webhook events |
| **Lambda (Connect Token)** | Generates connect tokens for the widget |

## Commands

### `npm run start`

Starts the local Lambda development environment.

### `npm run build`

Build your app and synthesize your stacks.

Generates a `.build/` directory with the compiled files and a `.build/cdk.out/` directory with the synthesized CloudFormation stacks.

### `npm run deploy [stack]`

Deploy all your stacks to AWS. Or optionally deploy a specific stack.

### `npm run remove [stack]`

Remove all your stacks and all of their resources from AWS. Or optionally remove a specific stack.

### `npm run test`

Runs your tests using Jest. Takes all the [Jest CLI options](https://jestjs.io/docs/en/cli).
| Command | Description |
|---------|-------------|
| `npm start` | Start local Lambda dev environment |
| `npm run build` | Build and synthesize CloudFormation stacks |
| `npm run deploy` | Deploy to AWS |
| `npm run remove` | Remove all stacks from AWS |
| `npm test` | Run tests |

## Documentation
## Resources

- [Pluggy Docs](https://docs.pluggy.ai)
- [Serverless Stack Docs](https://docs.serverless-stack.com)
- [Pluggy Documentation](https://docs.pluggy.ai)
- [Pluggy Webhooks](https://docs.pluggy.ai/#webhooks)
- [SST Documentation](https://docs.sst.dev)
Loading