data-integration-layer

star 0

Standards for reliably fetching, validating, and caching 3rd party data (e.g., Yahoo Finance). Use this whenever external data is needed.

FrknKoseoglu By FrknKoseoglu schedule Updated 1/23/2026

name: data-integration-layer description: Standards for reliably fetching, validating, and caching 3rd party data (e.g., Yahoo Finance). Use this whenever external data is needed.

🌐 Data Integration & Resilience Strategy

We treat external APIs (Yahoo Finance, etc.) as "Hostile Environments". They will fail, they will be slow, and they will change data formats. We must be ready.

🛡️ The 3-Layer Defense Protocol

1. The Cache Layer (Performance)

NEVER fetch raw data inside a Component. Wrap everything in Next.js Cache.

import { unstable_cache } from 'next/cache';

// Example: Fetch Stock Price
export const getStockPrice = unstable_cache(
  async (symbol: string) => {
    // ... logic
  },
  ['stock-price-key'], 
  { revalidate: 30, tags: [`stock-${symbol}`] } // Cache for 30s
);
Install via CLI
npx skills add https://github.com/FrknKoseoglu/phintech-web-concept --skill data-integration-layer
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator
FrknKoseoglu
FrknKoseoglu Explore all skills →