A humorous web app that converts a Parqet user's portfolio value into beers, coffees, or smoothies. Community fun project ā not an official Parqet product.
"Finally a meaningful metric."
@sveltejs/adapter-cloudflarePARQET_KV)Prerequisites: DDE.
# 1. Clone the repository
git clone https://github.com/sbaerlocher/parqet.beer.git
cd parqet.beer
# 2. Copy and fill in environment variables
cp .dev.vars.example .dev.vars
# Set PARQET_CLIENT_ID and SESSION_SECRET
# 3. Start the project (installs dependencies automatically)
dde project:up
Then open https://parqet-beer.test in your browser.
Prerequisites: Node.js (see .nvmrc), pnpm.
# 1. Clone the repository
git clone https://github.com/sbaerlocher/parqet.beer.git
cd parqet.beer
# 2. Install dependencies
pnpm install
# 3. Copy and fill in environment variables
cp .dev.vars.example .dev.vars
# Set PARQET_CLIENT_ID and SESSION_SECRET
# 4. Start the dev server
pnpm dev
Then open http://localhost:5173 in your browser.
| Variable | Description |
|---|---|
PARQET_CLIENT_ID |
OAuth App Client ID from the Parqet Developer Portal |
SESSION_SECRET |
32+ byte random secret for JWE session cookies |
Parqet Connect runs as a public client with PKCE ā no client secret required.
In production, secrets are set via the Cloudflare dashboard, not through
wrangler.jsonc.
With DDE, prefix commands with dde exec:
dde exec pnpm build # Build for Cloudflare Pages
dde exec pnpm check # TypeScript + Svelte check
dde exec pnpm test # Vitest (unit tests)
dde exec pnpm lint # Prettier check
dde exec pnpm format # Prettier write
Without DDE:
pnpm dev # Vite dev server (localhost:5173)
pnpm build # Build for Cloudflare Pages
pnpm preview # Local Cloudflare Pages preview via wrangler
pnpm check # TypeScript + Svelte check
pnpm test # Vitest (unit tests)
pnpm lint # Prettier check
pnpm format # Prettier write
pnpm generate:assets # SVG ā PNG (favicon, OG image) re-render
Fork note:
wrangler.jsonccontains only placeholder IDs. Before you can deploy, you need to create your own Cloudflare resources (KV namespace, Secrets Store) and fill in the IDs. The setup script automates this flow.
./scripts/setup-fork.sh
The script creates KV namespaces (preview + production), a Secrets Store, and
a session secret, then patches wrangler.jsonc with the generated IDs.
For a step-by-step approach, see the individual commands in scripts/setup-fork.sh or scripts/README.md.
Then replace the Parqet Client ID in wrangler.jsonc under
vars.PARQET_CLIENT_ID with your own OAuth app ID from the Parqet Developer
Portal. The redirect URI configured in your Parqet app must match your deploy
domain.
Deploy via Git integration (push to main) or manually:
pnpm build
pnpm exec wrangler pages deploy .svelte-kit/cloudflare
src/
āāā app.html # Root HTML with meta tags
āāā app.css # Tailwind + colour scheme
āāā hooks.server.ts # Session check, rate limiting
āāā lib/
ā āāā calculator.ts # Portfolio ā beverage logic
ā āāā components/ # Svelte components
ā āāā data/ # Beverages & badges (JSON)
ā āāā fun.ts # Fun stats, beverage of the day
ā āāā i18n.ts # DE/EN translations
ā āāā server/ # Server-only: auth, parqet-client, kv-cache
ā āāā stores/ # Svelte stores (locale, theme)
āāā routes/
āāā +layout.svelte
āāā +page.svelte # Landing
āāā +error.svelte # 404/500
āāā api/ # OAuth, portfolios, performance, preferences
āāā dashboard/ # Auth-protected
āāā privacy/
tests/ # Vitest unit & integration tests
static/ # Favicon, OG image, etc.
This project is an independent, community-driven tool and is not affiliated with, endorsed by, or in any way officially connected to:
All trademarks and product names are the property of their respective owners and are used here for illustrative purposes only.
Not financial advice. No warranty.
MIT ā see LICENSE.