1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{5594:(e,t,n)=>{Promise.resolve().then(n.bind(n,7748))},7748:(e,t,n)=>{"use strict";n.d(t,{default:()=>ep});var a=n(9261),s=n(6001);let r={linkedin:"https://linkedin.com/in/muke-johnbaptist",youtube:"https://www.youtube.com/@JBWEBDEVELOPER",website:"https://jb.desishub.com",buyLink:"https://gmukejohnbaptist.gumroad.com/l/api-handbook",pages:42};function o(e){let{children:t,variant:n="primary",size:o="md",className:i="",onClick:l,asChild:d=!0,href:c=r.buyLink,target:m,rel:u}=e,p="".concat("inline-block font-mono font-medium text-center cursor-pointer select-none transition-all duration-200 ease-out"," ").concat({primary:"bg-foreground text-background border border-foreground shadow-[4px_4px_0_0_hsl(var(--background)),4px_4px_0_1px_hsl(var(--foreground))] hover:shadow-[2px_2px_0_0_hsl(var(--background)),2px_2px_0_1px_hsl(var(--foreground))] active:shadow-[2px_2px_0_0_hsl(var(--background)),2px_2px_0_1px_hsl(var(--foreground))] active:translate-x-[2px] active:translate-y-[2px]",secondary:"bg-muted text-foreground border border-border shadow-[4px_4px_0_0_hsl(var(--background)),4px_4px_0_1px_hsl(var(--border))] hover:shadow-[2px_2px_0_0_hsl(var(--background)),2px_2px_0_1px_hsl(var(--border))] active:shadow-[2px_2px_0_0_hsl(var(--background)),2px_2px_0_1px_hsl(var(--border))] active:translate-x-[2px] active:translate-y-[2px]",outline:"bg-transparent text-foreground border border-foreground shadow-[4px_4px_0_0_hsl(var(--foreground)),4px_4px_0_1px_transparent] hover:shadow-[2px_2px_0_0_hsl(var(--foreground)),2px_2px_0_1px_transparent] active:shadow-[2px_2px_0_0_hsl(var(--foreground)),2px_2px_0_1px_transparent] active:translate-x-[2px] active:translate-y-[2px]"}[n]," ").concat({sm:"px-4 py-2 text-sm rounded",md:"px-6 py-3 text-sm rounded-md",lg:"px-8 py-4 text-base rounded-md"}[o]," ").concat(i),h=(0,a.jsx)(s.P.span,{className:"flex items-center justify-center gap-2",whileHover:{scale:1.02},whileTap:{scale:.98},children:t});return d&&c?(0,a.jsx)("a",{href:c,target:m,rel:u,className:p,children:h}):(0,a.jsx)("button",{className:p,onClick:l,children:h})}var i=n(9177),l=n(10),d=n(4467);function c(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,d.QP)((0,l.$)(t))}let m=i.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,a.jsx)("div",{ref:t,className:c("rounded-lg border bg-card text-card-foreground shadow-sm",n),...s})});m.displayName="Card",i.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,a.jsx)("div",{ref:t,className:c("flex flex-col space-y-1.5 p-6",n),...s})}).displayName="CardHeader",i.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,a.jsx)("div",{ref:t,className:c("text-2xl font-semibold leading-none tracking-tight",n),...s})}).displayName="CardTitle",i.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,a.jsx)("div",{ref:t,className:c("text-sm text-muted-foreground",n),...s})}).displayName="CardDescription";let u=i.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,a.jsx)("div",{ref:t,className:c("p-6 pt-0",n),...s})});u.displayName="CardContent",i.forwardRef((e,t)=>{let{className:n,...s}=e;return(0,a.jsx)("div",{ref:t,className:c("flex items-center p-6 pt-0",n),...s})}).displayName="CardFooter";var p=n(5820);let h=(0,p.F)("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function x(e){let{className:t,variant:n,...s}=e;return(0,a.jsx)("div",{className:c(h({variant:n}),t),...s})}var g=n(7483),f=n(5360),b=n(6688),v=n(8068),j=n(4266),y=n(3952),N=n(6069),w=n(6711),P=n(6362),k=n(7513),A=n(9342),I=n(4139),_=n(3637),T=n(4314),F=n(3115);let S=e=>{let t=e.geometry.attributes.uv;if(!t){console.log("No UV coordinates found on Object_2");return}let n=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,s=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;for(let e=0;e<t.count;e++){let o=t.getX(e),i=t.getY(e);
1n=Math.min(n,o),a=Math.max(a,o),s=Math.min(s,i),r=Math.max(r,i)}let o=a-n,i=r-s;if(console.log("Cover UV extent:",o,":",i),o>0&&i>0){let e,t,n=o/i;console.log("UV-based texture aspect ratio:",n),console.log("=== OPTIMAL TEXTURE DIMENSIONS (UV-BASED) ==="),n>1?t=Math.pow(2,Math.round(Math.log2(t=Math.round((e=2048)/n)))):e=Math.pow(2,Math.round(Math.log2(e=Math.round((t=2048)*n)))),console.log("\uD83C\uDFAF OPTIMAL SIZE FOR YOUR UV MAPPING:"),console.log(" ".concat(e," x ").concat(t," pixels")),console.log(" Aspect ratio: ".concat(n.toFixed(3)," (").concat(o.toFixed(3)," : ").concat(i.toFixed(3)," UV units)")),console.log("\uD83D\uDCD0 Alternative sizes:"),console.log(" High quality: ".concat(2*e," x ").concat(2*t)),console.log(" Standard: ".concat(e," x ").concat(t)),console.log(" Low quality: ".concat(Math.max(512,e/2)," x ").concat(Math.max(512,t/2))),console.log("\uD83D\uDCA1 Your image should match this aspect ratio for best results"),console.log("================================")}else console.log("â Invalid UV mapping - width or height is zero"),console.log("This object cannot display textures properly");console.log("UV sample (first 20 coords):",t.array.slice(0,20))},E=e=>{if(console.log("=== UV Analysis for All Book Objects ==="),!e){console.log("â Scene not available");return}let t=e.getObjectByName("Sketchfab_model");if(!t){console.log("â Sketchfab_model not found");return}console.log("â
Found Sketchfab_model");let n=t.getObjectByName("Geode");if(!n){console.log("â Geode not found");return}console.log("â
Found Geode"),console.log("Children in Geode:",n.children.map(e=>e.name)),["Object_2","Object_3","Object_4"].forEach(e=>{console.log("\n--- Checking for ".concat(e," ---"));let t=n.getObjectByName(e);if(!t){console.log("â ".concat(e," not found"));return}if(console.log("â
Found ".concat(e)),!t.geometry){console.log("â ".concat(e," has no geometry"));return}console.log("--- ".concat(e," UV Analysis ---")),console.log("Object name:",t.name),console.log("Material type:",t.material.constructor.name);let a=t.geometry.attributes.uv;if(a){let e=Number.POSITIVE_INFINITY,t=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY,s=Number.NEGATIVE_INFINITY;for(let r=0;r<a.count;r++){let o=a.getX(r),i=a.getY(r);e=Math.min(e,o),t=Math.max(t,o),n=Math.min(n,i),s=Math.max(s,i)}let r=t-e,o=s-n;0===r&&0===o?console.log("â UV coordinates exist but all are (0,0)"):r>0&&o>0?(console.log("â
Valid UV mapping found!"),console.log("UV extent:",r,":",o),console.log("Recommended texture aspect ratio:",r/o)):console.log("â Invalid UV mapping - some coordinates are zero"),console.log("UV sample (first 10 coords):",a.array.slice(0,10))}else console.log("â No UV coordinates found")})},z=e=>{if(!e){console.log("Object_2 not found, cannot generate UV coordinates");return}let t=e.geometry;if(!t.attributes.position){console.log("No position attribute found in geometry");return}console.log("Generating UV coordinates using ultra-restrictive normals + spatial filtering..."),t.computeVertexNormals();let n=t.attributes.position,a=t.attributes.normal;t.computeBoundingBox();let s=t.boundingBox,r=s.min.z,o=s.max.z;for(let e=0;e<n.count;e++){let t=n.getZ(e);r=Math.max(r,t),o=Math.min(o,t)}let i=r-o,l=r-.05*i,d=o+.05*i;console.log("Z range: ".concat(o.toFixed(3)," to ").concat(r.toFixed(3))),console.log("Front Z threshold: ".concat(l.toFixed(3),", Back Z threshold: ").concat(d.toFixed(3)));let c=s.max.x-s.min.x,m=s.max.y-s.min.y,u=new Uint8Array(n.count),p=0,h=0,x=0;for(let e=0;e<n.count;e++){let t=a.getX(e),s=a.getY(e),r=a.getZ(e),o=n.getZ(e),i=.1>Math.abs(t)&&.1>Math.abs(s),c=r>=.98&&i&&o>=l,m=r<=-.98&&i&&o<=d;c||m?(u[e]=1,c?p++:h++):(u[e]=0,x++)}let g=function(e,t){let n=e.attributes.position;e.attributes.uv;let a=e.index,s=[],r=[],o=[],i=new Map;for(let e=0;e<n.count;e++)s.push(n.getX(e),n.getY(e),n.getZ(e)),r.push(0,0);for(let e=0;e<a.count;e+=3){let l=a.getX(e),d=a.getX(e+1),c=a.getX(e+2),m=1===t[l],u=1===t[d],p=1===t[c],h=m&&u&&p,x=!m&&!u&&!p,g=[l,d,c];h||x||g.forEach((e,a)=>{if(t[e]!==+h){let t=i.get(e);void 0===t&&(t=s.length/3,i.set(e,t),s.push(n.getX(e),n.getY(e),n.getZ(e)),r.push(0,0)),g[a]=t}}),o.push(...g)}let l=new F.LoY;return l.setAttribute("position",new F.qtW(s,3)),l.setAttribute("uv",new F.qtW(r,2)),l.setIndex(o),l}(t,u);e.geometry=g;let f=g.attributes.position,b=new Float32Array(2*f.count);g.computeVertexNormals();let v=g.attributes.normal;for(let e=0;e<f.count;e++){let t=f.getX(e),n=f.getY(e),a=f.getZ(e),r=v.getX(e),o=v.getY(e),i=v.getZ(e),u=-10,p=-10,h=.1>Math.abs(r)&&.1>Math.abs(o),x=i>=.98&&h&&a>=l,g=i<=-.98&&h&&a<=d;if(x){let e=(t-s.min.x)/c,a=(n-s.min.y)/m;u=.5*e,p=a}else if(g){let e=(t-s.min.x)/c,a=(n-s.min.y)/m;u=.5+.5*e,p=a}b[2*e]=u,b[2*e+1]=p}g.setAttribute("uv",new F.THS(b,2)),g.attributes.uv.needsUpdate=!0,console.log("Ultra-restrictive spatial + normal UV coordinates generated!"),console.log("Original vertices: ".concat(n.count,", New vertices: ").concat(f.count)),console.log("Front vertices: ".concat(p,", Back vertices: ").concat(h,", Spine vertices: ").concat(x)),S(e)};class O{static getInstance(){return O.instance||(O.instance=new O),O.instance}async preloadImage(e){if(this.preloadedTextures.has(e))return this.preloadedTextures.get(e);if(this.loadingPromises.has(e))return this.loadingPromises.get(e);let t=new Promise((t,n)=>{let a=new Image;a.crossOrigin="anonymous",a.onload=()=>{this.preloadedTextures.set(e,a),this.loadingPromises.delete(e),t(a)},a.onerror=()=>{this.loadingPromises.delete(e),n(Error("Failed to preload image: ".concat(e)))},a.src=e});return this.loadingPromises.set(e,t),t}async preloadAllBookTextures(){try{await Promise.all(["/images/front.png","/images/back.png","/images/we-are-so-back-cover-optimized.jpeg","/images/we-are-so-back-back-cover-optimized.jpeg","/images/vibe-coding-front-cover.jpeg","/images/vibe-coding-back-cover.jpeg","/images/how-to-say-please-front-cover.jpeg","/images/how-to-say-please-back-cover.jpeg"].map(e=>
1this.preloadImage(e))),console.log("All book textures preloaded successfully")}catch(e){console.warn("Some textures failed to preload:",e)}}getPreloadedImage(e){return this.preloadedTextures.get(e)||null}constructor(){this.preloadedTextures=new Map,this.loadingPromises=new Map}}function U(e){let{params:t,materialProps:n,meshRef:s,onReady:r,bookIndex:o=0}=e,{scene:l}=(0,T.p)("/models/book_red.glb"),d=(0,i.useRef)(null),[c,m]=(0,i.useState)(null),[u,p]=(0,i.useState)(null),[h,x]=(0,i.useState)(!1),[g,f]=(0,i.useState)(null),[b,v]=(0,i.useState)(null),[j,y]=(0,i.useState)(null),[N,w]=(0,i.useState)(o),P=h&&j&&u;(0,i.useEffect)(()=>{r&&r(!!P)},[P,r]),(0,i.useEffect)(()=>{l&&!c&&m(l.clone())},[l,c]),(0,i.useEffect)(()=>{if(o!==N||!g&&!b){w(o),f(null),v(null),y(null);let e=new F.Tap,t=O.getInstance(),n=(n,a,s)=>{let r=t.getPreloadedImage(n);if(r){let e=new F.gPd(r);e.flipY=!0,e.colorSpace=F.er$,e.wrapS=F.GJx,e.wrapT=F.GJx,e.minFilter=F.k6q,e.magFilter=F.k6q,e.generateMipmaps=!1,e.needsUpdate=!0,a(e);return}e.load(n,a,void 0,s)},a=(()=>{switch(o){case 0:return"/images/front.png";case 1:default:return"/images/we-are-so-back-cover-optimized.jpeg";case 2:return"/images/vibe-coding-front-cover.jpeg";case 3:return"/images/how-to-say-please-front-cover.jpeg"}})(),s=(()=>{switch(o){case 0:return"/images/back.png";case 1:default:return"/images/we-are-so-back-back-cover-optimized.jpeg";case 2:return"/images/vibe-coding-back-cover.jpeg";case 3:return"/images/how-to-say-please-back-cover.jpeg"}})();n(a,e=>{f(e),console.log("Front cover texture loaded for book ".concat(o))},e=>{console.error("Failed to load front cover texture for book ".concat(o,":"),e)}),n(s,e=>{v(e),console.log("Back cover texture loaded for book ".concat(o))},e=>{console.error("Failed to load back cover texture for book ".concat(o,":"),e)})}},[o,N,g,b]),(0,i.useEffect)(()=>{if(c&&!h){try{E(c)}catch(e){console.log("Error during UV analysis:",e)}let e=c.getObjectByName("Sketchfab_model");if(e){let t=e.getObjectByName("Geode");if(t){let e=t.getObjectByName("Object_2");e&&e.material&&(console.log("Found Object_2 - book cover material loaded"),z(e),x(!0),console.log("UV coordinates generated for both front and back covers"),console.log("object.name:",e.name),console.log("material.type:",e.material.constructor.name),console.log("material.map:",e.material.map),S(e),p(e),s.current=e)}}}},[c,s,h]);let k=(e,t)=>{let n=document.createElement("canvas"),a=n.getContext("2d");if(!a)return null;n.width=2*e.image.width,n.height=e.image.height,a.drawImage(e.image,0,0,e.image.width,e.image.height),a.drawImage(t.image,e.image.width,0,t.image.width,t.image.height);let s=new F.GOR(n);
1return s.flipY=!0,s.colorSpace=F.er$,s.wrapS=F.ghU,s.wrapT=F.ghU,s.minFilter=F.k6q,s.magFilter=F.k6q,s.generateMipmaps=!1,s.needsUpdate=!0,s};(0,i.useEffect)(()=>{if(g&&b){let e=k(g,b);e&&(y(e),console.log("Combined front and back cover texture created"))}},[g,b]);let A=(e,t)=>{let n=e.userData.originalMaterial||e.material;Array.isArray(n)&&(n=n[0]);let a=n.clone();t.texture?(a.map=t.texture,t.texture.offset.set(t.offsetX,t.offsetY),a.color.setRGB(1,1,1),a.metalness=.4,a.roughness=1,a.emissive.setRGB(0,0,0),a.emissiveIntensity=0,a.vertexColors=!1,a.transparent=!1,a.opacity=1,a.visible=!0,a.polygonOffset=!0,a.polygonOffsetFactor=-1,a.polygonOffsetUnits=-1,a.needsUpdate=!0,t.texture.colorSpace=F.er$,t.texture.flipY=!0):(a.map=null,a.color.set(t.color),a.emissive.set(t.emissive),a.emissiveIntensity=t.emissiveIntensity,a.metalness=t.metalness,a.roughness=t.roughness,a.transparent=!1,a.opacity=1,a.visible=!0,a.polygonOffset=!0,a.polygonOffsetFactor=-1,a.polygonOffsetUnits=-1,a.needsUpdate=!0),e.material=a};return((0,i.useEffect)(()=>{u&&j&&h&&(console.log("Applying combined front and back cover textures to Object_2"),A(u,{...n,texture:j}))},[u,n,j,h]),P&&c)?(0,a.jsx)("primitive",{ref:d,object:c,scale:t.scale,position:t.position,rotation:t.rotation}):null}function C(e){let{params:t}=e,{camera:n}=(0,k.C)(),a=(0,i.useRef)(t);return(0,k.D)(()=>{(a.current.cameraPosition!==t.cameraPosition||a.current.cameraFov!==t.cameraFov)&&(n.position.set(...t.cameraPosition),n.fov=t.cameraFov,n.updateProjectionMatrix(),a.current=t)}),null}function B(e){let{onFirstRender:t}=e,n=(0,i.useRef)(!1);return(0,k.D)(()=>{n.current||(n.current=!0,t())}),null}function D(e){let{params:t,materialProps:n,meshRef:s,onReady:r,bookIndex:o}=e,l=(0,i.useRef)(null),d=(0,i.useRef)(null),[c,m]=(0,i.useState)(!1);return(0,i.useEffect)(()=>{let e=e=>{l.current&&("function"==typeof l.current.handlePointerUp?l.current.handlePointerUp(e):"function"==typeof l.current.onPointerUp&&l.current.onPointerUp(e))},t=e=>{l.current&&("function"==typeof l.current.handlePointerUp?l.current.handlePointerUp(e):"function"==typeof l.current.onPointerUp&&l.current.onPointerUp(e))};return window.addEventListener("pointerup",e),window.addEventListener("mouseup",t),()=>{window.removeEventListener("pointerup",e),window.removeEventListener("mouseup",t)}},[]),(0,a.jsx)("div",{ref:d,className:"w-full h-full",children:(0,a.jsx)(A.Hl,{className:"w-full h-full",camera:{position:t.cameraPosition,fov:t.cameraFov},resize:{scroll:!1,debounce:{scroll:0,resize:0}},dpr:[1,2],legacy:!0,children:(0,a.jsxs)(i.Suspense,{fallback:null,children:[(0,a.jsx)("ambientLight",{intensity:.5}),(0,a.jsx)("directionalLight",{position:[10,10,5],intensity:1}),(0,a.jsx)("directionalLight",{position:[-5,8,10],intensity:.8,color:"#fffacd"}),(0,a.jsx)(I.OH,{preset:"sunset"}),(0,a.jsx)(B,{onFirstRender:()=>{m(!0)}}),(0,a.jsx)(U,{params:t,materialProps:n,meshRef:s,onReady:e=>{r&&r(e&&c)},bookIndex:o}),(0,a.jsx)(C,{params:t}),(0,a.jsx)(_.V,{ref:l,noPan:!0,noZoom:!0,staticMoving:!1,dynamicDampingFactor:.05,rotateSpeed:1.5,target:t.position})]})})})}var R=n(6686),M=n(6680),q=n(4421);let V=(0,p.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),G=i.forwardRef((e,t)=>
1{let{className:n,variant:s,size:r,asChild:o=!1,...i}=e,l=o?q.DX:"button";return(0,a.jsx)(l,{className:c(V({variant:s,size:r,className:n})),ref:t,...i})});G.displayName="Button";var L=n(9070);let Y=L.bL,H=L.R6,K=L.Ke;var X=n(7233);let J=i.forwardRef((e,t)=>{let{className:n,orientation:s="horizontal",decorative:r=!0,...o}=e;return(0,a.jsx)(X.b,{ref:t,decorative:r,orientation:s,className:c("shrink-0 bg-border","horizontal"===s?"h-[1px] w-full":"h-full w-[1px]",n),...o})});function Z(e){let{className:t,children:n,...s}=e;return(0,a.jsxs)(Y,{className:c("group/collapsible not-prose relative my-6",t),...s,children:[(0,a.jsx)(H,{asChild:!0,children:(0,a.jsxs)("div",{className:"absolute top-2 right-10 z-10 flex items-center gap-2",children:[(0,a.jsxs)(G,{className:"size-6 rounded-md",variant:"secondary",size:"icon",children:[(0,a.jsx)(R.A,{className:"hidden group-data-[state=open]/collapsible:block"}),(0,a.jsx)(M.A,{className:"hidden group-data-[state=closed]/collapsible:block"})]}),(0,a.jsx)(J,{className:"data-[orientation=vertical]:h-4",orientation:"vertical"})]})}),(0,a.jsx)(K,{className:"overflow-hidden data-[state=closed]:max-h-80 data-[state=closed]:rounded-b-lg [&>figure]:my-0",forceMount:!0,children:n}),(0,a.jsx)(H,{className:"absolute inset-x-0 bottom-0 flex h-24 items-end justify-center rounded-b-lg bg-linear-to-t from-code from-25% to-transparent pb-4 text-sm font-medium text-muted-foreground group-data-[state=open]/collapsible:hidden",children:"Expand"})]})}J.displayName=X.b.displayName;var W=n(6640),$=n(755),Q=n(9500);function ee(e){let{value:t,className:n,...s}=e,[r,o]=(0,i.useOptimistic)("idle"),[,l]=(0,i.useTransition)();return(0,a.jsxs)(G,{size:"icon",variant:"secondary",className:c("z-10 size-6 rounded-md",n),onClick:()=>{l(async()=>{try{await navigator.clipboard.writeText(t),o("copied")}catch(e){o("failed")}await new Promise(e=>setTimeout(e,2e3))})},...s,children:["idle"===r?(0,a.jsx)(W.A,{className:"size-3"}):"copied"===r?(0,a.jsx)($.A,{className:"size-3"}):"failed"===r?(0,a.jsx)(Q.A,{className:"size-3"}):null,(0,a.jsx)("span",{className:"sr-only",children:"Copy"})]})}let et=e=>{let{children:t,language:n="javascript",collapsible:s=!1}=e,r=(0,a.jsxs)("div",{className:"relative overflow-hidden rounded-lg bg-slate-900 dark:bg-slate-950",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between px-4 py-2 bg-slate-800 dark:bg-slate-900 border-b border-slate-700",children:[(0,a.jsx)("span",{className:"text-xs font-mono text-slate-400",children:n}),(0,a.jsx)(ee,{value:t})]}),(0,a.jsx)("pre",{className:"overflow-x-auto p-4",children:(0,a.jsx)("code",{className:"text-sm font-mono text-slate-100 leading-relaxed",children:t})})]});return s?(0,a.jsx)(Z,{children:r}):r},en={initial:{},animate:{transition:{staggerChildren:.1}}},ea={initial:{opacity:0,y:20},animate:{opacity:1,y:0,transition:{duration:.6}}},es=()=>(0,a.jsx)("section",{className:"container mx-auto px-4 py-20",children:(0,a.jsxs)(s.P.div,{initial:"initial",whileInView:"animate",viewport:{once:!0},variants:en,className:"max-w-4xl mx-auto",children:[(0,a.jsx)(s.P.h2,{variants:ea,className:"font-mono text-3xl font-bold mb-8",children:"Chapter 1: Lean Create Payload (LCP)"}),(0,a.jsxs)(s.P.div,{variants:ea,className:"mb-8",children:[(0,a.jsx)("p",{className:"text-muted-foreground mb-6 leading-relaxed",children:"The Philosophy of Minimalist Creation. When initiating the creation of a new resource via an API, the temptation often arises to collect every conceivable piece of information upfront. The Lean Create Payload (LCP) principle posits that the initial Create operation should involve a minimal set of essential data, typically not exceeding five fields for optimal API performance and smoother user experience."}),(0,a.jsxs)("div",{className:"bg-muted p-6 rounded-lg mb-6",children:[(0,a.jsx)("h4",{className:"font-mono font-semibold mb-3",children:"Code Example: LCP with Prisma - Product Creation"}),(0,a.jsx)(et,{language:"javascript",collapsible:!0,children:"// Prisma schema - minimal fields for initial creation\nmodel Product {\n id String @id @default(cuid())\n name String\n category String\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n \n // Optional fields added later via updates\n description String?\n price Decimal?\n weight Float?\n dimensions String?\n}\n\n// Node.js API endpoint - LCP implementation\napp.post('/api/products', async (req, res) => {\n try {\n const { name, category } = req.body;\n \n // Only require essential fields\n if (!name || !category) {\n return res.status(400).json({ \n error: 'Name and category are required' \n });\n }\n \n const product = await prisma.product.create({\n data: { name, category }\n });\n \n // Return only the ID as per LCP principle\n res.status(201).json({ id: product.id });\n } catch (error) {\n res.status(500).json({ error: 'Creation failed' });\n }\n});"})]}),(0,a.jsxs)("div",{className:"bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 p-4 rounded-lg mb-6",children:[(0,a.jsx)("h4",{className:"font-mono font-semibold text-blue-800 dark:text-blue-200 mb-2",children:"Pro Tip"}),(0,a.jsx)("p",{className:"text-blue-700 dark:text-blue-300 text-sm",children:"Smaller payloads translate to faster network transfers and quicker server processing. Focus on absolute necessities for initial creationâadditional fields can be added via subsequent updates."})]}),(0,a.jsx)("div",{className:"text-center",children:(0,a.jsxs)(o,{size:"lg",children:[(0,a.jsx)(g.A,{className:"h-4 w-4"}),"Get the Full Book"]})})]})]})}),er=()=>(0,a.jsx)("section",{className:"container mx-auto px-4 py-20 bg-muted/30",children:(0,a.jsxs)(s.P.div,{initial:"initial",whileInView:"animate",viewport:{once:!0},variants:en,className:"max-w-4xl mx-auto",children:[(0,a.jsx)(s.P.h2,{variants:ea,className:"font-mono text-3xl font-bold mb-8",children:"Chapter 2: Patch-First Update (PFU)"}),(0,a.jsxs)(s.P.div,{variants:ea,children:[(0,a.jsx)("p",{className:"text-muted-foreground mb-6 leading-relaxed",children:"The Precision of Parti
1al Updates. The Patch-First Update (PFU) principle advocates for using PATCH requests for updates, focusing on sending only the fields that have been explicitly changed. This approach aligns with the reality that users typically modify only one or two fields at a time, leading to optimized network usage and improved API performance."}),(0,a.jsxs)("div",{className:"bg-background p-6 rounded-lg mb-6 border",children:[(0,a.jsx)("h4",{className:"font-mono font-semibold mb-3",children:"Code Example: PFU with Prisma - Partial Product Update"}),(0,a.jsx)(et,{language:"javascript",collapsible:!0,children:"// Node.js PATCH endpoint with Prisma\napp.patch('/api/products/:id', async (req, res) => {\n try {\n const { id } = req.params;\n const updates = req.body;\n \n // Remove undefined fields to only update changed data\n const cleanUpdates = Object.fromEntries(\n Object.entries(updates).filter(([_, value]) => value !== undefined)\n );\n \n if (Object.keys(cleanUpdates).length === 0) {\n return res.status(400).json({ error: 'No fields to update' });\n }\n \n // Prisma automatically handles partial updates\n const updatedProduct = await prisma.product.update({\n where: { id },\n data: cleanUpdates\n });\n \n // Return only the ID as confirmation\n res.json({ id: updatedProduct.id });\n } catch (error) {\n if (error.code === 'P2025') {\n return res.status(404).json({ error: 'Product not found' });\n }\n res.status(500).json({ error: 'Update failed' });\n }\n});\n\n// Frontend usage - only send changed fields\nconst updateProduct = async (id, changedFields) => {\n const response = await fetch(`/api/products/${id}`, {\n method: 'PATCH',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify(changedFields) // Only modified data\n });\n return response.json();\n};"})]}),(0,a.jsxs)("div",{className:"bg-green-50 dark:bg-green-950/20 border border-green-200 dark:border-green-800 p-4 rounded-lg mb-6",children:[(0,a.jsx)("h4",{className:"font-mono font-semibold text-green-800 dark:text-green-200 mb-2",children:"Pro Tip"}),(0,a.jsx)("p",{className:"text-green-700 dark:text-green-300 text-sm",children:"PATCH reduces payload size significantly and minimizes conflicts in concurrent updates. Track which fields have been modified on the frontend and only include those in your PATCH request."})]}),(0,a.jsx)("div",{className:"text-center",children:(0,a.jsxs)(o,{size:"lg",children:[(0,a.jsx)(g.A,{className:"h-4 w-4"}),"Get the Full Book"]})})]})]})}),eo=()=>(0,a.jsx)("section",{className:"container mx-auto px-4 py-20",children:(0,a.jsxs)(s.P.div,{initial:"initial",whileInView:"animate",viewport:{once:!0},variants:en,className:"max-w-4xl mx-auto",children:[(0,a.jsx)(s.P.h2,{variants:ea,className:"font-mono text-3xl font-bold mb-8",children:"Chapter 3: Selective Get Optimization (SGO)"}),(0,a.jsxs)(s.P.div,{variants:ea,children:[(0,a.jsx)("p",{className:"text-muted-foreground mb-6 leading-relaxed",children:"The Art of Fetching Only What You Need. The Selective Get Optimization (SGO) principle emphasizes the critical importance of optimizing your queries to retrieve only the necessary fields. This practice significantly reduces network latency, bandwidth consumption, and improves both backend performance and frontend rendering speed."}),(0,a.jsxs)("div",{className:"bg-muted p-6 rounded-lg mb-6",children:[(0,a.jsx)("h4",{className:"font-mono font-semibold mb-3",children:"Code Example: SGO with Prisma - Selective Field Retrieval"}),(0,a.jsx)(et,{language:"javascript",collapsible:!0,children:"// Inefficient: Fetching all fields\nconst products = await prisma.product.findMany();\n\n// Efficient: SGO with Prisma select\nconst products = await prisma.product.findMany({\n select: {\n id: true,\n name: true,\n imageUrl: true,\n slug: true\n // Only fields needed for homepage list\n }\n});\n\n// API endpoint with field selection parameter\napp.get('/api/products', async (req, res) => {\n try {\n const { fields } = req.query;\n \n let selectFields = {\n id: true,\n name: true,\n imageUrl: true,\n slug: true\n };\n \n // Allow client to specify additional fields\n if (fields) {\n const requestedFields = fields.split(',');\n requestedFields.forEach(field => {\n if (['description', 'price', 'category'].includes(field)) {\n selectFields[field] = true;\n }\n });\n }\n \n const products = await prisma.product.findMany({\n select: selectFields\n });\n \n res.json({ data: products });\n } catch (error) {\n res.status(500).json({ error: 'Fetch failed' });\n }\n});\n\n// Usage: /api/products?fields=price,category"})]}),(0,a.jsxs)("div",{className:"bg-purple-50 dark:bg-purple-950/20 border border-purple-200 dark:border-purple-800 p-4 rounded-lg mb-6",children:[(0,a.jsx)("h4",{className:"font-mono font-semibold text-purple-800 dark:text-purple-200 mb-2",children:"Pro Tip"}),(0,a.jsx)("p",{className:"text-purple-700 dark:text-purple-300 text-sm",children:'Before making a GET request, clearly define which fields are absolutely essential for the current view. Avoid the "fetch everything just in case" mentalityâit can reduce response times by up to 70%.'})]}),(0,a.jsx)("div",{className:"text-center",children:(0,a.jsxs)(o,{size:"lg",children:[(0,a.jsx)(g.A,{className:"h-4 w-4"}),"Get the Full Book"]})})]})]})}),ei=()=>(0,a.jsx)("section",{className:"container mx-auto px-4 py-20 bg-muted/30",children:(0,a.jsxs)(s.P.div,{initial:"initial",whileInView:"animate",viewport:{once:!0},variants:en,className:"max-w-4xl mx-auto",children:[(0,a.jsx)(s.P.h2,{variants:ea,className:"font-mono text-3xl font-bold mb-8",children:"Chapter 4: Safe Delete Strategy (SDS)"}),(0,a.jsxs)(s.P.div,{variants:ea,children:[(0,a.jsx)("p",{className:"text-muted-foreground mb-6 leading-relaxed",children:"The Prudence of Permanent Removal. The Safe Delete Strategy (SDS) principle emphasizes a cautious and intelligent approach to data deletion, prioritizing data integrity and user experience. This principle advocates for implementing soft deletes and checking resource dependencies before any permanent removal to prevent orphaned records and maintain system consistency."}),(0,a.jsxs)("div",{className:"bg-background p-6 rounded-lg mb-6 border",children:[(0,a.jsx)("h4",{className:"font-mono font-semibold mb-3",children:"Code Example: SDS with Prisma - Safe Delete Implementation"}),(0,a.jsx)(et,{language:"javascript",collapsible:!0,children:"// Prisma
1schema with soft delete support\nmodel Product {\n id String @id @default(cuid())\n name String\n deletedAt DateTime?\n orders Order[] // Relationship to check dependencies\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nmodel Order {\n id String @id @default(cuid())\n productId String\n product Product @relation(fields: [productId], references: [id])\n status String\n}\n\n// Safe delete endpoint with dependency checking\napp.delete('/api/products/:id', async (req, res) => {\n try {\n const { id } = req.params;\n \n // Check for dependencies first\n const activeOrders = await prisma.order.count({\n where: {\n productId: id,\n status: { in: ['pending', 'processing', 'shipped'] }\n }\n });\n \n if (activeOrders > 0) {\n return res.status(409).json({\n error: 'Cannot delete product with active orders',\n suggestion: 'Consider deactivating instead',\n activeOrdersCount: activeOrders\n });\n }\n \n // Perform soft delete\n const deletedProduct = await prisma.product.update({\n where: { id },\n data: { deletedAt: new Date() }\n });\n \n res.json({ \n message: 'Product safely deleted',\n id: deletedProduct.id \n });\n } catch (error) {\n if (error.code === 'P2025') {\n return res.status(404).json({ error: 'Product not found' });\n }\n res.status(500).json({ error: 'Delete operation failed' });\n }\n});\n\n// Query helper to exclude soft-deleted records\nconst getActiveProducts = () => prisma.product.findMany({\n where: { deletedAt: null }\n});"})]}),(0,a.jsxs)("div",{className:"bg-orange-50 dark:bg-orange-950/20 border border-orange-200 dark:border-orange-800 p-4 rounded-lg mb-6",children:[(0,a.jsx)("h4",{className:"font-mono font-semibold text-orange-800 dark:text-orange-200 mb-2",children:"Pro Tip"}),(0,a.jsx)("p",{className:"text-orange-700 dark:text-orange-300 text-sm",children:"Implement dependency checks before deletion and inform users clearly when deletion cannot proceed. Soft deletes provide a safety net for data recovery and maintain audit trails for compliance."})]}),(0,a.jsx)("div",{className:"text-center",children:(0,a.jsxs)(o,{size:"lg",children:[(0,a.jsx)(g.A,{className:"h-4 w-4"}),"Get the Full Book"]})})]})]})}),el=()=>(0,a.jsx)("section",{className:"container mx-auto px-4 py-16 bg-gradient-to-r from-blue-50 to-indigo-50 dark:from-blue-950/20 dark:to-indigo-950/20",children:(0,a.jsx)(s.P.div,{initial:"initial",whileInView:"animate",viewport:{once:!0},variants:en,className:"max-w-3xl mx-auto text-center",children:(0,a.jsxs)(s.P.div,{variants:ea,className:"mb-8",children:[(0,a.jsx)("h3",{className:"font-mono text-2xl font-bold mb-4",children:"Enjoying These API Optimization Principles?"}),(0,a.jsxs)("p",{className:"text-muted-foreground text-lg mb-6",children:["This book contains"," ",(0,a.jsx)("span",{className:"font-semibold text-foreground",children:"9 comprehensive chapters"})," ","covering everything you need to build lightning-fast, secure, and scalable APIs."]}),(0,a.jsx)("p",{className:"text-muted-foreground mb-8",children:"Get the complete guide with detailed implementations, advanced techniques, and real-world case studies that will transform how you build APIs."}),(0,a.jsxs)(o,{size:"lg",className:"bg-blue-600 hover:bg-blue-700",children:[(0,a.jsx)(g.A,{className:"h-5 w-5 mr-2"}),"Get the Full Book Now"]})]})})}),ed=()=>(0,a.jsx)("section",{className:"container mx-auto px-4 py-20",children:(0,a.jsxs)(s.P.div,{initial:"initial",whileInView:"animate",viewport:{once:!0},variants:en,className:"max-w-4xl mx-auto",children:[(0,a.jsx)(s.P.div,{variants:ea,className:"mb-8",children:(0,a.jsx)("div",{className:"inline-block bg-gradient-to-r from-amber-100 to-orange-100 dark:from-amber-900/20 dark:to-orange-900/20 px-4 py-2 rounded-full mb-4",children:(0,a.jsx)("span",{className:"text-amber-800 dark:text-amber-200 font-mono text-sm font-semibold",children:"BONUS CHAPTER"})})}),(0,a.jsx)(s.P.h2,{variants:ea,className:"font-mono text-3xl font-bold mb-8",children:"Chapter 9: Endpoint Guardian Protocol (EGP)"}),(0,a.jsxs)(s.P.div,{variants:ea,children:[(0,a.jsx)("p",{className:"text-muted-foreground mb-6 leading-relaxed",children:"The Shield of API Security. Most developers focu
1s intensely on building functional APIs but often overlook the critical aspect of endpoint protection. The Endpoint Guardian Protocol (EGP) principle addresses the dangerous reality that unprotected APIs are vulnerable to unauthorized access, data breaches, and resource abuse. This principle emphasizes that every API endpoint must have a protective layer to ensure only authorized users can access your valuable resources."}),(0,a.jsx)("p",{className:"text-muted-foreground mb-8 leading-relaxed",children:"An unprotected API is like leaving your house door wide openâanyone can walk in and take what they want. Beyond security risks, unprotected endpoints can lead to unexpected costs from unauthorized usage, performance degradation from abuse, and potential legal issues from data exposure. EGP provides a comprehensive approach to API security that should be implemented from day one, not as an afterthought."}),(0,a.jsxs)("div",{className:"bg-muted p-6 rounded-lg mb-6",children:[(0,a.jsx)("h4",{className:"font-mono font-semibold mb-3",children:"Code Example: EGP with Prisma - API Key Authentication"}),(0,a.jsx)(et,{language:"javascript",collapsible:!0,children:"// Prisma schema for API key management\nmodel ApiKey {\n id String @id @default(cuid())\n key String @unique\n name String\n userId String\n user User @relation(fields: [userId], references: [id])\n isActive Boolean @default(true)\n rateLimit Int @default(1000) // requests per hour\n usageCount Int @default(0)\n lastUsed DateTime?\n createdAt DateTime @default(now())\n expiresAt DateTime?\n}\n\n// Middleware for API key validation\nconst validateApiKey = async (req, res, next) => {\n try {\n const apiKey = req.headers['x-api-key'];\n \n if (!apiKey) {\n return res.status(401).json({ \n error: 'API key required',\n message: 'Include X-API-Key header with your request'\n });\n }\n \n const keyRecord = await prisma.apiKey.findUnique({\n where: { key: apiKey },\n include: { user: true }\n });\n \n if (!keyRecord || !keyRecord.isActive) {\n return res.status(401).json({ \n error: 'Invalid or inactive API key' \n });\n }\n \n // Check expiration\n if (keyRecord.expiresAt && keyRecord.expiresAt < new Date()) {\n return res.status(401).json({ \n error: 'API key has expired' \n });\n }\n \n // Rate limiting check\n const oneHourAgo = new Date(Date.now() - 60 * 60 * 1000);\n const recentUsage = await prisma.apiKey.findFirst({\n where: {\n id: keyRecord.id,\n lastUsed: { gte: oneHourAgo }\n }\n });\n \n if (recentUsage && recentUsage.usageCount >= keyRecord.rateLimit) {\n return res.status(429).json({ \n error: 'Rate limit exceeded',\n resetTime: new Date(Date.now() + 60 * 60 * 1000)\n });\n }\n \n // Update usage tracking\n await prisma.apiKey.update({\n where: { id: keyRecord.id },\n data: {\n usageCount: { increment: 1 },\n lastUsed: new Date()\n }\n });\n \n req.user = keyRecord.user;\n req.apiKey = keyRecord;\n next();\n } catch (error) {\n res.status(500).json({ error: 'Authentication failed' });\n }\n};\n\n// Protected endpoint implementation\napp.get('/api/products', validateApiKey, async (req, res) => {\n try {\n const products = await prisma.product.findMany({\n where: { deletedAt: null },\n select: {\n id: true,\n name: true,\n price: true,\n category: true\n }\n });\n \n res.json({ \n data: products,\n meta: {\n apiKeyUsage: req.apiKey.usageCount,\n rateLimit: req.apiKey.rateLimit\n }\n });\n } catch (error) {\n res.status(500).json({ error: 'Failed to fetch products' });\n }\n});"})]}),(0,a.jsxs)("div",{className:"bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-800 p-4 rounded-lg mb-6",children:[(0,a.jsx)("h4",{className:"font-mono font-semibold text-red-800 dark:text-red-200 mb-2",children:"Pro Tip"}),(0,a.jsx)("p",{className:"text-red-700 dark:text-red-300 text-sm",children:"Never deploy an API to production without proper authentication. Implement rate limiting, request logging, and regular security audits. Consider using HTTPS-only, CORS policies, and input validation as additional security layers."})]}),(0,a.jsx)("div",{className:"text-center",children:(0,a.jsxs)(o,{size:"lg",children:[(0,a.jsx)(g.A,{className:"h-4 w-4"}),"Get the Full Book"]})})]})]})}),ec=()=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(es,{}),(0,a.jsx)(er,{}),(0,a.jsx)(eo,{}),(0,a.jsx)(ei,{}),(0,a.jsx)(el,{}),(0,a.jsx)(ed,{})]}),em={initial:{opacity:0,y:60}
1,animate:{opacity:1,y:0},transition:{duration:.6}},eu={animate:{transition:{staggerChildren:.1}}};function ep(){let[e,t]=(0,i.useState)(!1),n=(0,i.useRef)(null);return(0,a.jsxs)("div",{className:"min-h-screen bg-background grid-bg dark:grid-bg relative",children:[(0,a.jsx)("section",{className:"container mx-auto px-4 py-20",children:(0,a.jsxs)(s.P.div,{className:"text-center max-w-4xl mx-auto",initial:"initial",animate:"animate",variants:eu,children:[(0,a.jsxs)(s.P.div,{variants:em,className:"mb-6",children:[(0,a.jsxs)(x,{variant:"secondary",className:"mb-4",children:[r.pages," Pages ⢠Digital Edition"]}),(0,a.jsx)("h1",{className:"font-mono text-4xl md:text-6xl font-bold mb-6 leading-tight",children:"The Ultimate guide to Building Blazing Fast APIs"}),(0,a.jsx)("h2",{className:"font-mono text-2xl md:text-3xl font-semibold text-muted-foreground mb-8",children:"API Optimization Handbook"})]}),(0,a.jsx)(s.P.p,{variants:em,className:"text-lg text-muted-foreground mb-8 max-w-2xl mx-auto leading-relaxed",children:"A Developer's Guide to High-Performance API Design and Implementation. Transform your backend development with practical strategies and actionable best practices."}),(0,a.jsxs)(s.P.div,{variants:em,className:"mb-12",children:[(0,a.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:"By MUKE JOHNBPATIST aka JB WEB DEVELOPER"}),(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-4 justify-center",children:[(0,a.jsxs)(o,{size:"lg",children:[(0,a.jsx)(g.A,{className:"h-4 w-4"}),"Get the Full Book"]}),(0,a.jsx)(o,{asChild:!0,href:"#chapters",variant:"outline",size:"lg",children:"Preview Chapters"})]})]})]})}),(0,a.jsx)("section",{className:"container mx-auto px-4 py-20 bg-muted/30",children:(0,a.jsxs)(s.P.div,{initial:"initial",whileInView:"animate",viewport:{once:!0},variants:eu,children:[(0,a.jsx)(s.P.h2,{variants:em,className:"font-mono text-3xl font-bold text-center mb-12",children:"Interactive 3D Preview"}),(0,a.jsx)("div",{className:"max-w-6xl mx-auto",children:(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-12 items-center",children:[(0,a.jsxs)(s.P.div,{variants:em,className:"order-2 md:order-1",children:[(0,a.jsx)("div",{className:"h-[600px] w-full rounded-lg overflow-hidden ",children:(0,a.jsx)(D,{params:{scale:[24,24,24],position:[0,-1,0],rotation:[.2,.3,0],cameraPosition:[0,0,15],cameraFov:45},materialProps:{color:"#ffffff",metalness:.4,roughness:1,emissive:"#000000",emissiveIntensity:0,texture:null,offsetX:0,offsetY:0},meshRef:n,onReady:t,bookIndex:0})}),(0,a.jsx)("p",{className:"text-center text-muted-foreground mt-4 text-sm",children:"Drag to rotate ⢠Experience the handbook in 3D"})]}),(0,a.jsx)(s.P.div,{variants:em,className:"order-1 md:order-2",children:(0,a.jsxs)("div",{className:"space-y-6",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)(x,{variant:"secondary",className:"mb-4",children:["Digital Edition ⢠",r.pages," Pages"]}),(0,a.jsx)("h3",{className:"font-mono text-3xl md:text-4xl font-bold mb-4 leading-tight",children:"The Ultimate Guide to Building blazing fast APIs"}),(0,a.jsx)("h4",{className:"font-mono text-xl md:text-2xl font-semibold text-muted-foreground mb-6",children:"API Optimization Handbook"}),(0,a.jsxs)("div",{className:"flex items-center gap-4 mb-6",children:[(0,a.jsx)("span",{className:"text-3xl font-bold text-primary",children:"$10"}),(0,a.jsx)("span",{className:"text-sm text-muted-foreground",children:"One-time purchase"})]})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"Master the art of high-performance API development with insider strategies from a developer who has optimized APIs handling over 1 billion requests per month. Learn the psychology behind efficient backend architecture and the secrets to building systems that scale."}),(0,a.jsx)("p",{className:"text-muted-foreground leading-relaxed",children:"From understanding database optimization to implementing advanced caching strategies, this handbook reveals the proven techniques that transform ordinary backends into extraordinary performance powerhouses."})]}),(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3",children:[(0,a.jsxs)(o,{size:"lg",className:"flex-1",children:[(0,a.jsx)(g.A,{className:"h-4 w-4"}),"Buy the Book"]}),(0,a.jsx)(o,{variant:"outline",size:"lg",className:"flex-1",href:r.website,children:"Contact Author"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,a.jsx)("span",{children:"â 4.9/5 rating"}),(0,a.jsx)("span",{children:"â Instant Access"}),(0,a.jsx)("span",{children:"\uD83D\uDD04 Lifetime updates"})]})]})]})})]})})]})}),(0,a.jsx)("section",{className:"container mx-auto px-4 py-20",children:(0,a.jsxs)(s.P.div,{initial:"initial",whileInView:"animate",viewport:{once:!0},variants:eu,children:[(0,a.jsx)(s.P.h2,{variants:em,className:"font-mono text-3xl font-bold text-center mb-12",children:"What You'll Master"}),(0,a.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6 max-w-6xl mx-auto",children:[(0,a.jsx)(s.P.div,{variants:em,children:(0,a.jsx)(m,{className:"h-full p-6 hover:shadow-lg transition-shadow",children:(0,a.jsxs)(u,{className:"p-0",children:[(0,a.jsx)(f.A,{className:"h-8 w-8 mb-4 text-primary"}),(0,a.jsx)("h3",{className:"font-mono font-semibold mb-2",children:"API Architecture"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:"Design scalable API structures that handle millions of requests efficie
1ntly."}),(0,a.jsx)(o,{size:"sm",variant:"secondary",children:"Get the Full Book"})]})})}),(0,a.jsx)(s.P.div,{variants:em,children:(0,a.jsx)(m,{className:"h-full p-6 hover:shadow-lg transition-shadow md:col-span-2",children:(0,a.jsxs)(u,{className:"p-0",children:[(0,a.jsx)(b.A,{className:"h-8 w-8 mb-4 text-primary"}),(0,a.jsx)("h3",{className:"font-mono font-semibold mb-2",children:"Performance Optimization"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:"Advanced techniques for reducing latency and improving throughput."}),(0,a.jsxs)("div",{className:"bg-muted p-3 rounded text-xs font-mono mb-4",children:[(0,a.jsx)("span",{className:"text-blue-400",children:"const"})," optimizedQuery = ",(0,a.jsx)("span",{className:"text-green-400",children:"await"})," db.query(",(0,a.jsx)("br",{}),"\xa0\xa0",(0,a.jsx)("span",{className:"text-orange-400",children:"`SELECT * FROM users WHERE active = $1`"}),",",(0,a.jsx)("br",{}),"\xa0\xa0[",(0,a.jsx)("span",{className:"text-purple-400",children:"true"}),"]",(0,a.jsx)("br",{}),");"]}),(0,a.jsx)(o,{size:"sm",variant:"secondary",children:"Get the Full Book"})]})})}),(0,a.jsx)(s.P.div,{variants:em,children:(0,a.jsx)(m,{className:"h-full p-6 hover:shadow-lg transition-shadow md:col-span-2",children:(0,a.jsxs)(u,{className:"p-0",children:[(0,a.jsx)(v.A,{className:"h-8 w-8 mb-4 text-primary"}),(0,a.jsx)("h3",{className:"font-mono font-semibold mb-2",children:"Database Strategies"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:"Master indexing, query optimization, and connection pooling for peak performance."}),(0,a.jsx)(o,{size:"sm",variant:"secondary",children:"Get the Full Book"})]})})}),(0,a.jsx)(s.P.div,{variants:em,children:(0,a.jsx)(m,{className:"h-full p-6 hover:shadow-lg transition-shadow",children:(0,a.jsxs)(u,{className:"p-0",children:[(0,a.jsx)(j.A,{className:"h-8 w-8 mb-4 text-primary"}),(0,a.jsx)("h3",{className:"font-mono font-semibold mb-2",children:"Caching"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:"Implement Redis, CDN, and application-level caching strategies."}),(0,a.jsx)(o,{size:"sm",variant:"secondary",children:"Get the Full Book"})]})})}),(0,a.jsx)(s.P.div,{variants:em,children:(0,a.jsx)(m,{className:"h-full p-6 hover:shadow-lg transition-shadow",children:(0,a.jsxs)(u,{className:"p-0",children:[(0,a.jsx)(y.A,{className:"h-8 w-8 mb-4 text-primary"}),(0,a.jsx)("h3",{className:"font-mono font-semibold mb-2",children:"Security"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:"Secure your APIs without compromising performance."}),(0,a.jsx)(o,{size:"sm",variant:"secondary",children:"Get the Full Book"})]})})}),(0,a.jsx)(s.P.div,{variants:em,children:(0,a.jsx)(m,{className:"h-full p-6 hover:shadow-lg transition-shadow",children:(0,a.jsxs)(u,{className:"p-0",children:[(0,a.jsx)(g.A,{className:"h-8 w-8 mb-4 text-primary"}),(0,a.jsx)("h3",{className:"font-mono font-semibold mb-2",children:"Real Examples"}),(0,a.jsx)("p",{className:"text-sm text-muted-foreground mb-4",children:"Production-ready code samples and case studies."}),(0,a.jsx)(o,{size:"sm",variant:"secondary",children:"Get the Full Book"})]})})})]})]})}),(0,a.jsx)("div",{id:"chapters",children:(0,a.jsx)(ec,{})}),(0,a.jsx)("section",{className:"container mx-auto px-4 py-20",children:(0,a.jsxs)(s.P.div,{initial:"initial",whileInView:"animate",viewport:{once:!0},variants:em,className:"text-center max-w-2xl mx-auto",children:[(0,a.jsx)("h2",{className:"font-mono text-3xl font-bold mb-6",children:"Ready to Build Blazing Fast APIs?"}),(0,a.jsx)("p",{className:"text-muted-foreground mb-8 leading-relaxed",children:"Join thousands of developers who have transformed their backend development with proven optimization techniques and best practices."}),(0,a.jsxs)(o,{size:"lg",children:[(0,a.jsx)(g.A,{className:"h-4 w-4"}),"Get the Complete Handbook"]}),(0,a.jsxs)("p",{className:"text-sm text-muted-foreground mt-4",children:[r.pages," pages ⢠Instant download ⢠Lifetime updates"]})]})}),(0,a.jsx)("section",{className:"container mx-auto px-4 py-20",children:(0,a.jsxs)(s.P.div,{initial:"initial",whileInView:"animate",viewport:{once:!0},variants:eu,children:[(0,a.jsx)(s.P.h2,{variants:em,className:"font-mono text-3xl font-bold text-center mb-12",children:"Meet the Author"}),(0,a.jsx)("div",{className:"max-w-6xl mx-auto",children:(0,a.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-12 items-center",children:[(0,a.jsxs)(s.P.div,{variants:em,className:"text-center lg:text-left",children:[(0,a.jsxs)("div",{className:"relative inline-block mb-6",children:[(0,a.jsx)("img",{src:"/jb.png",alt:"MUKE JOHNBPATIST",className:"w-64 h-64 roun
1ded-full object-cover mx-auto lg:mx-0 border-4 border-primary/20"}),(0,a.jsx)("div",{className:"absolute -bottom-2 -right-2 bg-primary text-primary-foreground rounded-full p-2",children:(0,a.jsx)(f.A,{className:"h-6 w-6"})})]}),(0,a.jsx)("h3",{className:"font-mono text-2xl font-bold mb-2",children:"MUKE JOHNBPATIST"}),(0,a.jsx)("p",{className:"text-lg text-muted-foreground mb-4",children:"JB WEB DEVELOPER"}),(0,a.jsxs)("div",{className:"flex justify-center lg:justify-start gap-4 mb-6",children:[(0,a.jsxs)(o,{variant:"outline",size:"sm",asChild:!0,href:r.website,target:"_blank",rel:"noopener noreferrer",children:[(0,a.jsx)(N.A,{className:"h-4 w-4"}),"Website"]}),(0,a.jsxs)(o,{variant:"outline",size:"sm",asChild:!0,href:r.linkedin,target:"_blank",rel:"noopener noreferrer",children:[(0,a.jsx)(w.A,{className:"h-4 w-4"}),"LinkedIn"]}),(0,a.jsxs)(o,{variant:"outline",size:"sm",asChild:!0,href:r.youtube,target:"_blank",rel:"noopener noreferrer",children:[(0,a.jsx)(P.A,{className:"h-4 w-4"}),"YouTube"]})]})]}),(0,a.jsxs)(s.P.div,{variants:em,children:[(0,a.jsxs)("div",{className:"bg-muted p-6 rounded-lg border",children:[(0,a.jsx)("h4",{className:"font-mono font-semibold mb-4 text-primary",children:"// Author Bio"}),(0,a.jsx)("pre",{className:"text-sm font-mono overflow-x-auto leading-relaxed",children:(0,a.jsx)(et,{language:"javascript",collapsible:!1,children:'const author = {\n name: "MUKE JOHNBPATIST",\n alias: "JB WEB DEVELOPER",\n experience: "5+ years",\n specialization: [\n "Backend Architecture",\n "API Optimization",\n "Database Performance",\n "Scalable Systems"\n ],\n achievements: {\n apis_optimized: "500+",\n performance_improvements: "up to 90%",\n companies_helped: "50+",\n students_taught: "10,000+"\n },\n mission: "Helping developers build blazing fast backends",\n philosophy: "Performance is not a feature, it\'s a requirement"\n};\n\n// Fun fact: JB has optimized APIs that handle\n// over 1 million requests per month! \uD83D\uDE80'})})]}),(0,a.jsxs)("div",{className:"mt-6 p-4 bg-blue-50 dark:bg-blue-950/20 border border-blue-200 dark:border-blue-800 rounded-lg",children:[(0,a.jsx)("h4",{className:"font-mono font-semibold text-blue-800 dark:text-blue-200 mb-2",children:"\uD83D\uDCA1 Pro Tip from JB"}),(0,a.jsx)("p",{className:"text-blue-700 dark:text-blue-300 text-sm",children:'"The best optimization is the one your users never notice - because everything just works perfectly. This handbook contains every technique I\'ve learned from optimizing APIs at scale."'})]}),(0,a.jsx)("div",{className:"text-center mt-8",children:(0,a.jsxs)(o,{size:"lg",children:[(0,a.jsx)(g.A,{className:"h-4 w-4"}),"Get the Full Book"]})})]})]})})]})})]})}}},e=>{var t=t=>e(e.s=t);e.O(0,[421,0,65,359,614,162,358],()=>t(5594)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.