Skip to content

ZELARIXA/API-R3L

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

168 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raol APIs

Raol APIs Logo

Simple and easy to use API.

Version Node.js License Status

Table of Contents

Installation

Prerequisites

  • Node.js >= 18.0.0
  • npm or yarn package manager

Clone the Repository

git clone https://github.com/raolbyte/Raol-UI.git
cd Raol-UI

Install Dependencies

npm install

Environment Setup

Create a .env file in the root directory (optional):

PORT=3000
NODE_ENV=production

Quick Start

Development Mode

npm start

Production Mode

npm run build
npm run production

The server will start on port 3000 (or the port specified in your environment variables).

Configuration

Settings.json Structure

The src/settings.json file controls all aspects of your API service:

{
  "name": "Raol Api'S",
  "version": "v5.1.1",
  "description": "Experience the next generation of API documentation...",
  "maintenance": {
    "enabled": false
  },
  "bannerImage": "/src/banner.jpg",
  "previewImage": "/src/preview.png",
  "header": {
    "status": "Online"
  },
  "apiSettings": {
    "creator": "RaolByte",
    "requireApikey": false,
    "apikey": {
      "your-api-key": {
        "rateLimit": "5000/day",
        "enabled": true
      }
    }
  },
  "categories": [
    {
      "name": "Category Name",
      "items": [
        {
          "name": "API Endpoint Name",
          "desc": "Description of the endpoint",
          "path": "/endpoint/path",
          "status": "ready",
          "params": {
            "param1": "Parameter description"
          }
        }
      ]
    }
  ]
}

Configuration Options

Basic Settings

  • name - Your API service name
  • version - Current version number
  • description - Brief description of your service
  • bannerImage - Path to banner image
  • previewImage - Path to preview image

Maintenance Mode

"maintenance": {
  "enabled": true
}

API Settings

"apiSettings": {
  "creator": "Your Team Name",
  "requireApikey": false,
  "apikey": {
    "api-key-name": {
      "rateLimit": "5000/day",
      "enabled": true
    }
  }
}

Rate Limit Formats

  • "unlimited" - No rate limiting
  • "100/minute" - 100 requests per minute
  • "1000/hour" - 1000 requests per hour
  • "5000/day" - 5000 requests per day

API Key Management

Enabling API Key Authentication

Set requireApikey to true in your settings.json:

"apiSettings": {
  "requireApikey": true,
  "apikey": {
    "your-secret-key": {
      "rateLimit": "1000/day",
      "enabled": true
    }
  }
}

Using API Keys

When API keys are required, include them in your requests:

curl "http://localhost:3000/ai/luminai?text=Hello&apikey=your-secret-key"

API Key Responses

No API Key Provided (when required)

{
  "status": false,
  "creator": "RaolByte",
  "error": "API key required",
  "message": "Please provide a valid API key in the query parameters"
}

Invalid API Key

{
  "status": false,
  "creator": "RaolByte",
  "error": "Invalid API key",
  "message": "The provided API key is not valid or does not exist"
}

Rate Limiting

Global Rate Limiting

  • Default: 50 requests per minute per IP
  • Window: 1 minute
  • Bypass: When requireApikey is false, API endpoints bypass global rate limiting

API Key Rate Limiting

  • Configurable per key
  • Formats: unlimited, 100/minute, 1000/hour, 5000/day
  • Tracking: Per API key, not per IP

Rate Limit Responses

Global Rate Limit Exceeded

{
  "status": false,
  "creator": "RaolByte",
  "error": "Rate limit exceeded",
  "message": "You have exceeded the rate limit for this API key"
}

Maintenance Mode

Enable maintenance mode to temporarily disable API access:

"maintenance": {
  "enabled": true
}

Maintenance Mode Behavior

  • API Endpoints: Return 503 status with maintenance message
  • Documentation: Shows maintenance page
  • Bypass Paths: /api/settings, /assets/, /src/, /support

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support


Made with ❤️ by RaolByte

⭐ Star this repo🐛 Report Bug💡 Request Feature

About

Simple and easy to use API. ⭐️ Star to support our work!

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • HTML 56.7%
  • JavaScript 27.7%
  • CSS 15.6%