Files
ravixalgorithmandClaude Opus 5.5 0aadaaa4db feat(site): public landing page, marketing pages and sponsors
- Landing at / (app moved to /dashboard) with a live NYSE session dial and the
  real product preview; About, Help, Architecture and Terms made public and rebuilt.
- /sponsor page with monthly tiers, one-time and custom options, prefilled GitHub
  Sponsors checkout links, and a sponsors band (open slots, previous sponsors) on
  every public page. Siray moved to previous sponsors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-25 15:28:19 +05:30

20 lines
789 B
TypeScript

import { cache } from "react";
// Real repo numbers for the public site, refreshed daily. Null hides the stat instead of guessing.
export const getRepoStats = cache(async () => {
try {
const res = await fetch('https://api.github.com/repos/Open-Dev-Society/OpenStock', {
next: { revalidate: 86400 },
signal: AbortSignal.timeout(4000),
});
if (!res.ok) return null;
const repo = await res.json();
return { stars: repo.stargazers_count as number, forks: repo.forks_count as number, license: repo.license?.spdx_id as string | undefined };
} catch {
return null;
}
});
export const formatCount = (n: number) =>
new Intl.NumberFormat('en-US', { notation: 'compact', maximumFractionDigits: 1 }).format(n);