๐ Languages: English | ็ฎไฝไธญๆ
A pixel-art, RPG-styled personal-item tracker and daily-life dashboard. Manage your belongings, spending, and tasks in a gamified way.
- Desktop client โ native macOS shell (Tauri 2 thin client): first-run server setup, persistent login via Keychain, tray + global shortcut, device-session management (prebuilt builds in Releases; dev/build in the Desktop client section below)
- Item management โ record item info (price, source, warranty, tags); auto daily-averaged cost
- Character system โ upload portrait, set name/class, record birthday & star sign
- Daily quests โ auto-generated daily tasks (add item, log spending, โฆ); complete them for EXP
- Achievements โ collection achievements (first add, master collector, โฆ); unlocked ones are written to the adventure log
- Adventure log โ auto-recorded system events + manual entries, RPG-style timeline
- World map โ daily AI tech-intel feed with history, organized by six domains (LLMs / agents / vision / infra / research / tools) (frontend + mock; backend pending)
- Stats โ spending trends, item-status breakdown, warranty reminders, and other charts
- Pixel UI โ NES.css-based pixel-art theme, Press Start 2P / Ark Pixel fonts
| Layer | Tech |
|---|---|
| Frontend | Vue 3.5 + TypeScript + Pinia 3 + Vue Router 4 + Vite 8 |
| Backend | FastAPI + SQLAlchemy 2.0 (async) + SQLite (aiosqlite) |
| Desktop | Tauri 2 + Rust (thin client, reuses web/, tokens in OS Keychain) |
| Auth | JWT + session-based (refresh rotation / reuse detection / device sessions) |
| Charts | ECharts 6 |
| Styling | NES.css + custom pixel components |
PixelPack/
โโโ server/ # Python backend
โ โโโ app/
โ โ โโโ main.py # FastAPI entry, router registration, static files
โ โ โโโ config.py # config (DB, secret, upload dir)
โ โ โโโ database.py # SQLAlchemy async engine + Session
โ โ โโโ models/ # ORM models (User, Item, Journal, Quest, ...)
โ โ โโโ schemas/ # Pydantic request/response models
โ โ โโโ services/ # business logic
โ โ โโโ routers/ # API routes (REST endpoints)
โ โ โโโ utils/ # JWT, password hashing, DI
โ โโโ requirements.txt
โโโ web/ # Vue frontend
โ โโโ src/
โ โ โโโ api/ # ofetch API wrappers
โ โ โโโ components/ # reusable components (PixelDatePicker, ...)
โ โ โโโ layouts/ # layouts (AuthLayout, MainLayout)
โ โ โโโ router/ # routes + navigation guards
โ โ โโโ stores/ # Pinia stores (auth, notification)
โ โ โโโ styles/ # global styles (pixel theme, animations, fonts)
โ โ โโโ types/ # TypeScript types
โ โ โโโ utils/ # helpers (format, export, calc, platform abstraction, refresh worker)
โ โ โโโ views/ # pages (Dashboard, ItemList, Quests, ...) + desktop/ (Setup, ...)
โ โโโ package.json
โโโ application/desktop/ # Tauri 2 shell (src-tauri/ Rust + reuses web/)
โโโ uploads/ # user-uploaded images (gitignored)
- Python 3.10+
- Node.js 24+ (aligned with
node:24-alpineinweb/Dockerfile) - npm 10+
Create the virtualenv at the project root (one repo for both ends; Python is backend-only):
# at project root
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r server/requirements.txtStart the dev server (server/, since DATABASE_URL and UPLOAD_DIR are relative paths):
cd server
uvicorn app.main:app --reload --port 8000 --log-config app/uvicorn_log_config.jsonThen visit http://127.0.0.1:8000/docs for the API docs.
cd web
npm install
npm run devThe frontend dev server runs at http://localhost:3000 and proxies /api and /uploads to the backend at http://127.0.0.1:8000.
Backend tests (auth sessions, etc.):
cd server && pytest -qThe desktop app is a thin client: it reuses the web/ frontend, talks to the backend over HTTPS, and stores tokens in the system keychain. Zero server-side changes.
- Prebuilt builds: see Releases (first macOS release
v1.0.0, Apple Silicon). - Local dev / build from source: see
application/desktop/README.md.
cd application/desktop
npm install # installs @tauri-apps/cli (needs Rust toolchain + Xcode CLT)
npm run dev # tauri dev: first-run server setup โ sign in
npm run build # tauri build โ produces .dmg / .appDesign doc: docs/technology/260726-ๆก้ข็ซฏๅฎขๆท็ซฏๆๆฏๆนๆก.md.
The frontend is built via a Docker multi-stage build (web/Dockerfile: node build โ nginx static serve). No need to run npm run build on the host in production โ docker compose up -d --build web does it. For local dev, use npm run dev as above.
docker-compose.yml brings up two containers โ api (FastAPI/uvicorn) and web (multi-stage nginx static) โ both on the shared airise-web network. External traffic is handled by the standalone airise-gateway, which terminates TLS and reverse-proxies.
git clone https://github.com/LunaticKrian/PixelPack.git
cd PixelPack
# 1. Configure secrets (never in git, never in the image โ injected at runtime)
cp server/.env.example server/.env
vi server/.env # fill in ANTHROPIC_AUTH_TOKEN
# 2. Build and start api + web (build on the server โ see notes below)
docker compose up -d --buildCommon commands:
docker compose ps # status (api, web)
docker compose logs -f api # backend logs
git pull && docker compose up -d --build # update code (./data is preserved)Deployment topology
Browser โโhttpsโโโถ airise-gateway (standalone project, owns 80/443, pure router)
โโ /api/ โโโถ pixelpack-api:8000 (this compose)
โโ /, /uploads/ โโโถ pixelpack-web:80 (this compose, SPA + uploads served directly)
โโ docker-compose (this project) โโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ web (nginx:alpine) โ multi-stage: node buildโnginx โ
โ โโ serve SPA (fallback + gzip + cache) โ
โ โโ serve /uploads (mount ./data/uploads:ro) โ
โ api (uvicorn) :8000 โ
โ โโ FastAPI + APScheduler (writes ./data/uploads) โ
โ โ
โ volumes: ./data โ /app/data (api) โ
โ ./data/uploads โ /app/data/uploads:ro (web) โ
โ โโ data.db โ
โ โโ uploads/ (api writes, web reads, same compose) โ
โ networks: airise-web (external, talks to the gateway) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Notes
- Persistence:
data.dbanduploads/all live under./data(bind mount); rebuilding/upgrading containers won't lose data โ back up withtar czf backup.tar.gz data/. - Secrets:
.envis injected via composeenv_file; images are safe to push to public registries. - Gateway:
airise-gatewayis a separate project/repo (not under this one) โ a pure router: TLS +/apiโapi + everything elseโweb, mounts no project host path. Uploaded files are served directly by thewebcontainer (apiwrites,webreads the same./data; zero path drift). See the airise-gateway repo README for its config. โ ๏ธ Bundled-binary platform consistency:claude-agent-sdkships a glibc native binary (~240MB), so the backend image cannot use alpine, and the build platform must match the runtime platform. Building on Apple Silicon for an amd64 server requiresdocker buildx build --platform linux/amd64; the safest option is stilldocker compose builddirectly on the server.
Full steps, secret-safety discussion, HTTPS/domain extension, and troubleshooting are in docs/deployment/deploy.md.
| Doc | Contents |
|---|---|
| docs/technology/260726-ๆก้ข็ซฏๅฎขๆท็ซฏๆๆฏๆนๆก.md | Desktop Tauri 2 thin client: architecture, platform-abstraction layer, CSP/CORS, packaging/distribution, mobile roadmap |
| docs/technology/260727-้ดๆไผ่ฏๅไธๅบ็จ้.md | Refresh rotation + reuse detection + device sessions + desktop app lock (PIN/Touch ID) โ design & implementation |
| docs/deployment/deploy.md | Full deployment: web container build โ backend deploy โ gateway update, with verification, daily updates, backup, troubleshooting |
| docs/technology/260719-nginx้จ็ฝฒๆถๆ.md | Gateway-hosting architecture (unified entry, shared network, wildcard cert, multi-project onboarding) |
| docs/technology/260719-ๆฐๆๅกไธ็บฟไธ็ฝๅ ณๆฉๅฑ.md | New-project onboarding SOP: backend container joins airise-web, site config from _template.example, gateway extension |
| docs/technology/260719-้้ ่ฏไนฆ็ญพๅ.md | *.airise.site wildcard cert DNS-01 issuance, auto-renew hook, single-domainโwildcard migration, troubleshooting |
| docs/updatelog.md | Repo changelog |
| airise-gateway repo README | Gateway container (airise-gateway, standalone project) docs |
| Prefix | Description |
|---|---|
/api/auth |
register, login, token refresh (rotation), password change, profile update |
/api/auth/sessions |
device-session list, remote sign-out of a specific device |
/api/items |
item CRUD, image upload, status change, CSV export |
/api/categories |
category management |
/api/tags |
tag management |
/api/journals |
adventure log (auto + manual) |
/api/quests |
daily-quest progress, achievements |
/api/stats |
overview, recent items, warranty alerts |
All authenticated endpoints use the Authorization: Bearer <token> header.
Backend config via env vars or server/.env:
DATABASE_URL=sqlite+aiosqlite:///./data.db
SECRET_KEY=your-secret-key
ACCESS_TOKEN_EXPIRE_MINUTES=60
REFRESH_TOKEN_EXPIRE_DAYS=7
UPLOAD_DIR=uploadsMIT