Skip to content

Navigation Menu

Sign in
Sign up

Repository files navigation

πŸš€ ProConnect Backend

ProConnect is a modern marketplace application connecting clients with service providers. This repository hosts the robust and scalable Backend Service, built using TypeScript, Express, and MongoDB.


πŸ”— Live Demo & Source Code

Name Type Link
Live Application Frontend Deployment Frontend Live
Backend API API Deployment Backend Live
Frontend Source GitHub Repository ProConnect-Frontend
Backend Source GitHub Repository ProConnect-Backend

πŸ› οΈ Tech Stack

Category Technology Version Purpose
Language TypeScript 5.8.3 Type safety & scalability
Runtime Node.js - JavaScript runtime
Framework Express.js 5.1.0 Web framework
Database MongoDB - NoSQL document DB
ORM Mongoose 8.16.1 MongoDB modeling
Validation Zod 3.25.74 Schema validation
Authentication JWT & Bcryptjs 9.0.2 & 3.0.3 Secure login & hashing
Payment Gateway SSLCommerz - Payment processing
File Upload Cloudinary & Multer 2.8.0 & 2.0.2 File storage & upload
Email Service Nodemailer 7.0.11 Email sending
HTTP Client Axios 1.13.2 API requests
Utilities CORS, Cookie-Parser - Security & cookie management

✨ Key Features

  • πŸ” User Authentication & Authorization: JWT-based login, registration, role-based access (Admin, Seller, Client)
  • πŸ› οΈ Service Management: Full CRUD operations for services with validation & error handling
  • πŸ“¦ Order Processing: Place, track, and manage orders
  • πŸ’³ Payment Gateway Integration: SSLCommerz support, transaction tracking & status management
  • ⭐ Review & Rating System: Leave reviews, ratings with moderation support
  • πŸ“Š Admin Dashboard: Analytics, user & transaction management, report oversight
  • πŸ’° Wallet & Withdrawal: Wallet tracking, earnings withdrawal with transaction history
  • βœ‰οΈ Messaging System: User-to-user messaging for communication and support
  • πŸ“‘ Transaction Tracking: Complete financial audit trail
  • ⚑ Robust Error Handling: Global error handler, custom AppError, Mongoose & Zod validation support
  • 🧩 Custom Middleware: Authentication checks, request validation, error & CORS handling

πŸ“‚ Project Structure

src/
β”œβ”€β”€ app.ts # Express app setup
β”œβ”€β”€ server.ts # DB connection & server start
β”œβ”€β”€ app/
β”‚ β”œβ”€β”€ config/ # Environment & upload configs
β”‚ β”œβ”€β”€ errorHelpers/ # Custom error handling
β”‚ β”œβ”€β”€ helpers/ # Error response helpers
β”‚ β”œβ”€β”€ interfaces/ # TypeScript interfaces
β”‚ β”œβ”€β”€ middlewares/ # Authentication, validation, error & 404 handlers
β”‚ β”œβ”€β”€ modules/ # Feature modules (M-C-S)
β”‚ β”‚ β”œβ”€β”€ admin/ # Dashboard & analytics
β”‚ β”‚ β”œβ”€β”€ auth/ # Authentication
β”‚ β”‚ β”œβ”€β”€ order/ # Orders
β”‚ β”‚ β”œβ”€β”€ payment/ # Payment processing
β”‚ β”‚ β”œβ”€β”€ service/ # Services
β”‚ β”‚ β”œβ”€β”€ review/ # Ratings & reviews
β”‚ β”‚ β”œβ”€β”€ transaction/ # Transactions
β”‚ β”‚ β”œβ”€β”€ user/ # Users
β”‚ β”‚ β”œβ”€β”€ wallet/ # Wallet
β”‚ β”‚ β”œβ”€β”€ withdrawal/ # Withdrawals
β”‚ β”‚ β”œβ”€β”€ utility-messages/ # Messaging
β”‚ β”‚ β”œβ”€β”€ report/ # Reports
β”‚ β”‚ └── ssl/ # SSLCommerz integration
β”‚ β”œβ”€β”€ routes/ # Routes
β”‚ └── utils/ # Utility functions
β”œβ”€β”€ tsconfig.json # TypeScript config
└── vercel.json # Vercel deployment config

βš™οΈ Local Setup Guide

Prerequisites

  • Node.js v18+
  • npm or pnpm
  • MongoDB server or MongoDB Atlas

1️⃣ Installation

git clone https://github.com/arman-miaa/ProConnect-Backend.git
cd ProConnect-Backend
pnpm install # or npm install

2️⃣ Environment Variables

Create .env in root:

PORT=5000
NODE_ENV=development
DATABASE_URL=<mongodb_connection_string>
JWT_SECRET=<your_jwt_secret>
JWT_EXPIRES_IN=7d
CLOUDINARY_CLOUD_NAME=<name>
CLOUDINARY_API_KEY=<key>
CLOUDINARY_API_SECRET=<secret>
SSL_STORE_ID=<ssl_id>
SSL_STORE_PASSWORD=<ssl_password>
EMAIL_USER=<email>
EMAIL_PASSWORD=<password>
EMAIL_FROM=noreply@proconnect.com
FRONTEND_URL=http://localhost:3000

3️⃣ Run Development

pnpm run dev # or npm run dev

4️⃣ Build & Production

pnpm run build
pnpm start

πŸ“œ Available Scripts

Script Description Command
dev Run development server with live reload pnpm run dev
build Compile TS to JS (/dist) pnpm run build
start Run production build pnpm start
lint ESLint check pnpm run lint
test Run tests (not configured) pnpm run test

πŸ”‘ Key Dependencies

  • Express.js: RESTful APIs & middleware
  • Mongoose: MongoDB modeling
  • TypeScript: Type safety
  • JWT & Bcryptjs: Secure auth
  • Zod: Runtime validation
  • Cloudinary & Multer: File uploads
  • Nodemailer: Email sending
  • Axios: API requests
  • CORS & Cookie-Parser: Security & session

🀝 Contributing

  1. Fork repository
  2. git checkout -b feature/awesome-feature
  3. Commit changes git commit -m "feat: Added awesome feature"
  4. Push git push origin feature/awesome-feature
  5. Open Pull Request

πŸ‘€ Author

Arman Mia - GitHub


πŸ“„ License

ISC License – See LICENSE file

About

ProConnect is a modern, scalable online marketplace connecting clients with service providers (Sellers). Our goal is to create a transparent, secure platform for digital service transactions.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /