frontend-feature
/frontend-feature
Buduje nową stronę lub funkcję danych w Next.js: trasy, podłączenie do backendu, stan klienta, Zustand i wielojęzyczność.
- Autor
- AnkonKumarSingh ↗
- Repozytorium
- InnovateIT-Agent-OS-AI-Agent-Platform ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 06.10.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 06.10.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Buduje nową stronę lub funkcję danych w Next.js: trasy, podłączenie do backendu, stan klienta, Zustand i wielojęzyczność.
Oryginalny opis (EN)
Build a new page, view, or data-driven feature in the Next.js frontend. Use when adding a route under the dashboard/marketing area, wiring UI to a backend endpoint, adding client state, or creating a localized page. Covers App Router, data fetching, Zustand stores, and i18n.
Jak działa
- Layout
- Steps
- Rules
Podgląd SKILL.md
--- name: frontend-feature description: Build a new page, view, or data-driven feature in the Next.js frontend. Use when adding a route under the dashboard/marketing area, wiring UI to a backend endpoint, adding client state, or creating a localized page. Covers App Router, data fetching, Zustand stores, and i18n. --- # Frontend Feature (Next.js 15 + React 19) The frontend lives in `frontend/src/` — App Router, TypeScript, Tailwind, `next-intl`, and Zustand. Routes are **locale-prefixed**: `app/[locale]/…`. ## Layout | Path | Purpose | |------|---------| | `src/app/[locale]/…` | Pages (route groups: `(dashboard)`, `(marketing)`, `(auth)`) | | `src/app/api/…` | Next.js route handlers that proxy to the backend | | `src/lib/` | API clients (`api-client.ts`, `*-api.ts`), `query-keys.ts`, helpers | | `src/components/` | UI by domain (`chat/`, `kb/`, `dashboard/`, `ui/`, …) | | `src/stores/` | Zustand stores (one per concern, re-exported from `index.ts`) | | `src/hooks/` | `useChat`, `useWebSocket`, etc. | ## Steps 1. **Page** — add `src/app/[locale]/(dashboard)/<feature>/page.tsx`. Default to a **Server Component**; add `"use client"` only where you need interactivity. Read params via the async App Router APIs. 2. **Data access** — add a typed client in `src/lib/<feature>-api.ts` built on `api-client.ts`. Don't scatter `fetch` calls in components. For server-side fetching use `server-api.ts`. If the backend needs a same-origin proxy (auth cookies), add a handler under `src/app/api/…`. 3. **Caching keys** — register query keys in `src/lib/query-keys.ts` so cache invalidation stays consistent. 4. **Client state** — if the feature needs shared client state, add a store in `src/stores/<feature>-store.ts` and export it from `stores/index.ts`. Keep server data in the data layer; use stores for UI/ephemeral state. 5. **Components** — put reusable pieces in `src/components/<domain>/`; compose primitives from `src/components/ui/`. Keep components under ~100 lines — extract when they grow. 6. **i18n** — user-facing copy goes through `next-intl` messages, not hardcoded strings. Add keys to the message catalog and read them with `useTranslations` / `getTranslations`. 7. **Verify:** ```bash cd frontend bun run type-check && bun run lint bun dev # check the page renders against a running backend (make dev) ``` ## Rules - Server Components by default; `"use client"` only when needed (state, effects, event handlers). - All API calls go through `src/lib/` clients; components consume hooks/clients, not raw `fetch`. - Localized strings via `next-intl` — never hardcode user-facing copy. - Match the existing folder-by-domain structure; reuse `components/ui/` primitives.
Wersje
W bazie nie ma innych skilli o nazwie frontend-feature.
Migawka bazy z 13.11.2026 · wersja paczki f67e09b39913 (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 1 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 90nextjs-zustand
Wdraża stan globalny, magazyny, persist i hydrację w komponentach klienckich Next.js 16 App Router z Zustand v5. - 100web-state-zustand
Obejmuje sklepy Zustand i wzorce stanu klienta: wybór między Zustand a useState, stan globalny i unikanie nadużywania Context. - 90react-state
Obsługuje zarządzanie stanem w React za pomocą Zustand v5: stan globalny, store'y, persist i stan po stronie klienta. - 100state-management
Stosuje wzorce React Query i Zustand do pobierania danych, cache'owania, mutacji i stanu po stronie klienta. - 100zustand
Pomaga tworzyć i używać stanów Zustand w TypeScript w projektach Next.js, z selektorami i middleware. - 100zustand-store-creator
Prawdopodobnie tworzy store Zustand w pracy nad frontendem, przy tworzeniu lub modyfikowaniu funkcji kreatora store.