import { z } from 'zod'; import { FUNDING_RAISED } from '~/app/(marketing)/open/data'; import { MetricCard } from '~/app/(marketing)/open/metric-card'; import { SalaryBands } from '~/app/(marketing)/open/salary-bands'; import { BarMetric } from './bar-metrics'; import { CapTable } from './cap-table'; import { FundingRaised } from './funding-raised'; import { TeamMembers } from './team-members'; import { OpenPageTooltip } from './tooltip'; export const revalidate = 3600; const ZGithubStatsResponse = z.object({ stargazers_count: z.number(), forks_count: z.number(), open_issues: z.number(), }); const ZMergedPullRequestsResponse = z.object({ total_count: z.number(), }); const ZStargazersLiveResponse = z.record( z.object({ stars: z.number(), forks: z.number(), mergedPRs: z.number(), openIssues: z.number(), }), ); const ZEarlyAdoptersResponse = z.record( z.object({ id: z.number(), time: z.string().datetime(), earlyAdopters: z.number(), }), ); export type StargazersType = z.infer; export type EarlyAdoptersType = z.infer; export default async function OpenPage() { const { forks_count: forksCount, open_issues: openIssues, stargazers_count: stargazersCount, } = await fetch('https://api.github.com/repos/documenso/documenso', { headers: { accept: 'application/vnd.github.v3+json', }, }) .then(async (res) => res.json()) .then((res) => ZGithubStatsResponse.parse(res)); const { total_count: mergedPullRequests } = await fetch( 'https://api.github.com/search/issues?q=repo:documenso/documenso/+is:pr+merged:>=2010-01-01&page=0&per_page=1', { headers: { accept: 'application/vnd.github.v3+json', }, }, ) .then(async (res) => res.json()) .then((res) => ZMergedPullRequestsResponse.parse(res)); const STARGAZERS_DATA = await fetch('https://stargrazer-live.onrender.com/api/stats', { headers: { accept: 'application/json', }, }) .then(async (res) => res.json()) .then((res) => ZStargazersLiveResponse.parse(res)); const EARLY_ADOPTERS_DATA = await fetch('https://stargrazer-live.onrender.com/api/stats/stripe', { headers: { accept: 'application/json', }, }) .then(async (res) => res.json()) .then((res) => ZEarlyAdoptersResponse.parse(res)); return (

Open Startup

All our metrics, finances, and learnings are public. We believe in transparency and want to share our journey with you. You can read more about why here:{' '} Announcing Open Metrics

data={EARLY_ADOPTERS_DATA} metricKey="earlyAdopters" title="Early Adopters" label="Early Adopters" className="col-span-12 lg:col-span-6" extraInfo={} /> data={STARGAZERS_DATA} metricKey="stars" title="Github: Total Stars" label="Stars" className="col-span-12 lg:col-span-6" /> data={STARGAZERS_DATA} metricKey="mergedPRs" title="Github: Total Merged PRs" label="Merged PRs" chartHeight={300} className="col-span-12 lg:col-span-6" /> data={STARGAZERS_DATA} metricKey="forks" title="Github: Total Forks" label="Forks" chartHeight={300} className="col-span-12 lg:col-span-6" /> data={STARGAZERS_DATA} metricKey="openIssues" title="Github: Total Open Issues" label="Open Issues" chartHeight={300} className="col-span-12 lg:col-span-6" />

Where's the rest?

We're still working on getting all our metrics together. We'll update this page as soon as we have more to share.

); }