Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Backend for Tech Discovery Platform, providing secure APIs, Firebase-based authentication, Stripe payments, MongoDB data storage, and role-based access. Features product moderation, review system, coupon management, reporting, newsletter, and admin dashboard analytics.

Notifications You must be signed in to change notification settings

Hossahin/apporbit-server

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tech Discovery Platform – Server

This is the backend server for the AppOrbit Platform. It provides secure APIs, user authentication, product moderation, and payment processing.


Features

  • Firebase Admin SDK for user authentication
  • Stripe integration for payments
  • MongoDB for data storage (users, products, reviews, etc.)
  • CORS-enabled RESTful API using Express
  • Environment variable support with dotenv

Technologies Used

  • Express – Server-side routing and API handling
  • MongoDB – NoSQL database for app data
  • Firebase Admin SDK – Authentication and role-based access
  • Stripe – Secure payment processing
  • dotenv – Manage environment configuration
  • cors – Enable cross-origin requests from frontend

API Endpoints

User Related

Method Endpoint Middleware Description
POST /userInfo None Register a new user
GET /users/role/:email verifyJWT Get role of a user
GET /userInfo/:email verifyJWT Get user info by email
PATCH /postLimit/:email verifyJWT Decrement user post limit
GET /manage-users verifyJWT, verifyAdmin Get all users (admin only)
PATCH /status-update/:id verifyJWT, verifyAdmin Update user role

Product Related

Method Endpoint Middleware Description
GET /pending-products verifyJWT, verifyModerator Get pending products for review
POST /productInfo verifyJWT Submit a new product
GET /products/search None Search products with pagination
DELETE /product-delete/:id verifyJWT Delete a product
GET /my-products verifyJWT Get products submitted by user
GET /product None Get paginated list of accepted products
GET /product-details/:id verifyJWT Get product details by ID
GET /feature-product None Get featured products
GET /trending-products None Get trending products
PUT /vote-product/:id None Vote/upvote a product
PUT /product-update/:id verifyJWT Update product info
PATCH /product-status-update/:id verifyJWT, verifyModerator Update product status (Accept/Reject/Feature)

Review Related

Method Endpoint Middleware Description
GET /product-review None Get all product reviews
GET /product-review/:id verifyJWT Get reviews for a product
POST /product-review verifyJWT Submit a product review

Coupon Related

Method Endpoint Middleware Description
GET /coupon None Get all coupons
PUT /coupon/:id verifyJWT, verifyAdmin Update a coupon
GET /coupon/:id verifyJWT, verifyAdmin Get coupon by ID
POST /coupon verifyJWT, verifyAdmin Create a new coupon
DELETE /coupon/:id verifyJWT, verifyAdmin Delete a coupon

Report Related

Method Endpoint Middleware Description
GET /reported-contents verifyJWT, verifyModerator Get reported content
PUT /reported-contents/:id verifyJWT Report a product

Payment Related

Method Endpoint Middleware Description
POST /create-payment-intent verifyJWT Create Stripe payment intent
POST /payments verifyJWT Record completed payment

Newsletter Related

Method Endpoint Middleware Description
POST /subscribenewsletter None Subscribe to newsletter

Dashboard Summary

Method Endpoint Middleware Description
GET /dashboard/summary verifyJWT, verifyAdmin Get admin dashboard summary

🛠️ Local Setup Guide

Follow these steps to run the project locally:


1️⃣ Clone the Repository

git clone https://github.com/Hossahin/apporbit-server.git

2️⃣ Navigate to the Project Directory

cd apporbit-server

3️⃣ Install Dependencies

npm install

4️⃣ Set Up Environment Variables

Create a .env file in the root directory and add the following:

DB_USER=your_database_username
DB_PASS=your_database_password

FIREBASE_SERVICE_KEY=your_firebase_key //base64

5️⃣ Start the server with:

nodemon index.js

6️⃣ Open the App in Browser

Visit the local server:

🌐 http://localhost:3000


About

Backend for Tech Discovery Platform, providing secure APIs, Firebase-based authentication, Stripe payments, MongoDB data storage, and role-based access. Features product moderation, review system, coupon management, reporting, newsletter, and admin dashboard analytics.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.