
BookTruck — presentation, donations and fundraising campaigns for a mobile library
booktruck.cartilepefata.ro ↗Context
I met Victor Miron in December 2016 at a book event in Timișoara. That's how I found out about the Cărțile pe Față cultural association and its mission to get Romanians reading more. I started as a volunteer at their "Vocea cititorului" reading clubs, co-organised two editions, and after moving to Cluj-Napoca I gradually took over the association's IT infrastructure.
BookTruck is the association's library on wheels, bringing books to children in villages without a working library. The site started in March 2022 on Next.js 12 as a presentation site with a donation form. Since then it has become the way the association raises money, collects books and volunteers, and sells its own books, and in autumn 2026 it gained an admin panel, fundraising campaigns and supporter accounts.
The problem
A fundraising site has to be trustworthy above all: a monthly donation must show up in the records even when the payment processor doesn't notify the site, and a refund made from the merchant account must show up in the panel too. The association also wanted "donate your birthday" campaigns, created by the team or even by supporters, without any page going public before someone has looked at it. On top of that, it sells the BookTruck books, runs a Christmas campaign every year, and needs to update its own partners, gallery, press coverage, book-donation points and map of adopted schools — without emailing me for every logo.
What I built
- A public site in Romanian and English, with translated addresses for every page (for example
/doneaza-cartiand/en/donate-books). The homepage has the donation form with a running total, the latest active campaign, the auction closing soonest and the map of adopted schools; the Romanian version adds redirecting 3.5% of income tax (brought forward during tax-return season), sponsorships, SMS support and the Substack newsletter signup. - One-off or monthly donations through EuPlătesc by card, or by bank transfer. The suggested amounts, the currency and the form's copy are edited from the panel; an empty field falls back to the default translation.
- Fundraising campaigns ("Donate your birthday"): each campaign has its own page with photos and video, a description, a goal, a progress bar, time left, share buttons and the list of donations. Donors can give once or monthly, stay anonymous and leave a message. Avatars come from Gravatar, and when there isn't one the site draws a book generated from the donation. An anonymous donation never uses Gravatar, so the picture can't give the donor away. Finished campaigns stay online with their final result but no longer take donations.
- An approval flow for campaigns: draft, preview (visible only to the author and administrators), submit for approval, then approve or reject with a reason. Administrators get an email for every submission, and the author hears back by email too.
- Charity auctions: actors, writers, musicians and other supporters donate objects, and the public bids online. Each auction is a single object with its own page, photos and closing time, and the
/licitatiipage groups them into collections. Bids are placed from an account, with a commitment checkbox, and a bid is a commitment, not a payment: no money is held while the auction runs. Every bid must beat the current one by at least a set step and at most a set cap, both chosen per object, and the same account can't bid twice in a row. Bidders who don't want their name shown appear as "Bidder #47", with a number that stays the same for the whole auction. A bid in the last minutes extends the auction, so nobody wins just by clicking last. Visitors can follow an auction and get an email a day and an hour before it ends, and signing in from an auction brings you straight back to it. Under "My account", "My bids" shows each person's bids and the auctions they've won. - Supporter accounts, with sign-up protected by Cloudflare Turnstile and passwordless magic-link sign-in. Under "My account" people see their donations, their bids (anonymous and monthly ones included), edit their details and can start their own campaigns, which go through the same approval flow, with limits on how many can be open at once and how long they run.
- The Christmas campaign: a page with the fundraising progress, a countdown to Christmas, a gallery and a thank-you message after donating. Once the goal is reached, the page switches to thanks and partners on its own. From September until after Christmas, a bar in the menu counts the days left.
- Book donations: an interactive county map of the places where people can drop off books, each with a phone number and a map link.
- The map of adopted schools: Cluj county drawn by administrative unit, with adopted schools and those still waiting for an adopter pinned on their villages.
- Orders for the BookTruck books, "Dana și verișoarele" among them, paid with Stripe and invoiced automatically through Oblio, to a person or a company, with courier delivery or personal pickup. The form hides itself when nothing is in stock, and an order submitted twice resumes the payment already started instead of creating another.
- Volunteering: a form with each person's availability, sent through Brevo straight to the coordinators.
- Gallery, press coverage, partners in three tiers, and the "Biblioteca vie cu Raluca Anton" page with tickets through Oveit. Gallery photos have their own addresses so they can be shared.
- Seasonal touches: between 20 October and 2 November, Halloween characters show up on the site.
- Cookie consent by category: analytics (Google Analytics, Smartlook, Vercel Analytics) and external content (YouTube, Substack) load only after consent. On refusal the analytics cookies are cleared, and the choice is asked again after six months.
- An admin panel: a dashboard with this month's donations, active monthly donors and orders to process; donors, with payment history, per-payment refunds and cancelling monthly donations; statistics with charts comparing periods; the donation form editor; campaigns, with approval and message moderation; auctions, bids and awards, with their figures on the dashboard and a CSV export; orders (Received → Being prepared → Shipped) and products; partners by tier, in an order set from the panel; the gallery, with drag-and-drop ordering; press coverage; book-donation points and the schools on the map; users (team and public accounts), invitations, roles, activity log and settings. Roles are Editor, Coordinator and Administrator, and every action is checked on the server, not just hidden in the interface.
- Gallery import from Google Drive: paste the link to a public folder and pick the photos. All other images — uploads from a computer, logos, products, avatars and campaign photos — live in Supabase Storage.
Under the hood
The piece I'm happiest with is the EuPlătesc donation sync. It runs every night on Vercel Cron (or on demand from the panel) and catches exactly the cases where an ordinary site loses data: monthly charges EuPlătesc makes without calling the site, payments whose callback never arrived, and refunds or cancellations made directly in the EuPlătesc account. The first run imported the full history back to 2018. It can run any number of times without duplicates; an incremental run covers the last 35 days and takes a few seconds. Because the merchant account is shared with other sites, it only imports BookTruck transactions, and the payment description carries the campaign, so a campaign's monthly charges find their way back to it. The integration uses the EuPlătesc library for Node.js that I maintain.
Campaigns reuse the same donations and the same sync rather than a parallel system. The amount raised isn't stored; it's calculated from the payments collected until the campaign ends, minus refunds: a monthly donation counts every charge while the campaign is running, and later charges no longer move the displayed progress. Photos and videos are uploaded straight from the browser to Supabase Storage with signed URLs, so large files never pass through the server, and a weekly job removes files left without a campaign. Descriptions are written with Tiptap and sanitised on the server against a short list of allowed tags.
For auctions, placing a bid happens in a single transaction that locks the auction's row in Postgres. The minimum, the cap, the time left and the current leader are re-read there instead of being trusted from the browser, because two equal bids a few milliseconds apart is a real case, and a unique index on the amount is the last line of defence. The bidder number is assigned there too. One Vercel Cron job closes expired auctions every minute and another sends the reminders, and any visit to a public page also closes an auction whose deadline has passed, so nobody can bid after the end even if a run is missed. Closing can run more than once without doing anything twice. At the end the winner gets an email, the others hear the result, and the team takes the award over in the panel: discussion notes, a payment link or an offline payment, handing over the object and, if a winner backs out, reassigning it to the runner-up at their own bid. The payment link creates an ordinary EuPlătesc donation, so the money shows up in the same records and statistics as every other donation. Team members can't bid, and an out-of-line bid can be cancelled from the panel with a reason, without being deleted. The auction rules are pure, tested functions used by both the server and the pages, so the interface shows exactly the limits the server enforces.
The site moved from the Pages Router to the App Router in 2024, runs on a Prisma database on Supabase Postgres, swapped Formik and Yup for react-hook-form and zod, and does i18n with next-intl. The homepage is statically generated and refreshes itself, so a campaign that ends disappears without anyone editing anything. Sign-in uses Better Auth magic links with Redis rate limiting, public forms are protected by Cloudflare Turnstile, and non-production deployments are never indexed. Pages have canonical URLs, language alternates, a sitemap and share images. Donation, campaign and auction rules, the sync, statistics, permissions, cookie consent, the payment routes and the auction jobs are covered by Vitest.
Result
The association manages its own content, campaigns, auctions and orders, and sees donations, active monthly donors and each campaign's progress in one place, with records that reconcile themselves every night. Supporters can start their own fundraiser, bid on donated objects and follow their donations and bids without having to write to anyone. The site does its job every day: people donate, order books and sign up as volunteers, and the BookTrucks keep heading out to schools.
Stack
Next.js 16 (App Router), React 19, TypeScript, next-intl, Prisma 7 on Supabase Postgres, Supabase Storage, Better Auth, Redis, Tailwind CSS 4, shadcn/ui, Headless UI, framer-motion, Tiptap, dnd-kit, Recharts, react-hook-form + zod, EuPlătesc, Stripe, Oblio, Brevo, Cloudflare Turnstile, Google Drive API, Vitest, Vercel.
Technologies:
- Next.js
- next-intl
- Prisma
- Supabase
- Better Auth
- EuPlătesc
- Stripe
- Oblio
- Vitest
Share on: