A car dealer marketplace built on the OLX clone stack: React, Firebase Auth, Firestore, and Storage.
- Buyers — Browse and search cars with no login. Contact dealers via WhatsApp only.
- Dealers — Email or Google login, onboarding, dashboard, and car listings (add / edit / delete).
| Path | Description |
|---|---|
/ |
Car listings (public) |
/car/:id |
Car detail (public) |
/search |
Search (public) |
/dealer/login |
Dealer login / register |
/dealer/onboarding |
First-time dealer setup |
/dealer/dashboard |
Dealer listings |
/dealer/car/new |
Add listing |
/dealer/car/edit/:id |
Edit listing |
/dealer/profile |
Dealer profile |
- Copy
.env.exampleto.envand add your Firebase config. npm installnpm start- Deploy rules:
npm run deploy:rules
products— Car listings (dealerId,title,price,imageUrls,isActive, etc.)users— Dealer profiles (role: "dealer",dealershipName,whatsappNumber,city)
Storage path for images: products/{dealerId}/{filename} (optional)
Set in .env:
REACT_APP_SKIP_STORAGE_UPLOAD=trueDealers can paste public image URLs on the add/edit car form, or publish listings with no photos. Restart npm start after changing .env.
When Storage is ready, set REACT_APP_SKIP_STORAGE_UPLOAD=false and run npm run deploy:rules.
npm run buildUses NODE_OPTIONS=--openssl-legacy-provider for Node 17+ with Create React App 4.
Live site: https://raviflobo.github.io/olx/
Seeing README instead of the app? Pages is publishing the
mainbranch source. Fix: open Pages settings → Build and deployment → set Source to GitHub Actions (not “Deploy from a branch”). Then run the Deploy to GitHub Pages workflow under Actions, or runnpm run deploy:gh-pagesand set Source to branchgh-pages// (root).
- In the repo on GitHub: Settings → Pages → Build and deployment → Source → GitHub Actions.
- Add repository Secrets (same names as
.env.example):
REACT_APP_FIREBASE_API_KEY,REACT_APP_FIREBASE_AUTH_DOMAIN,REACT_APP_FIREBASE_PROJECT_ID,REACT_APP_FIREBASE_STORAGE_BUCKET,REACT_APP_FIREBASE_MESSAGING_SENDER_ID,REACT_APP_FIREBASE_APP_ID(and optionalREACT_APP_FIREBASE_MEASUREMENT_ID). - In Firebase Console → Authentication → Authorized domains, add
raviflobo.github.io.
- Automatic: Push to
mainruns.github/workflows/deploy-github-pages.yml. - Manual (local): With
.envpresent, runnpm run deploy:gh-pages(publishes thebuild/folder to thegh-pagesbranch).
- Legacy listings — OLX-shaped
productsdocs are normalized on read (normalizeCar.js) so old ads show with correct titles, images, and specs. - Dealer dashboard — Loads listings by
dealerIdand legacyuserId. - Profile sync — Saving dealer profile updates WhatsApp/dealership on all active listings.
- UI — Sticky filter chips on home, carousel dot indicators on car detail, forgot-password link on dealer login.
- Privacy —
/privacypage linked from the footer.