• React
  • ReactTrace Backend — A Node.js & TypeScript API with Express handling user access control, Stripe checkout integration, currency detection by IP, and Supabase database management.

    🧠 ReactTrace

    📋 Project Overview

    ReactTrace Backend is a Node.js application built with Express and TypeScript that provides APIs for user access control, Stripe checkout integration, currency detection by IP, and Supabase database management.


    🚧 Project Status

    This project is currently under development. Core features like user access verification, Stripe checkout session creation, webhook handling, and currency detection are implemented. Upcoming improvements include validation, testing, and security enhancements.


    ✨ Features

    🔒 User Access Control: Check paid access by email.
    💳 Stripe Checkout Integration: Dynamic session creation per currency.
    🌍 Currency Detection: Determines user currency based on IP address.
    🔔 Stripe Webhook Handling: Secure processing of Stripe payment events.
    🛠️ Supabase Integration: Manages user data and payments.
    📜 TypeScript: Strong typing for better code quality.


    🛠️ Technologies Used

    • 🚀 Express (API framework)
    • 📜 TypeScript
    • 🔐 Helmet (security middleware)
    • 💳 Stripe (payment processing)
    • 🛰️ Supabase (database and authentication)
    • 🌐 geoip-lite (IP geolocation)
    • 🍃 Cors (CORS middleware)
    • 🧹 ESLint + Prettier (code quality tools)

    ⚙️ Installation & Setup

    Prerequisites

    • Node.js v16 or higher
    • npm or yarn

    Steps

    1. Clone the repository:

      git clone https://github.com/your-username/ReactTrace-backend.git
      cd ReactTrace-backend
    2. Install dependencies:

      npm install
      # or
      yarn install
    3. Set environment variables:

      Create a .env.local file in the root with:

      PORT=3000
      HOST=localhost
      NEXT_PUBLIC_SUPABASE_URL=your_supabase_url
      NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
      NEXT_SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
      FRONTEND_URL=http://localhost:3000
      BACKEND_URL=http://localhost:3001
      STRIPE_SECRET_KEY=your_stripe_secret_key
      STRIPE_PRICE_ID_BRL=price_id_brl
      STRIPE_PRICE_ID_USD=price_id_usd
      STRIPE_PRICE_ID_EUR=price_id_eur
      STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret
      GEO_API_KEY=your_geo_api_key_if_any
    4. Run the development server:

      npm run dev
      # or
      yarn dev
    5. Open http://localhost:3000 in your browser to access the API.

    Github: https://github.com/Steph7478/React-Trace-Backend

    Để lại một bình luận

    Email của bạn sẽ không được hiển thị công khai. Các trường bắt buộc được đánh dấu *

    2 mins