WP Manifestindependent plugin directory
manifest / integrations / custom-api

Custom API for React Native

✅ Authentification JWT + OTP ✅ Gestion complète du profil utilisateur ✅ Intégration WooCommerce (produits, commandes) ✅ Webhooks, rate-limiting, soft delete 📥 Téléchargez `custom-api-1.0.0.zip` pour installer directement dans WordPress

by Stérel OBAME · github.com/sterel-obame/custom-api · website

1stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/sterel-obame/custom-api/archive/refs/heads/main.zip

🌐 Custom API for React Native + WooCommerce

Secure WordPress REST API plugin for mobile apps (React Native / Expo) with JWT authentication, user management, and WooCommerce integration.

✨ Features

  • 🔐 JWT Authentication (login, register, refresh, logout)
  • 📱 OTP Password Reset (6-digit code via email)
  • 👤 User Profile Management (first_name, last_name, phone, address, avatar upload)
  • 🛒 WooCommerce Integration:
    • List products (with search, filters, pagination)
    • Create orders (with stock validation)
    • Get user orders history
  • 🔔 Webhooks for order events (pending, processing, completed)
  • 🛡️ Security:
    • Rate limiting (5 attempts / 15 min)
    • Input validation
    • Soft delete (no data loss)
  • 🧪 Full Postman Collection included

🚀 Endpoints

Auth

  • POST /register
  • POST /login
  • POST /forgot-password → sends OTP
  • POST /reset-password → with OTP
  • POST /refresh
  • POST /logout

User

  • GET /me
  • PUT /me
  • DELETE /me (soft delete)
  • POST /upload-avatar
  • GET /users (admin-only in prod)

WooCommerce

  • GET /products (with ?search=, ?category_id=, ?min_price=, etc.)
  • POST /create-order
  • GET /orders
  • GET /categories

Webhooks

  • POST /webhook-test (dev only)
  • POST /webhook-receive (dev only)

⚙️ Installation

  1. Place this plugin in wp-content/plugins/custom-api/
  2. Activate in WordPress admin
  3. Ensure WooCommerce is active
  4. Set JWT_SECRET_KEY in wp-config.php:
    
    define('JWT_SECRET_KEY', 'your-32-char-secret-here');