WeGree is a B2B marketplace for telematic auctions and direct-sale industrial assets. The MVP covers three business areas:
- Direct Sale / 01 Machinery showcase, sourced from Zucchetti.
- Judicial real-estate listings, enriched in WeGree and redirected to the external AstaLegale/Falco engine.
- Proprietary movable-goods auctions, managed by the WeGree backoffice with deposits, bids and realtime updates.
- Nuxt 4 SSR, Nitro API routes and Nitro WebSocket.
- Nuxt UI 4, Tailwind CSS 4, Pinia and
@nuxtjs/i18n. - NuxtHub with Neon PostgreSQL, Vercel Blob and Vercel KV.
- Better Auth through
@onmax/nuxt-better-auth, with email/password and Google/LinkedIn OAuth. - Stripe for deposits and Resend for transactional email.
- Drizzle ORM schema in
server/db/schema.ts.
- Node.js 24.
- pnpm 10.33.2, pinned by
packageManager. mkcertfor trusted HTTPS on localhost.- Local
.envcopied from the right file inenv/.
Install dependencies:
pnpm installCopy the development env file to the project root:
Copy-Item env/.env.development .envThe local dev server runs over HTTPS. Install and trust the local certificate once:
winget install mkcert
mkcert -install
mkcert -key-file certificates/server.key.pem -cert-file certificates/server.cert.pem localhost 127.0.0.1 ::1Start the app:
pnpm devDefault local URL:
https://localhost:3000
Database schema changes must start from Drizzle schema files, not manual SQL migrations.
- Edit
server/db/schema.tsor another schema file underserver/db/schema/. - Generate migrations with NuxtHub:
npx nuxt db generate- Apply migrations:
npx nuxt db migrateNever create files manually in server/db/migrations/.
Useful scripts:
pnpm db:generate
pnpm db:migrate
pnpm db:sqlThe endpoint POST /api/dev/seed-users is disabled by default and returns 404 unless explicitly enabled. It is also blocked in production.
Enable it locally:
DEV_SEED_USERS_ENABLED=true
DEV_SEED_USERS_TOKEN=una-stringa-lunga-e-randomRun the app, then seed local users:
pnpm dev
pnpm seed:users:localThe script reads DEV_SEED_USERS_TOKEN, posts to https://localhost:3000/api/dev/seed-users, and sends the x-seed-token header. Override the URL when needed:
SEED_USERS_URL=https://localhost:3001/api/dev/seed-users pnpm seed:users:localTo create a complete local demo dataset with fake B2B buyers, procedures, auctions, lots, registrations, manual deposits, bids, bid audit logs and auction messages:
pnpm seed:demo:localThe demo seed posts to https://localhost:3000/api/dev/seed-demo, uses the same token header, and resets only records with the DEMO- prefix before recreating them. Override the URL when needed:
SEED_DEMO_URL=https://localhost:3001/api/dev/seed-demo pnpm seed:demo:localSeed credentials returned by the endpoint use password:
Password123!
Use this only for controlled production or staging smoke tests. The endpoint POST /api/ops/seed-production-smoke-users is disabled by default and returns 404 until explicitly enabled.
Required private environment variables:
PROD_SMOKE_USERS_ENABLED=true
PROD_SMOKE_USERS_TOKEN=una-stringa-lunga-e-random
PROD_SMOKE_USERS_PASSWORD=una-password-di-almeno-8-caratteriRun the interactive script:
pnpm seed:prod-smoke-usersThe script asks for the deployed endpoint URL and the secret token at runtime using consola.prompt. These values are not read from a local env file and are not saved in the repository.
The seed is idempotent, writes a forensic log, never returns the password, and only provisions controlled @wegree.it or @wegree.com smoke users:
qa-admin@wegree.it
qa-buyer-a@wegree.it
qa-buyer-b@wegree.it
Use this path when you want a local WeGree instance with fake users, auctions, lots, registrations, manual deposits and bids.
- Prepare the local environment:
pnpm install
Copy-Item env/.env.development .env- Make sure the local seed endpoint is enabled in
.env:
DEV_SEED_USERS_ENABLED=true
DEV_SEED_USERS_TOKEN=una-stringa-lunga-e-random- Create the HTTPS certificate if it is not already present:
mkcert -install
mkcert -key-file certificates/server.key.pem -cert-file certificates/server.cert.pem localhost 127.0.0.1 ::1- Apply the current database migrations:
pnpm db:migrate- Start Nuxt:
pnpm dev- In a second terminal, create the base users and the demo marketplace data:
pnpm seed:users:local
pnpm seed:demo:localThe demo seed is idempotent for demo records: it removes and recreates only data with the DEMO- prefix. It does not delete non-demo local records.
All seeded accounts use:
Password123!
Useful logins:
| Role | Use case | |
|---|---|---|
| Admin | admin@wegree.local |
Backoffice and project checks |
| Operator | operatore@wegree.local |
Auction operations and approvals |
| Buyer | buyer@wegree.local |
Basic buyer account |
| Buyer | buyer-b2b@wegree.local |
Approved B2B buyer |
| Buyer | buyer-rossi@wegree.local |
Manual-approval demo buyer |
| Buyer | buyer-logistica@wegree.local |
Manual-deposit demo buyer |
Open https://localhost:3000 and verify:
- Login works with the seeded accounts.
/backoffice/asteshows the demo auctions./aste/mobilishows demo movable-goods auctions and lots.- A free demo auction can receive bids without Stripe.
- Manual-approval and manual-deposit demo auctions show the participation flow without calling Stripe.
Run quality checks after code or seed changes:
pnpm typecheck
pnpm lintUse these checks before opening a PR or deploying:
pnpm typecheck
pnpm test:unit -- --run
pnpm test:nuxt
pnpm test:coverage
pnpm build
pnpm lintpnpm lint must finish with a clean console. If it reports errors or warnings, fix them and rerun the command.
pnpm dev
pnpm build
pnpm start
pnpm generate
pnpm preview
pnpm lint
pnpm lint:fix
pnpm test
pnpm test:unit -- --run
pnpm test:nuxt
pnpm test:coverage
pnpm seed:demo:local
pnpm seed:users:localThis repository uses Conventional Commits and commitlint. Commit messages follow:
type(scope?): subject
Common types:
feat, fix, docs, chore, ci, test, refactor, perf, build, style, revert
Rules:
- Keep commits atomic: one logical change per commit.
- Do not commit unrelated files or broad "misc" changes.
- Prefer short English technical subjects for changelog and release automation.
- Run
pnpm lintand the relevant tests before committing. - Keep PR history readable; squash only when the final commit message remains meaningful.
References:
- https://www.conventionalcommits.org/en/about/
- https://github.com/conventional-changelog/commitlint
- https://commitlint.js.org/guides/getting-started.html
Versioning and changelog generation use commit-and-tag-version:
pnpm version:patch
pnpm version:minor
pnpm version:major