Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
185961a
Merge pull request #58 from ACTA-Team/main
JosueBrenes Feb 25, 2026
8ca6b2a
refactor: remove CredentialCard component and enhance SavedCredential…
DanielCotoJ Feb 26, 2026
b0e724e
feat: enhance VaultDashboard and SavedCredentialsCard with motion eff…
DanielCotoJ Feb 26, 2026
34fcff2
refactor: clean up VaultDashboard code for improved readability
DanielCotoJ Feb 26, 2026
6d471be
Merge remote-tracking branch 'upstream/main' into new-ui-vault
DanielCotoJ Feb 28, 2026
1d7a730
chore: update configuration and dependencies
DanielCotoJ Feb 28, 2026
f09987d
feat: add Impacta Certificate template and enhance credential handling
DanielCotoJ Feb 28, 2026
587e875
feat: add impacta bootcamp assets
JosueBrenes Mar 3, 2026
51f053a
refactor: update SVG asset for impacta bootcamp
JosueBrenes Mar 3, 2026
3614b54
feat: add Certificate component for Impacta Bootcamp with decorative …
JosueBrenes Mar 3, 2026
6c562ed
feat: enhance credential handling with additional fields and dynamic …
DanielCotoJ Mar 3, 2026
027cfc8
fix: restore issuerName field in useShareCredential hook for credenti…
DanielCotoJ Mar 3, 2026
cfead74
Merge pull request #60 from DanielCotoJ/feat/template-credencial
JosueBrenes Mar 3, 2026
13c831e
Merge remote-tracking branch 'origin/develop' into new-ui-vault
JosueBrenes Mar 3, 2026
c2359c3
feat: implement Impacta Bootcamp Certificate page and enhance credent…
JosueBrenes Mar 3, 2026
b320342
refactor: clean up code formatting in credential components
JosueBrenes Mar 3, 2026
f23f1e4
refactor: streamline credential sharing logic in useShareCredential hook
JosueBrenes Mar 3, 2026
eb839a5
feat: enhance Impacta Bootcamp Certificate with floating animations a…
JosueBrenes Mar 3, 2026
207a359
refactor: improve readability of share links in Certificate component
JosueBrenes Mar 3, 2026
17224c9
feat: enhance credential sharing functionality in useShareCredential …
JosueBrenes Mar 3, 2026
238c751
fix: correct formatting in social media share link for Impacta Bootca…
JosueBrenes Mar 3, 2026
ce35c71
refactor: simplify share URL state management in Certificate component
JosueBrenes Mar 3, 2026
5e65e2d
refactor: streamline share URL initialization in Certificate component
JosueBrenes Mar 3, 2026
a359ef0
refactor: replace useState with useSyncExternalStore for share URL in…
JosueBrenes Mar 3, 2026
6ee5057
feat: add image download functionality and short ID generation for ce…
JosueBrenes Mar 3, 2026
1384f3b
refactor: clean up unused code in Impacta Certificate types and compo…
JosueBrenes Mar 3, 2026
811a761
feat: Install vercel-react-best-practices IA skills
DanielCotoJ Mar 3, 2026
5dc279a
feat: Install vercel-react-best-practices
DanielCotoJ Mar 3, 2026
72d512c
feat: Install vercel-composition-patterns skill
DanielCotoJ Mar 3, 2026
3228d15
feat: install vercel-composition-patterns
DanielCotoJ Mar 3, 2026
014f864
feat: Install next-best-practices
DanielCotoJ Mar 3, 2026
85371bb
feat: Install next-best-practices skills
DanielCotoJ Mar 3, 2026
2313b0a
Merge pull request #61 from DanielCotoJ/feat/skills-ai
DanielCotoJ Mar 3, 2026
a3ed941
feat: implement sponsored vault creation functionality in useVault an…
JosueBrenes Mar 3, 2026
b09b146
Merge branch 'develop' of https://github.com/ACTA-Team/dApp-ACTA into…
JosueBrenes Mar 3, 2026
40ae67f
refactor: simplify vault state management and enhance toast notificat…
JosueBrenes Mar 3, 2026
a8f6af3
chore: remove AI assistant components and related files
JosueBrenes Mar 3, 2026
2f77be9
feat: add vault verification via RPC and improve vault existence checks
JosueBrenes Mar 4, 2026
bd67879
Merge pull request #59 from DanielCotoJ/new-ui-vault
JosueBrenes Mar 4, 2026
ba3a268
feat: integrate sponsored vault creation in useIssueCredential hook
JosueBrenes Mar 4, 2026
dc152c9
feat: enhance credential verification loading state and share type ha…
JosueBrenes Mar 4, 2026
f844dff
refactor: streamline SVG loading spinner in CredentialVerify component
JosueBrenes Mar 4, 2026
1b7bda7
feat: implement issuance code verification for Impacta certificates
JosueBrenes Mar 4, 2026
4a8331e
fix: update text formatting in DynamicIssueForm component
JosueBrenes Mar 4, 2026
53bc452
refactor: improve type handling and session storage in credential hooks
JosueBrenes Mar 4, 2026
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
171 changes: 171 additions & 0 deletions .agents/skills/next-best-practices/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
---
name: next-best-practices
description: Next.js best practices - file conventions, RSC boundaries, data patterns, async APIs, metadata, error handling, route handlers, image/font optimization, bundling
user-invocable: false
---

# Next.js Best Practices

Apply these rules when writing or reviewing Next.js code.

## File Conventions

See [file-conventions.md](./file-conventions.md) for:

- Project structure and special files
- Route segments (dynamic, catch-all, groups)
- Parallel and intercepting routes
- Middleware rename in v16 (middleware → proxy)

## RSC Boundaries

Detect invalid React Server Component patterns.

See [rsc-boundaries.md](./rsc-boundaries.md) for:

- Async client component detection (invalid)
- Non-serializable props detection
- Server Action exceptions

## Async Patterns

Next.js 15+ async API changes.

See [async-patterns.md](./async-patterns.md) for:

- Async `params` and `searchParams`
- Async `cookies()` and `headers()`
- Migration codemod

## Runtime Selection

See [runtime-selection.md](./runtime-selection.md) for:

- Default to Node.js runtime
- When Edge runtime is appropriate

## Directives

See [directives.md](./directives.md) for:

- `'use client'`, `'use server'` (React)
- `'use cache'` (Next.js)

## Functions

See [functions.md](./functions.md) for:

- Navigation hooks: `useRouter`, `usePathname`, `useSearchParams`, `useParams`
- Server functions: `cookies`, `headers`, `draftMode`, `after`
- Generate functions: `generateStaticParams`, `generateMetadata`

## Error Handling

See [error-handling.md](./error-handling.md) for:

- `error.tsx`, `global-error.tsx`, `not-found.tsx`
- `redirect`, `permanentRedirect`, `notFound`
- `forbidden`, `unauthorized` (auth errors)
- `unstable_rethrow` for catch blocks

## Data Patterns

See [data-patterns.md](./data-patterns.md) for:

- Server Components vs Server Actions vs Route Handlers
- Avoiding data waterfalls (`Promise.all`, Suspense, preload)
- Client component data fetching

## Route Handlers

See [route-handlers.md](./route-handlers.md) for:

- `route.ts` basics
- GET handler conflicts with `page.tsx`
- Environment behavior (no React DOM)
- When to use vs Server Actions

## Metadata & OG Images

See [metadata.md](./metadata.md) for:

- Static and dynamic metadata
- `generateMetadata` function
- OG image generation with `next/og`
- File-based metadata conventions

## Image Optimization

See [image.md](./image.md) for:

- Always use `next/image` over `<img>`
- Remote images configuration
- Responsive `sizes` attribute
- Blur placeholders
- Priority loading for LCP

## Font Optimization

See [font.md](./font.md) for:

- `next/font` setup
- Google Fonts, local fonts
- Tailwind CSS integration
- Preloading subsets

## Bundling

See [bundling.md](./bundling.md) for:

- Server-incompatible packages
- CSS imports (not link tags)
- Polyfills (already included)
- ESM/CommonJS issues
- Bundle analysis

## Scripts

See [scripts.md](./scripts.md) for:

- `next/script` vs native script tags
- Inline scripts need `id`
- Loading strategies
- Google Analytics with `@next/third-parties`

## Hydration Errors

See [hydration-error.md](./hydration-error.md) for:

- Common causes (browser APIs, dates, invalid HTML)
- Debugging with error overlay
- Fixes for each cause

## Suspense Boundaries

See [suspense-boundaries.md](./suspense-boundaries.md) for:

- CSR bailout with `useSearchParams` and `usePathname`
- Which hooks require Suspense boundaries

## Parallel & Intercepting Routes

See [parallel-routes.md](./parallel-routes.md) for:

- Modal patterns with `@slot` and `(.)` interceptors
- `default.tsx` for fallbacks
- Closing modals correctly with `router.back()`

## Self-Hosting

See [self-hosting.md](./self-hosting.md) for:

- `output: 'standalone'` for Docker
- Cache handlers for multi-instance ISR
- What works vs needs extra setup

## Debug Tricks

See [debug-tricks.md](./debug-tricks.md) for:

- MCP endpoint for AI-assisted debugging
- Rebuild specific routes with `--debug-build-paths`
84 changes: 84 additions & 0 deletions .agents/skills/next-best-practices/async-patterns.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Async Patterns

In Next.js 15+, `params`, `searchParams`, `cookies()`, and `headers()` are asynchronous.

## Async Params and SearchParams

Always type them as `Promise<...>` and await them.

### Pages and Layouts

```tsx
type Props = { params: Promise<{ slug: string }> };

export default async function Page({ params }: Props) {
const { slug } = await params;
}
```

### Route Handlers

```tsx
export async function GET(request: Request, { params }: { params: Promise<{ id: string }> }) {
const { id } = await params;
}
```

### SearchParams

```tsx
type Props = {
params: Promise<{ slug: string }>;
searchParams: Promise<{ query?: string }>;
};

export default async function Page({ params, searchParams }: Props) {
const { slug } = await params;
const { query } = await searchParams;
}
```

### Synchronous Components

Use `React.use()` for non-async components:

```tsx
import { use } from 'react';

type Props = { params: Promise<{ slug: string }> };

export default function Page({ params }: Props) {
const { slug } = use(params);
}
```

### generateMetadata

```tsx
type Props = { params: Promise<{ slug: string }> };

export async function generateMetadata({ params }: Props): Promise<Metadata> {
const { slug } = await params;
return { title: slug };
}
```

## Async Cookies and Headers

```tsx
import { cookies, headers } from 'next/headers';

export default async function Page() {
const cookieStore = await cookies();
const headersList = await headers();

const theme = cookieStore.get('theme');
const userAgent = headersList.get('user-agent');
}
```

## Migration Codemod

```bash
npx @next/codemod@latest next-async-request-api .
```
Loading