Skip to content
Merged
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
29 changes: 29 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,35 @@ feat: add invoice search to dashboard (#7)
- Keep components small and focused (single responsibility).
- All interactive elements must be keyboard-accessible.

## Debugging State with Redux DevTools

StellarSplit uses [Zustand](https://github.com/pmndrs/zustand) for client-side state. Three stores are available:

| Store | Location | DevTools name |
|---|---|---|
| Wallet | `src/lib/stores/walletStore.ts` | `WalletStore` |
| Invoice | `src/lib/stores/invoiceStore.ts` | `InvoiceStore` |
| UI | `src/lib/stores/uiStore.ts` | `UIStore` |

### Setting up the extension

1. Install the [Redux DevTools browser extension](https://github.com/reduxjs/redux-devtools#browser-extension).
2. Run the dev server: `npm run dev`.
3. Open DevTools → **Redux** tab.

The three stores appear by name. You can:
- **Inspect** current state and individual action payloads.
- **Time-travel** by clicking any action in the log to jump to that state snapshot.
- **Replay** a sequence of actions to reproduce a bug.

### DevTools is development-only

The middleware is tree-shaken out in production (`NODE_ENV !== 'development'`). No DevTools overhead ships to users.

### Named actions

Each `set` call in the stores uses a named action (e.g. `"wallet/setConnected"`). When adding new state mutations, keep this convention so the DevTools log stays readable.

## Questions?

Open a [Discussion](../../discussions) or ask in the issue thread.
16 changes: 15 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const withBundleAnalyzer = require("@next/bundle-analyzer")({
enabled: process.env.ANALYZE === "true",
});
const { withSentryConfig } = require("@sentry/nextjs");

/** @type {import('next').NextConfig} */
const nextConfig = {
Expand Down Expand Up @@ -40,4 +41,17 @@ const nextConfig = {
},
};

module.exports = withBundleAnalyzer(nextConfig);
const sentryWebpackPluginOptions = {
org: process.env.SENTRY_ORG,
project: process.env.SENTRY_PROJECT,
authToken: process.env.SENTRY_AUTH_TOKEN,
// Only upload source maps when a real DSN is configured (i.e. in CI / production)
silent: true,
disableServerWebpackPlugin: !process.env.NEXT_PUBLIC_SENTRY_DSN,
disableClientWebpackPlugin: !process.env.NEXT_PUBLIC_SENTRY_DSN,
};

module.exports = withSentryConfig(
withBundleAnalyzer(nextConfig),
sentryWebpackPluginOptions
);
Loading