Why I built it
I always have a current obsession: instruments, clothes, furniture, and more. I hunt for it on OfferUp, Facebook Marketplace, Craigslist, Poshmark, and a few other sites. The links end up spread across notes, browser tabs, and text messages. I lose track of what I saved, and I never know what the whole pile costs.
I wanted one place for all of it. So I built Marketplace Cart. You paste a listing link, the app gets the photos, price, and condition, and it files the listing into a collection with a running total.
What it does
- Paste a link, get a listing. Marketplace Cart reads listings from OfferUp, Facebook Marketplace, Craigslist, Poshmark, Mercari, and Depop. It gets the title, price, photos, condition, location, and whether the listing is still live.
- Any other site, or no link at all. For eBay, Etsy, a shop page, or a listing seen in a group chat, you get a short form. If you paste a link, the app fills the form from the page's own preview data. You check it and save it. These listings are yours alone, and you can edit them later.
- No waiting on slow pages. The scrape runs in the background. The modal shows live status, so a slow Facebook page never freezes the app.
- Collections. You group items by obsession, project, or room: a guitar hunt, a jacket list, a living room. One item can be in several collections at once.
- Totals you can trust. The dashboard and each collection show a total and a donut chart of where the money goes, by marketplace. A price the app could not read shows "Price unavailable". It does not count as free.
- Search, filter, and sort. You search titles and descriptions and filter by status, condition, and marketplace. The filters go into the URL, so you can send someone a filtered view.
- Sharing. You share a collection with someone as a viewer (read only) or an editor (can add items), or you make it public.
- Light and dark. The app follows your system's light or dark mode until you pick one, and it has five accent colours.
How it's built
Marketplace Cart is a Node.js and Express app with MongoDB, server-rendered EJS views, and Passport for sign-in.
- Scrapers: one module for each marketplace, behind a registry that matches each URL by its hostname and path. Static sites use Axios and Cheerio. Facebook, Mercari, and Depop need a real browser, so they use Puppeteer with one shared Chrome.
- Queue: a scrape job lives in MongoDB. A worker runs two jobs at a time and retries network and timeout failures three times, with backoff. If the server crashes, the jobs it left running are picked up again.
- Services: all item and collection reads and writes go through a service layer that checks the user's role first. The views never touch the database.
- Frontend: plain ES modules, one for each page, on a small design system of CSS tokens. Dark mode and the accent colours are token swaps.
- Tests: unit tests with
node --test, run by GitHub Actions on every pull request.
What I learned
Keep messy input at the edge. Marketplace HTML changes without warning. Each scraper returns the same shape or throws a typed error, like NOT_FOUND, BLOCKED, or PARSE_FAILED. The rest of the app never sees raw marketplace markup. The queue uses the error code to decide what to retry. A missing listing is never retried, and a timeout is.
Free is not the same as unknown. My first version saved an unreadable price as 0. Then a broken scrape looked like a free guitar, and the totals were wrong. Now 0 means free and null means the app could not read a price. Totals count only real prices. Conditions work the same way: the app maps them to New, Like New, Good, Fair, or Poor, and it stores anything it does not recognise as nothing, not as junk text.
Do slow work outside the request. At first, the scrape ran inside the HTTP request, and a slow Facebook page could hang it for half a minute. Now the request returns a job id at once and the page polls for the result. That change brought new problems: duplicate jobs, crashed jobs, and previews nobody confirmed. The fixes are a duplicate check on each new job, a check every minute for jobs a crash left behind, and a sweep every six hours for previews nobody saved.
A URL from a user is a risk. The prefill form fetches any URL a user pastes. Without care, someone could point it at the server's own network. Every fetch resolves the hostname first and refuses private, loopback, and cloud-metadata addresses, on every redirect. It also has an 8-second timeout and a 2 MB limit.
Security is many small things. Each form and API call has a CSRF token. Helmet sets a strict content security policy, and the one inline script runs with a nonce. Sign-in and scraping have rate limits. Logout is a POST, so a link cannot sign you out.
Where it stands
I use Marketplace Cart for all my finds, whatever my current obsession is: instruments, clothes, furniture, and more. It started with two marketplaces and a confirm step that blocked the page. Now it reads six marketplaces in the background and takes a listing from any other site by hand. eBay is the one big gap: it blocks automated clients, so its listings go through the manual form. The code is on GitHub (opens in a new tab).





