Catalog Basswood
v1.0A minimal SaaS data catalog for a marketplace's data team: search 900 tables, see owners, freshness and lineage that draws outward hop by hop, with live quality checks, a glossary and access requests, on birch neutrals with one indigo accent.
صفحے کا پتہ: /
پہلے سے شامل
آپ کو کیا ملتا ہے- لائٹ اور ڈارکآپ کی تھیم کے رنگ استعمال کرتا ہے
- ڈیسک ٹاپ، ٹیبلٹ، اور فونوہ اسکرینز جن کے لیے یہ بنایا گیا
- پیکجز…
- کوڈ کا سائز…
- بیٹری پر ہلکا30 fps، ساکن ہو تو رک جاتا ہے
- چھپنے پر رک جاتا ہےاسکرین سے باہر یا دوسرا ٹیب
- کم حرکتجو لوگ کہیں ان کے لیے پرسکون
ہر تبدیلی پر جانچ
سکیورٹی جانچ 3 دسمبر- ٹائپ چیکTypeScript strict
- لنٹ اور فارمیٹESLint · Prettier
- ٹیسٹ اور بلڈلائٹ اور ڈارک اسکرین شاٹس
- سکیورٹی آڈٹکوئی ہائی یا کریٹیکل ایڈوائزری نہیں
- پیکج کی عمرہر ورژن 7+ دن سے عوامی
- فارغ CPUآرام میں آدھے کور سے کم، ≤ 30 fps
کوڈ
catalog-basswoodReact
- catalog-basswood.tsxThe page: the sections in order.
- content.tsEvery word and number: brand, nav links, each section's copy and lists.
- theme.tsThe colors as CSS variables, and the shared class strings.
- README.mdHow to install it, and where to change the text, colors and form.
- pagesOne file per page: the sections it shows, in order.
- glossary.tsxGlossary: the words the business uses (GMV, Active seller) with what they mean, who owns each and the tables that hold it. Pick a term to read it, link a table, edit or delete it; add a new one.
- lineage.tsxLineage: where a table's data comes from and where it goes, as a graph around it (#/lineage/t-0042). Pick another table to centre on, add a link the catalog doesn't know yet, or pin a note to everything downstream.
- overview.tsxThe overview: a greeting with the day's state, the KPI strip, the tables loaded most recently (their timers count up), freshness by layer, the checks that fail and the live feed.
- quality.tsxQuality: every check on every table, failing first, with its last runs; a filter by result, Run now on each, and the run log where new results stream in as checks run.
- requests.tsxRequests: colleagues asking to read (or write) a table, oldest waiting first, with why and whether the table holds personal data. Approve or deny one, or pick several and approve them together; Undo in the toast. Decided ones keep who decided and when.
- search.tsxSearch: one big box that finds tables by name, description or tag, the columns whose name matches and the glossary terms, as you type. Before you type it offers a few searches and the most-viewed tables.
- settings.tsxThe settings page: Sources (what the catalog reads), Teams (who owns tables) and Appearance (theme and language), one tab at a time (?tab=teams).
- sign-in.tsxThe sign-in page (#/sign-in): the logo and the form on one card over the backdrop, without the sidebar and top bar.
- tables.tsxTables: every table in the warehouse, filtered by name, layer, domain, owner and state (stale, failing, undocumented, deprecated), sorted, a page at a time. Pick rows to give them an owner, a tag or deprecate them together.
- sectionsOne file per page section.
- account-menu.tsxThe account menu under the avatar in the top bar: who is signed in, Settings and Sign out; the arrow keys move through it, Escape, Tab or a click outside closes it.
- appearance.tsxSettings → Appearance: the theme (System, Dark or Light), each choice shown as a small preview, and the language (System or one of locales/list.ts).
- bottom-tabs.tsxThe phone's tab bar: the four pages used most, and More for the rest (the sidebar in a sheet). It sticks to the bottom of the screen under the page.
- check-sheet.tsxA quality check's sheet (?check=c-104): its last result, its last 14 runs, the run log, Run now, Mute, Edit and Delete; and the check form (?new=check&for=t-0042, ?editcheck=c-104).
- feed.tsxThe live feed: who did what, newest first, with the table it touched; a check result or a load that streams in slides in at the top.
- kpi-strip.tsxThe KPI strip: four numbers in one bordered box, each with its line under it and a sparkline or a progress bar; a changed number rolls to its new value and a sparkline grows a point.
- lineage-graph.tsxThe lineage graph: the table in the middle with its columns, what feeds it to the left and what it feeds to the right, two hops each way. Its edges draw outward hop by hop from the middle; hovering (or focusing) a column traces where that column flows, dimming the rest. A node re-centres the graph on its table.
- settings-lists.tsxSettings → Sources and Teams: the systems the catalog reads (sync one now, pause it, change how often, add or remove one) and the teams that own tables (rename, add, delete, move people between them).
- sidebar.tsxThe sidebar: the workspace, the big search box first (Enter opens the results, ⌘K the palette), the pages in two groups with their counts and a pill that glides to the current one, Settings, and the live strap with its pause.
- sign-in-form.tsxThe sign-in form: email and password with their errors under them, show or hide the password, keep me signed in, and the demo account to fill in; a wrong pair says so above the fields.
- table-form.tsxRegister a table (?new=table) or edit one (?edit=t-0042): its name and place for a new one; its description, owner, steward, tags and deprecation for any. Deleting one offers Undo.
- table-sheet.tsxA table's sheet over any page (?table=t-0042): what it is, who owns it and how fresh it is, its columns (describe one in place), what feeds it and what it feeds, its checks (run one now) and what happened to it.
- top-bar.tsxThe top bar: the menu button on narrow screens, where you are, the live dot, search, the theme switch, Register table and the account menu. It frosts only once the page scrolls under it.
- partsWhat several sections share.
- buildWhat several sections share.
- cardsWhat several sections share.
- odometer.tsxThe odometer card style: cards rise while every number rolls digit by digit to its value.
- rowsWhat several sections share.
- stack.tsThe stack row motion, a drawer: the rows on screen start stacked under the first and spread to their places together.
- core.tsxThe page's build-in: on first load and on every page switch the cards arrive in the app's card style and their contents build: bars grow, lines draw, rings fill, the list rows on screen ripple in in the app's row motion, numbers count. The two picks are wired in ./index.ts.
- index.tsThe app's two build-in picks, wired here and nowhere else: its card style (cards/) and its row motion (rows/). npm run new-app copies only the two it is given (--cards, --rows).
- appearance.tsHow the app looks right now: dark or light, Glass or Solid, from Settings → Appearance, the page around it and the Style setting.
- avatar.tsxA person's initials in a round badge, tinted with the primary.
- backdrop.tsxThe backdrop: Basswood is solid birch, so its own two soft lights stay hidden; with followBackground it paints your background behind the app instead.
- catalog.tsxThe small pieces every catalog page shares: a table's name, its layer chip, an owner's dot and initials, a check result's mark and history, the freshness timer that counts up, the table picker for forms, and which rows just arrived (they slide in).
- command-palette.tsxThe command palette (⌘K or Ctrl K): type to find a table, a page or an action, then Enter.
- dialog.tsxA centered modal dialog (a form, a confirm): rises in, plays its way out, Escape or a tap outside closes it, and the focus goes back where it was.
- field.tsxA labeled form field (a text input or a select) with its error line under it, tied together for screen readers.
- flip.tsFLIP for a list that re-sorts or filters: after each change every row that stayed glides from where it was to where it is now. Rows carry data-flip="<id>"; positions are measured inside the list, so a page scroll never reads as a move.
- format.tsHow numbers and dates are written: by Intl, the current language's way ("1,240", "1.240"; "Nov 19", "19 nov."). Add a helper here when a page needs money, times or a list.
- icons.tsxThe logo and the line icons, drawn on a 24-unit grid with round ends.
- language.tsThe app's language: the words every page reads (useWords), how dates and numbers are written (parts/format.ts) and the reading direction. Picked in Settings → Appearance (or System: the page's own language) and kept in this browser; English is built in, any other language loads only when it shows (locales/list.ts).
- live-clock.tsxOne shared clock for everything live: it ticks only while something on screen listens, the tab is visible and live isn't paused, and the bare button that pauses it. What a tick does (move the demo's time, bring in an event, reload) is the app's, passed to liveClock.
- live.tsThe app's one live clock: every second the freshness timers count up; every 6 seconds a pipeline loads a table or a check runs (data/live.ts) and every page reloads in place. It rests while nothing live is on screen, the tab is hidden or live is paused.
- moments.tsThe animations the sidebar, the sign-in card, menus, dialogs, the phone sheet and toasts play, timed by their moments in theme.ts.
- motion.tsMotion helpers: the reduced-motion check, live, and run-once-in-view.
- overlays.tsxEverything that opens over the page from the address: a table or a check in the side sheet, and the forms (register or edit a table, add or edit a check). Any page can open one by adding its query (?table=t-0042).
- read.tsOne read of the fake API by its key, through useApi: useRead("overview"), useRead<"table">(`table:${id}`). Each key keeps one load function, so a page that mounts again finds its answer.
- router.tsThe page switcher: reads the app's page from the address hash (#/settings, #/?status=open).
- scroll-to-view.tsScrolls an element into view moving only its own scroll container, never the page around it.
- select-box.tsxA native select dressed to match the app: no browser arrow, a drawn chevron instead.
- session.tsWhether someone is signed in: a first visit is signed in as the demo account; Sign out holds until the next sign-in, and a sign-in without Keep me signed in lasts only this tab.
- sheet.tsxThe phone sheet: a modal panel that springs in from the left with the sidebar; Escape, a tap outside or its close button slides it away.
- side-sheet.tsxThe detail sheet: a modal panel that slides in from the end edge over the page (a table, a check), with tabs whose underline glides to the one picked. Escape, a tap outside or its close button slides it away; the address keeps what it shows (?table=t-0042&ttab=columns).
- states.tsxThe data states every page shares: a calm skeleton while loading, an error with Try again, and an empty note with a way out.
- store.tsThe app-wide state several parts share: the theme mode and style (kept in the browser) and the toasts.
- ticker.tsxA number that counts up while its page builds in, and rolls to its new value whenever it changes.
- toasts.tsxThe toasts: short notes that confirm what just happened, at the bottom end.
- use-api.tsLoads data through the fake API with loading, error and retry, remembering each answer so a page you come back to shows at once.
- use-dialog.tsOpens and closes a native <dialog> as a modal; on close it plays its way out first (data-closing), so dialogs, sheets and the palette never vanish in one frame.
- dataThe pretend data and the fake API: swap it for your backend.
- account.tsThe demo account: who is signed in (the account menu shows them) and the email and password the sign-in page takes.
- api.tsThe fake API: every page loads and saves through these functions, so wiring a real backend happens here only.
- core.tsThe warehouse's core: about eighty tables that run the marketplace, from raw loads through staging and core models to marts and Looker dashboards, each with its columns, inputs (lineage), description and tags. seed-tables.ts adds the long tail around them.
- db.tsThe pretend database: every table, link, check, term, request, source and team, kept in memory for the visit, and the changes the API makes to it. A real backend replaces this file.
- live.tsWhat happens on its own while the catalog is open: a pipeline loads a table, a check runs and its result streams in. parts/live.ts calls liveEvent on its clock; a real backend would push these instead.
- now.tsThe demo's "now": today at 10:40 plus the real time since the app loaded, so today is busy at any hour; every seeded time is set from it. Wire your backend and use the real time.
- seed-org.tsThe pretend organisation around the catalog: Stallhouse, an online marketplace whose 12-person data team runs the warehouse. Its teams, people (plus colleagues who ask for access), sources, glossary terms and access requests.
- seed-tables.tsBuilds the catalog's 912 tables: the core (core.ts) plus the long tail a real warehouse grows (event tables, country marts, monthly snapshots, sandboxes, features, exports, archives, dashboards), their lineage links and the quality checks on them. Seeded, so every visit starts the same.
- types.tsThe shapes of the catalog's pretend data: tables and their columns, lineage links, quality checks and their runs, glossary terms, access requests, sources, teams, people and the activity feed.
- views.tsWhat each page reads: the pretend database turned into the rows, counts and graphs a page shows. The API (data/api.ts) answers with these.
- localesEvery word the app shows, one JSON file a language; list.ts names them.
- en.jsonOne language's words, with the keys of en.json.
- es.jsonOne language's words, with the keys of en.json.
- list.tsThe languages the app offers, in the picker's order: one JSON file each, en.json the source. To remove one, delete its file and its line; to add one, copy es.json, translate it and add a line. English is built in; the rest load only when picked. TypeScript checks each file has en.json's keys, scripts/check/check-locales.mjs the rest (no extra keys, plural forms, {slots}).
catalog-basswood.tsx
The page: the sections in order.
لوڈ ہو رہا ہے…
- کس کے لیے بہتر
- Data teams who need one place to find a table, see who owns it, how fresh it is, where its data flows and whether its checks pass.
- یہ کیسے کام کرتا ہے
- Open a table's lineage: its edges draw outward one hop at a time, and hovering a column traces its path through every table it reaches, while freshness timers count up and check results stream in.
- استعمال کا طریقہ
- Edit words in locales/ and content.ts and colors in theme.ts, and swap the bodies in data/api.ts for calls to your catalog's backend.