Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Server Icon

Techzy Backend (MERN)

🔥 Server-side REST APIs with Node.js, Express, MongoDB, SSLCommerz, Stripe & Automated Transaction Mailers

Node.js Express MongoDB Stripe Nodemailer


🌈 About Techzy Backend

Handles all server-side operations, transactional workflows, payment gateways, and data integrity controllers for the Techzy E-commerce platform:

  • 💳 Dual-Payment Gateways: Stripe checkout + SSLCommerz local payment gateway integration.
  • 📨 Nodemailer Transaction Emailer: Fully automated mail server that delivers beautiful industry-standard purchase summaries to users upon successful payment confirmation.
  • 🔐 JWT Session Middleware: Secure cross-origin cookie/local token signatures with role-based admin validation guards.
  • 🚀 Auto-Database User Sync: Automatically provisions user records inside MongoDB upon Firebase Google OAuth registration.
  • 📦 API Controllers: Managed routes for product CRUD, user database indexing, and automated subscriber lists.

🛠️ Backend Tech Stack

Server Framework:   Node.js • Express.js
Database:           MongoDB (Mongoose / Native Driver)
Session Auth:       Firebase Admin SDK • JsonWebToken (JWT)
Payment Systems:    Stripe Core API • SSLCommerz Merchant Gateway
Email Automation:   Nodemailer (SMTP Relay Client)
Security:           CORS Guards • Dotenv Environment Managers

⚙️ Core Architecture & Enhancements

1. Payment Processing (src/controllers/payment.controller.js)

  • Integrated SSLCommerz merchant payment credentials along with standard Stripe API hooks.
  • Configured dynamic payment init callback endpoints (/payment/ssl-init), IPN (Instant Payment Notification) listener validation routes, and routing callbacks.

2. Transaction Emailer System (src/services/email.service.js)

  • Built an SMTP mailer pipeline utilizing Nodemailer.
  • Delivers a structured, premium invoice table detailing purchased items, customer info, transaction IDs, and receipt links automatically upon payment hook resolution.

3. Middleware Security & Identity Validation

  • Integrated route verifiers (verifyToken & verifyAdmin) to secure dashboard analytics and catalog mutating operations.

🚀 Getting Started

  1. Clone the repository:

    git clone https://github.com/tuhin360/techzy.git
    cd techzy-server
  2. Install dependencies:

    pnpm install
  3. Create a .env configuration file:

    PORT=5000
    DB_USER=yourMongoUser
    DB_PASSWORD=yourMongoPassword
    JWT_SECRET=yourJwtSecret
    STRIPE_SECRET_KEY=yourStripeSecretKey
    STORE_ID=yourSSLCommerzStoreId
    STORE_PASSWORD=yourSSLCommerzStorePassword
    IS_LIVE=false
    EMAIL_USER=yourSMTPAuthEmail
    EMAIL_PASS=yourSMTPAuthPassword
  4. Run in development mode:

    pnpm dev

    The server runs locally at http://localhost:5000.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages