Skip to content

Latest commit

 

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Weight2View — a 3D scene comparing a calculated volume of rice against a water bottle

Weight2View

"2 kg of rice" means nothing until you can see it.
Type a weight, and watch it turn into a real 3D shape — sized against things you already know.

FastAPI React PostgreSQL Three.js Docker Telegram


The idea

Humans are terrible at imagining weight. Someone tells you a shipment is "80 kg of packing peanuts" or a recipe needs "300 g of flour," and... you just nod. The number doesn't mean anything until it's in front of you.

Weight2View closes that gap. Search for an item, type an amount, and it renders an actual-scale 3D model of that volume — then drops it next to something familiar (a shoebox, a water bottle, a car) so the size finally clicks. Rotate it, compare it against several reference objects at once, and see real relative scale, not a cartoon approximation.

See it in action

Demo: searching for rice, entering an amount, and watching the 3D comparison render

(Search → amount → visualize → compare, all in one flow.)

A tour

Homepage with item search and fuzzy suggestions

Type-ahead search with fuzzy matching and aliases

3D scene comparing a calculated item against multiple reference objects at true relative scale

Compare against multiple references, at true relative scale

Admin dashboard showing visit and visualization statistics

A real dashboard — visits, top items, activity feed

Telegram group receiving live notifications for visits, visualizations, and backups

Live notifications land straight in your Telegram group

What it does

  • 🔍 Smart search — fuzzy matching + aliases, so "flour" finds "all-purpose flour" without a perfect match
  • ⚖️ Three ways to measure — density, bulk density, or unit-count, whichever actually fits the item (a brick of gold and a bucket of rice don't work the same way)
  • 🧊 Real 3D, real scale — every object in the scene is rendered at true relative size, down to millimeter precision, never faked for visual convenience
  • 🎯 A reference picker with taste — the "compare to" object isn't just whatever's closest in volume; familiarity and scale-fit are weighed in, so you get a comparison that actually helps
  • 🧩 Real 3D models, optional — drop in a .glb file for any reference object and it auto-fits to the right dimensions; falls back to a clean procedural shape if you don't
  • 🛠️ A full admin panel — manage items, references, and incoming requests without ever touching the database
  • 📊 Built-in analytics — visits, visualizations, and top-requested items, at a glance
  • 🔔 Telegram notifications — the moments that matter (a new visit, a visualization, an admin login) land straight in your own Telegram group, sorted into topics
  • 💾 Backups on autopilot — the database ships itself to Telegram on whatever schedule you set
  • 🚀 One command to deploy — Docker Compose, HTTPS included automatically, no cloud vendor required

Quick start

cp backend/.env.example backend/.env
# edit backend/.env — set ADMIN_EMAIL and ADMIN_PASSWORD to whatever you'd like,
# and optionally SEED_ON_STARTUP=true if you want the demo catalog pre-loaded

docker compose up --build

That's genuinely it — no separate migration step to remember, it runs automatically on startup (see backend/docker-entrypoint.sh).

Open http://localhost:5173 — and http://localhost:5173/admin for the admin panel, using the credentials you set above.

No cloud account, no API keys required to get started — Telegram notifications and backups are opt-in, configured entirely from inside the admin panel once you're up and running.

Documentation

The stuff above gets you running. For everything else — environment variables, running without Docker, production deployment with automatic HTTPS, configuring Telegram notifications and backups, running the test suite, and the full build history — see docs/TECHNICAL.md.

Tech stack

Backend: FastAPI · SQLAlchemy · PostgreSQL (pg_trgm for fuzzy search) · Alembic Frontend: React · TypeScript · Three.js (react-three-fiber) · Tailwind CSS · Vite Ops: Docker Compose · Caddy (automatic HTTPS) · Telegram Bot API

License

Add a license here — e.g. MIT — before making this repo public, if you haven't already picked one.

About

Turn a weight into a real-world sense of space. Search an item, enter an amount, and see the calculated volume rendered in 3D next to a familiar object ("about the size of a water bottle").

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages