Put it on a kitchen scale and type in what the scale says. filahub subtracts the empty weight of the spool and of the drybox it lives in, and keeps the result — for every spool, every time.
翻译准备中
正在加载完整 README。 以下为已保存的摘录。
Web application for managing an inventory of 3D-printing material — filament,
resin and powder. Material lives in stores, one kind of material per store;
it sits in a container (spool, bag, bottle, pail, cartridge) and optionally
in a drybox, both with a stored tare weight. A weigh-in is a gross weight
typed in from a kitchen scale, and the remaining quantity is what is left after
the tare comes off. Between weigh-ins, a consumption is the grams a print used,
typed in from the slicer; it comes off the last weigh-in until the next one
replaces it.查看完整 README ↗Web application for managing an inventory of 3D-printing material — filament, resin and powder. Material lives in stores, one kind of material per store; it sits in a container (spool, bag, bottle, pail, cartridge) and optionally in a drybox, both with a stored tare weight. A weigh-in is a gross weight typed in from a kitchen scale, and the remaining quantity is what is left after the tare comes off. Between weigh-ins, a consumption is the grams a print used, typed in from the slicer; it comes off the last weigh-in until the next one replaces it. Short IDs for quick retrieval, a shared preset catalogue of manufacturers and containers, per-store sharing with friends, organizations for a stock several people work on, and login via Telegram or (optionally) Discord.
Stack: React + Vite + Tailwind (frontend) · Hono + tRPC (backend) · Drizzle ORM + PostgreSQL (database)
Product page · Live instance · Container images
/newbot, choose a name and username (e.g. YourFilahubBot)123456789:ABCdeFG…)/setdomain to
@BotFather, select your bot and enter your domain
(e.g. filahub.yourdomain.at – no https://, no path)/id → it replies with your Telegram user ID
(needed for the whitelist and the admin role)Note:
/idis a built-in feature of this app – once the bot is running, it replies to it with your ID.
cp .env.example .env
# fill in .env: APP_SECRET (e.g. `openssl rand -hex 32`), DATABASE_URL,
# TELEGRAM_BOT_TOKEN, TELEGRAM_BOT_USERNAME, TELEGRAM_ALLOWED_IDS, OWNER_TELEGRAM_ID
# and, if anyone but you will use it, the LEGAL_OPERATOR_* values
| Variable | Purpose |
|---|---|
APP_SECRET | Random secret for signing session tokens |
DATABASE_URL | PostgreSQL connection string |
TELEGRAM_BOT_TOKEN | Token from @BotFather |
TELEGRAM_BOT_USERNAME | Bot username without @ |
TELEGRAM_ALLOWED_IDS | Allowed Telegram IDs (comma-separated); empty = nobody, unless opened below |
TELEGRAM_OPEN_REGISTRATION | Set to 1 to let any Telegram account register |
OWNER_TELEGRAM_ID | Telegram ID of the admin |
APP_BASE_URL | Public address of this instance — links in Telegram messages; required for Discord |
DISCORD_CLIENT_ID | Discord login (optional, with the secret and APP_BASE_URL), see section 6 |
DISCORD_CLIENT_SECRET | Client secret of the Discord application |
DISCORD_ALLOWED_IDS | Allowed Discord IDs (17–20 digits, comma-separated) |
DISCORD_OPEN_REGISTRATION | Set to 1 to let any Discord account register |
OWNER_DISCORD_ID | Discord ID of the admin |
LEGAL_OPERATOR_NAME | Who runs this instance — shown in the imprint and privacy policy |
LEGAL_OPERATOR_ADDRESS | Postal address of the operator — multi-line, see below |
LEGAL_OPERATOR_EMAIL | Contact address for data protection requests |
LEGAL_OPERATOR_HOSTING | Who provides the servers (processor under Art. 28 GDPR) |
TRUST_PROXY_HOPS | Trusted reverse proxies in front of the app (default 1) |
UPLOAD_DIR | Directory for photos and 3MF files of prints (default /data/uploads) |
STORAGE_DRIVER | local (default, the directory above) or s3 — see "File storage" below |
LEGAL_OPERATOR_ADDRESS and LEGAL_OPERATOR_HOSTING may span several lines.
Write the line breaks as \n:
LEGAL_OPERATOR_ADDRESS=Example Street 1\n1234 Town\nSwitzerland
That form survives every route the value can take — an unquoted config line,
environment: in Compose, docker run -e, and deployment platforms that feed
the variables into a build.
A genuinely quoted multi-line value works too where the format allows it:
LEGAL_OPERATOR_ADDRESS="Example Street 1
1234 Town
Switzerland"
But do not paste raw line breaks into a deployment UI. Platforms that build
the image themselves (Coolify, for instance) pass the variables into the build,
where a real newline ends the line and the rest is read as the next
instruction — the build fails. \n avoids that entirely.
Windows line endings, blank lines and stray spaces are cleaned up either way.
So is a value that got escaped a second time on its way in — some platforms
turn \n into \\n when they write the variables into the build.
Do not use <br>: the legal pages are Markdown and raw HTML is discarded
by design, so it would show up as visible text.
Create a PostgreSQL database:
createdb filahub
以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗
S3_* | Bucket, region, endpoint and keys when STORAGE_DRIVER=s3 |