Jeweler Facet
v1.0A jewellery studio and shop app in frosted sapphire glass, with a faceted gem you drag to turn while the price follows the metal.
Alamat halaman: /
Sudah termasuk
Yang Anda dapat- Terang dan gelapMemakai warna tema Anda
- Desktop, tablet, dan ponselLayar yang didukung
- Paket…
- Ukuran kode…
- Hemat baterai30 fps, diam saat tidak bergerak
- Berhenti saat tersembunyiDi luar layar atau tab lain
- Kurangi gerakanTenang bagi yang memintanya
Dicek di setiap perubahan
Keamanan dicek 3 Des- Pengecekan tipeTypeScript strict
- Lint dan formatESLint · Prettier
- Tes dan buildTangkapan layar terang dan gelap
- Audit keamananTanpa advisori tinggi atau kritis
- Usia paketSetiap versi sudah publik 7+ hari
- CPU saat diamDi bawah setengah core saat diam, ≤ 30 fps
Kode
jeweler-facetReact
- jeweler-facet.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.
- bench.tsxThe bench: a vault stone (or a piece from the cases) turning in the viewer; pick the kind of piece, the metal, the size and the accents, and the price follows live, then save it as a commission or reprice the piece.
- commissions.tsxCommissions: the board from brief to collection, cards dragged between stages (or moved with the keys), each opening on its own stage with deposits.
- customers.tsxCustomers: who buys and commissions, what they spent, their ring sizes finger by finger, and everything they have had made, bought or mended.
- gems.tsxGemstones: the vault ledger with carat, cut, colour, clarity and certificate, and each stone on its own stage turning in the viewer.
- home.tsxThe overview: the vault with its finest stone turning in glass, commissions in progress, repairs due back, and the till by month.
- pieces.tsxPieces: the finished jewellery in the cases, filtered by kind and status, each opening on its own stage with its metal, stones and price.
- repairs.tsxRepairs: what came in at the counter, what is on the bench and what is ready for pickup, each moved on a step at a time and rung up when collected.
- reports.tsxReports: the till by month, what sells by kind, commission value by stage and how fast repairs come back.
- settings.tsxSettings: Appearance (style, theme and language) and the shop's prices: metal rates, bench labour, markup, the deposit asked and how ring sizes are written.
- sign-in.tsxThe sign-in page (#/sign-in): the logo, a cut sapphire turning in the glass and the form on one card over the backdrop, without the drawer and top bar.
- 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 style (Glass or Solid) and the theme (System, Dark or Light), each choice shown as a small preview, and the language (System or one of locales/list.ts).
- catalog.tsxThe drawer's catalog: the list behind the page you are on (pieces in the cases, vault stones, commissions, repairs, customers, what is due), with a filter; a row opens on the detail stage.
- commission-detail.tsxOne commission on the stage: the stage track (press a step to move it), the brief and spec, the stone held for it, and the deposits taken against the quote.
- customer-detail.tsxOne customer on the stage: contact and notes, ring sizes finger by finger (stepped in half sizes and saved), and their history of purchases, commissions and repairs.
- piece-detail.tsxOne piece on the stage: its drawing, price and margin, what it is made of, and selling, repricing at the bench or deleting it (with Undo).
- sidebar.tsxThe frosted catalog drawer: the logo, search, the page tray with its liquid marker and, below it, the catalog of the page you are on (pieces, stones, commissions...), each row opening on the detail stage.
- 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.
- stock-forms.tsxThe stock forms: a finished piece for the cases and a loose stone for the vault, each new or edited.
- top-bar.tsxThe top bar over the stage: the menu button on narrow screens, where you are, the shop's day, search, the theme switch and the account menu; once the page scrolls a frosted strip fades in behind it.
- work-forms.tsxThe work and people forms: a commission (also filled in from the bench), a repair taken in at the counter, and a customer.
- partsWhat several sections share.
- buildWhat several sections share.
- cardsWhat several sections share.
- text.tsThe text card style: cards fade in while titles, labels and numbers (data-build="text") slide up from behind a mask; numbers show their final text.
- rowsWhat several sections share.
- turn.tsThe turn row motion: each row on screen swings in from behind, hinged on its left edge, from faint (its free edge never comes forward, so it never widens the page).
- 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: a drawn mesh of deep sapphire clouds behind the glass with one small warm glint, dusky in dark and near-white pastel in light, drifting very slowly. With followBackground it paints your background instead.
- charts.tsxThe charts: rounded pill bars and a glowing line, each plotted in a recessed glass well, a donut for shares and a small sparkline. The current bar or point is in the champagne accent.
- 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.
- drag-lanes.tsDrag cards between ordered lanes (the commission stages): mouse and pen at once, touch after a short press (a swipe still scrolls), the lifted copy kept under the grab point, the others sliding aside (FLIP), the page and the board scrolling near their edges, Escape to cancel, and a keyboard path (Space lifts, arrows move, Space drops).
- field.tsxA labeled form field (a text input or a select) with its error line under it, tied together for screen readers.
- form.tsxA form in a dialog: checks its fields itself (no browser bubbles), shows each problem under its field and moves the focus to the first, then saves, closes and refreshes every page.
- 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.
- gem-mesh.tsThe gem viewer's 3D stone: a faceted mesh for each cut (a brilliant for round, oval, cushion and pear, a step cut for emerald), turned, lit facet by facet and drawn on a canvas.
- gem-setting.tsThe ring's setting for the gem viewer: the band under the stone and four claws seated evenly round the girdle, each split into the half behind the stone and the half in front.
- gem-viewer.tsxThe gem viewer: a faceted stone drawn on a canvas that you drag (or turn with the arrow keys) to spin; light glints slide across its facets as it turns, and it glides to rest. Still at rest; it redraws only while it moves.
- 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).
- liquid-marker.tsThe selected marker that moves like a drop of liquid: shared by the page tray in the drawer and every tab row.
- 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.
- piece-art.tsxA drawn picture of a piece: a ring, a pendant on its chain, a pair of earrings or a bracelet, in its metal with its main stone, each lit from the top left.
- price.tsHow a piece is priced: the metal's weight at today's rate plus the bench labour, times the shop's markup, plus the stone. The bench and the commission form both use it.
- 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.
- shop.tsxThe shop's data for a page: loads it once through the fake API (one answer every page reads), shows the loading and error states, and the few sums several pages share.
- 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.
- ui.tsxThe small pieces every page shares: the glass panel, the liquid tab row, status chips, card headings and the confirm dialog.
- 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.
- seed-people.tsThe pretend people and work: customers with their ring sizes, custom commissions from brief to collection, and repairs on the bench.
- seed-sales.tsThe pretend till: a year of sales up to the demo's today, made from a fixed seed so every visit shows the same numbers.
- seed-stock.tsThe pretend stock: finished pieces in the cases and loose gemstones in the vault, as a small jewellery studio and shop would hold them.
- 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}).
jeweler-facet.tsx
The page: the sections in order.
Memuat…
- Cocok untuk
- A bench jeweller's studio and shop: stock, loose stones, custom commissions, repairs, customers' ring sizes and the till.
- Cara kerjanya
- Pick a list in the frosted drawer and it opens on the stage; at the bench a cut gem turns as you drag and the price updates live.
- Cara memakai
- Edit words in locales/ and colors in theme.ts, and swap the bodies in data/api.ts for calls to your backend.