Vendors Heath
v1.0A minimal SaaS procurement desk for a manufacturer: vendors, purchase requests with approval chains, POs you receive, quarterly vendor scores and spend, in warm greys with one heather accent.
पेज का पता: /
पहले से मौजूद
आपको क्या मिलता है- लाइट और डार्कआपकी थीम के रंग इस्तेमाल करता है
- डेस्कटॉप, टैबलेट, और फ़ोनजिन स्क्रीन के लिए यह बना है
- पैकेज…
- कोड साइज़…
- बैटरी पर हल्का30 fps, स्थिर होने पर निष्क्रिय
- छिपने पर रुक जाता हैस्क्रीन से बाहर या दूसरा टैब
- कम मोशनमाँगने वालों के लिए शांत
हर बदलाव पर जाँचा गया
सिक्योरिटी जाँच 3 दिस॰- टाइप जाँचTypeScript स्ट्रिक्ट
- लिंट और फ़ॉर्मैटESLint · Prettier
- टेस्ट और बिल्डलाइट और डार्क स्क्रीनशॉट
- सिक्योरिटी ऑडिटकोई हाई या क्रिटिकल एडवाइज़री नहीं
- पैकेज की उम्रहर वर्शन 7+ दिन से पब्लिक
- आइडल CPUरुके रहने पर आधे कोर से कम, ≤ 30 fps
कोड
vendors-heathReact
- vendors-heath.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.
- overview.tsxThe overview: a greeting with the day's load, the KPI strip, the approvals waiting on you beside this quarter's spend by category, then the latest purchase orders beside the live feed.
- pos.tsxPurchase orders: tabs for the ones still on the way, late, received and closed, search, and a table with each order's due date, how much has arrived and its amount; an open order can log its delivery from the row.
- requests.tsxPurchase requests: tabs by where each stands (waiting on you first), search, the list grouped by the day it came in with each one's approval chain, and on your own tab a pick of rows to approve or reject together.
- reviews.tsxQuarterly vendor reviews: a switch between the last four quarters, a line with how many are scored and the average, then the scorecards (quality, delivery, price and service out of 5, the overall and its change on the quarter before, the quarter's spend). The current quarter also lists the vendors still to score; a past quarter's unscored ones are gone.
- settings.tsxSettings in three tabs (?tab=): the vendor categories, the approval limits, and Appearance (theme and language).
- 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.
- spend.tsxSpend: twelve months of ordered spend as bars (this month in the primary), then this quarter's or the last twelve months' spend by category and the eight vendors you spend most with.
- vendors.tsxVendors: every supplier in one table with its category, risk, the three documents, this year's spend and latest score; tabs for the ones onboarding or with papers to chase, filters for category and risk, sorting by name, spend or score.
- 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).
- approvals.tsxThe Overview's approvals waiting on you, oldest first: each request with its approval chain. Approve lights your avatar in the chain, the row folds away, and when yours was the last signature its new PO glides from where the row stood into Recent orders; Reject asks why.
- 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.
- feed.tsxThe live feed: who did what, newest first, then the request, order or vendor it was about muted under it (its id and amount too); a row that arrives (a manager signing, a delivery at the dock, your approval) 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.
- po-rows.tsxA short list of purchase orders (Overview's recent orders, a vendor's orders): the number, what and from whom, how much has arrived and the amount. Rows glide when the list re-sorts, and an order made from a request you just approved glides in from where that request stood.
- po-sheet.tsxA purchase order in the side sheet (?po=PO-7438): where it stands, what has arrived line by line, and what you can do (log a delivery, close a received order, cancel one nothing has arrived for). Logging a delivery opens a short dialog (?receive=PO-7438).
- reject-dialog.tsxTurning down a request (?reject=REQ-2466, from any approvals list or the request's sheet): a short reason the requester will read, then the request leaves your list.
- request-form.tsxThe request form in a dialog: a new purchase request (?new=request, the top bar's New request, ⌘K) or an edit of a pending one (?edit=REQ-2466). Its lines add up as you type, and the approvals it will need show under the total.
- request-sheet.tsxA purchase request in the side sheet (?request=REQ-2466): what it is and for whom, its lines and total, the approval chain as a timeline, and what you can do now (approve or reject when it waits on you, turn an approved one into a PO, edit or delete a pending one).
- score-dialog.tsxScoring a vendor for a quarter (?score=VND-1004&quarter=2026-Q4, from Reviews or the vendor's sheet): quality, delivery, price and service each 1 to 5 on a row of buttons, last quarter's score shown faint beside each, and a note.
- settings-categories.tsxSettings → Categories: each vendor category with its color (one of six) and name to change in place and how many vendors use it; one no vendor uses can be deleted, and a new one added at the end.
- settings-limits.tsxSettings → Approval limits: from which amount a request also needs procurement's signature and from which the finance director's, and whether the last signature issues the PO at once. Saving re-checks every request still waiting.
- sidebar.tsxThe sidebar: the workspace, search with the ⌘K shortcut, the pages in two groups with their counts (the same numbers the pages show, rolling with them) 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.
- top-bar.tsxThe top bar: the menu button on tablets, where you are, the live dot, search on narrow screens, the theme switch, New request (the app's one main action) and the account menu. It frosts only once the page scrolls under it.
- vendor-form.tsxThe vendor form in a dialog: a new vendor (?new=vendor, ⌘K New vendor, the Vendors page) or an edit (?vendorEdit=VND-1004). A new one starts onboarding with its documents missing.
- vendor-sheet.tsxA vendor in the side sheet (?vendor=VND-1004): who they are and what you spend with them, then tabs for their documents (each marked on file, expiring or missing), their orders and their quarterly scores. Edit, delete and a new request for them sit at the top.
- partsWhat several sections share.
- buildWhat several sections share.
- cardsWhat several sections share.
- sheen.tsThe sheen card style: cards rise, plus one soft light sweep across each card as it lands.
- rowsWhat several sections share.
- flip.tsThe flip row motion: each row on screen tilts up from its bottom edge, from faint.
- 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 Glass style's backdrop: what shows through the see-through panels, faded out in Solid; with followBackground it paints your background instead.
- charts.tsxThe two charts: share bars (spend by category or vendor, each bar its share of the biggest, the amount at the end) and month bars (twelve months of spend, the current month in the primary). Bars grow in on the page's build-in and slide to new values.
- command-palette.tsxThe command palette (⌘K or Ctrl K): type to find 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 (again whenever the list resizes), so a page scroll or a wider window never reads as a move. A row can also arrive from another list: handOff() leaves where it was, and the new row glides from there.
- 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).
- list-bits.tsxWhat the list pages share: the page head (title, a line under it, an action on the end), the status tabs as links with their counts and an underline that glides to the picked one, the search box, and the loading shape.
- 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 6 seconds the company does something (data/live.ts: a signature, a delivery, a new request) and every page reloads in place; every 30 the "2 min ago" times redraw. 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 request, order or vendor in the side sheet, and the dialogs (new or edited request, reject, log a delivery, new or edited vendor, score a vendor). Any page can open one by adding its query (?po=PO-7438).
- procure.tsxThe small pieces every procurement page shares: a category's dot and name, a request's stage and an order's status as a dot and a word, a vendor's risk and document marks, a person's initials, the approval chain of avatars that light up as each step signs, and which rows just arrived (they slide in).
- read.tsOne read of the fake API by its key, through useApi: useRead("overview"), useRead<"deal">(`deal:${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 request, an order, a vendor), 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 (?vendor=VND-1004&dtab=docs).
- 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.
- db.tsThe pretend database and every change to it: requests raised, signed, rejected and turned into POs, deliveries received, vendors and their documents, quarterly scores, categories and approval limits. Each change also writes the activity feed. data/api.ts calls these after its wait; data/live.ts calls them for the teammates.
- live.tsThe live demo: the rest of the company working while you watch. Each call is one thing that happens (a manager or the finance director signs, a teammate signs their step, a delivery arrives at the dock, a new request comes in) through the same database the pages read. Wire your backend's events here instead.
- now.tsThe demo's "now": today at 10:40 plus the real time since the app loaded, so the desk is busy at any hour; every seeded date is set from it. Wire your backend and use the real time.
- seed-vendors.tsThe pretend company behind the desk: a 500-person manufacturer's people (the procurement team of four, the department managers who approve first, the finance director and the requesters), its eight vendor categories, its 90 vendors and what each category is bought for. data/seed.ts builds the requests, POs and scores from these.
- seed.tsBuilds the pretend database from data/seed-vendors.ts: 90 vendors with their documents, a year of purchase requests that became POs (each month's spend on a smooth curve), the requests in flight today at every step of their chains, deliveries due and late, quarterly vendor scores and the recent activity. The same every load (a fixed random seed); dates are set from the demo's now.
- types.tsThe shapes of the pretend procurement data: people, vendor categories, vendors, purchase requests with their approval chains, purchase orders, quarterly vendor scores and the activity feed. A real backend returns the same shapes.
- views.tsWhat each page reads, worked out from the pretend database: request rows with their chains, PO rows with what arrived, vendors with spend and scores, the quarter's scorecards, spend by month, category and vendor, the Overview's numbers and the feed. Every count shown twice comes from the same function here.
- 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}).
vendors-heath.tsx
The page: the sections in order.
लोड हो रहा है…
- इनके लिए अच्छा
- Procurement teams who onboard vendors, approve purchase requests, track POs and deliveries, and score suppliers each quarter.
- यह कैसे काम करता है
- Approve a request: the approver avatars light up one by one and the request slides into Recent POs as a new purchase order.
- कैसे इस्तेमाल करें
- Edit words in content.ts and colors in theme.ts, and swap the bodies in data/api.ts for calls to your backend.