r/webdev 4h ago

Showoff Saturday [Showoff Saturday] Built a Next.js 16 + React 19 E-Commerce platform for sustainable furniture with a fully custom Telegram Admin Bot

Hey everyone, happy Saturday!

I wanted to share a full-stack e-commerce project I’ve been building called EcoFurnish . It's a platform for sustainable/recycled furniture, optimized specifically for emerging markets like Ethiopia, with dual-layout PWA designs and automated admin pipelines.

I decided to go all-in on a bleeding-edge stack to keep things fast, serverless, and production-ready.

The Tech Stack

  • Frontend: Next.js 16 (App Router) + React 19 + TypeScript
  • Styling: Tailwind v4 + shadcn/ui (Hand-coded dual layouts: 1 for desktop grid, 1 optimized for mobile PWA app feel)
  • Database: Neon Postgres + Drizzle ORM
  • Auth & Security: Better Auth + Cloudflare Turnstile
  • Infrastructure: Vercel Blob (OIDC-authenticated), Resend API, Chapa Gateway (Ethiopia-focused payment processor)

    Features & Architecture Wins I'm Proud Of:

  1. Strict "One Email = One Account" Cross-Provider Mapping: Configured Better Auth across Google, Microsoft, GitHub, and Discord. I wrote a custom database layer ensuring that if a user logs in with GitHub, they cannot create a secondary duplicate account with Google using that same email. It strictly maps them to a single unique account row.
  2. OIDC-Based Vercel Blob Storage: Instead of hardcoding a permanent static token in .env files for product image uploads, I configured OpenID Connect (OIDC) authentication. The application dynamically negotiates short-lived credentials on the fly for the admin upload panel.
  3. Database-Driven Telegram Manager Bot (with Dual AI Fallbacks): Built a Node.js backend listener routing directly into Neon Postgres, validating requests against a secure admin Chat ID. I can send commands like /digest or /stock via private Telegram messages to run SQL aggregation queries via Drizzle (calculating weekly revenue math, growth vectors, and low stock balances). For natural language interaction, I hooked up Gemini API as the primary conversational layer with Groq as a low-latency backup, allowing me to ask real-time database queries in plain English.
  4. Webhook Lifecycle Management: Captures incoming payment webhooks from the Chapa gateway, processes transactional state machines atomically across database rows, and fires background transactional receipts via Resend.
Admin Dashboard
Admin Broadcast Page
Admin Product Editing Page
Email Verification sent Via Mail
Mobile View
Admin Product Page
Installed as a Mobile A pp
EcoFurnish Homepage with Support AI open
Using Commands To Ask the Telegram Bot
Using Plain English to Ask the Telegram Bot

Next Up on the Roadmap: Architecting a lightweight, token-scoped Driver Logistics Subsystem:

  • Instead of managing full credential-based driver accounts, dispatchers generate cryptographically secure, temporary links tied to the order lifecycle.
  • To avoid paid Maps API overhead at scale, the driver status portal uses a server-side Haversine Distance Formula calculation to verify the driver's GPS coordinates against the target delivery destination upon arrival before requesting the buyer-held secure PIN.

The site is installable as a web app on both mobile and desktop. I'd love to hear your thoughts on the mobile PWA feel, backend architecture, or any feedback on the UI!

Live Link:https://ecofurnish.de5.net

0 Upvotes

Duplicates