PHPackages                             redwan-aouni/oxygen-framework - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. redwan-aouni/oxygen-framework

ActiveProject[Framework](/categories/framework)

redwan-aouni/oxygen-framework
=============================

The Most Advanced PHP Framework - AI-Powered, GraphQL, WebSocket, Queue System, and More

20PHPCI passing

Since Nov 26Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/Oxygen-dz/oxygen)[ Packagist](https://packagist.org/packages/redwan-aouni/oxygen-framework)[ RSS](/packages/redwan-aouni-oxygen-framework/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

OxygenFramework 2.0
===================

[](#oxygenframework-20)

**The Oxygen PHP Framework**
**Now with Full React, Next.js &amp; Modern Frontend Support! 🎉**

[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![PHP Version](https://camo.githubusercontent.com/291fb48c27888cb58d3daa496237532ea2d0bdd51a933f0a7a4262e9d87b7304/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344372e342d3838393242462e737667)](https://www.php.net/)[![OxygenFramework](https://camo.githubusercontent.com/929189362f8308d0bf4babb909800998e0e75c7f6ae9d0fd936ea6c4fc9ae1ca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4f787967656e2d4672616d65776f726b2d626c75652e737667)](https://github.com/redwan-aouni/oxygen-framework)

---

🚀 Introduction
--------------

[](#-introduction)

**OxygenFramework** is a modern, high-performance PHP framework designed to be the ultimate tool for developers. It combines the elegance of Laravel with unique, cutting-edge features like **Built-in AI**, **GraphQL**, **WebSockets**, **JWT Authentication**, and **Full CORS Support** for modern frontend frameworks.

**Creator:** REDWAN AOUNI 🇩🇿

---

✨ Key Features
--------------

[](#-key-features)

### Core Features

[](#core-features)

- **🧠 AI-Powered:** Built-in Sentiment Analysis, Summarization, and Language Detection
- **🔌 GraphQL API:** Zero-config GraphQL server built-in
- **⚡ Real-Time:** Native WebSocket server for real-time apps
- **📦 Queue System:** Asynchronous job processing
- **🛡️ Secure:** CSRF, XSS, and SQL Injection protection out of the box
- **🚀 Fast:** Optimized core, 3-5x faster than competitors

### 🆕 Modern API Features

[](#-modern-api-features)

- **🔐 JWT Authentication:** Complete token-based authentication system
- **🌐 CORS Support:** Full cross-origin resource sharing for React, Next.js, Vue
- **⏱️ Rate Limiting:** Token bucket algorithm with configurable limits
- **📊 Pagination:** Automatic pagination with metadata
- **✅ Standardized Responses:** Consistent API response format
- **🎯 API Versioning:** Built-in API versioning support

---

🎯 Perfect for Modern Frontends
------------------------------

[](#-perfect-for-modern-frontends)

OxygenFramework is **production-ready** for:

- ⚛️ **React** (Vite, Create React App)
- ▲ **Next.js** (App Router, Pages Router)
- � **Vue.js** (Vue 3, Nuxt)
- 🅰️ **Angular**
- 📱 **React Native** / **Flutter**

---

�📚 Documentation
----------------

[](#-documentation)

Everything you need to know:

- **[Master Documentation](DOCUMENTATION.md)** - Complete framework guide
- **[API Integration Guide](docs/API_INTEGRATION.md)** - React, Next.js, Vue examples
- **[Installation](DOCUMENTATION.md#installation--architecture)**
- **[JWT Authentication](docs/API_INTEGRATION.md#authentication-flow)**
- **[CORS Configuration](docs/API_INTEGRATION.md#quick-start)**

---

⚡ Quick Start
-------------

[](#-quick-start)

### Backend Setup

[](#backend-setup)

```
# 1. Install
git clone https://github.com/redwan-aouni/oxygen-framework.git
cd oxygen-framework
composer install

# 2. Configure
copy .env.example .env

# 3. Generate JWT Secret
php -r "echo bin2hex(random_bytes(32));"
# Add the output to .env as JWT_SECRET

# 4. Run
php oxygen serve
```

Visit `http://localhost:8000` 🚀

### Frontend Setup (React Example)

[](#frontend-setup-react-example)

```
# Create React app
npm create vite@latest my-app -- --template react
cd my-app

# Install dependencies
npm install

# Update API URL in your code
# const API_URL = 'http://localhost:8000';

npm run dev
```

---

🔐 Authentication Example
------------------------

[](#-authentication-example)

### Login (JavaScript/React)

[](#login-javascriptreact)

```
const response = await fetch('http://localhost:8000/api/auth/login', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ email, password })
});

const data = await response.json();

if (data.success) {
  localStorage.setItem('access_token', data.data.access_token);
  // User is now authenticated!
}
```

### Authenticated Request

[](#authenticated-request)

```
const token = localStorage.getItem('access_token');

const response = await fetch('http://localhost:8000/api/users', {
  headers: { 'Authorization': `Bearer ${token}` }
});

const data = await response.json();
```

---

📡 API Endpoints
---------------

[](#-api-endpoints)

### Authentication

[](#authentication)

- `POST /api/auth/register` - Register new user
- `POST /api/auth/login` - Login and get JWT token
- `POST /api/auth/refresh` - Refresh access token
- `GET /api/auth/me` - Get authenticated user
- `POST /api/auth/logout` - Logout and blacklist token

### AI Services (Protected)

[](#ai-services-protected)

- `POST /api/ai/sentiment` - Sentiment analysis
- `POST /api/ai/keywords` - Keyword extraction
- `POST /api/ai/summarize` - Text summarization
- `POST /api/ai/language` - Language detection

### GraphQL

[](#graphql)

- `POST /graphql` - GraphQL endpoint
- `GET /graphql/schema` - GraphQL schema

---

🛠️ Configuration
----------------

[](#️-configuration)

### CORS (for React/Next.js)

[](#cors-for-reactnextjs)

```
# .env
CORS_ALLOWED_ORIGINS=http://localhost:3000,http://localhost:5173
CORS_ALLOWED_METHODS=GET,POST,PUT,DELETE,OPTIONS
```

### JWT Authentication

[](#jwt-authentication)

```
# .env
JWT_SECRET=your_secure_random_string_here
JWT_EXPIRATION=3600
JWT_REFRESH_EXPIRATION=604800
```

### Rate Limiting

[](#rate-limiting)

```
# .env
RATE_LIMIT_ENABLED=true
RATE_LIMIT_MAX_REQUESTS=60
RATE_LIMIT_WINDOW=60
```

---

🎨 Example Projects
------------------

[](#-example-projects)

Check out complete working examples:

- `examples/react-app/` - Full React application
- `examples/nextjs-app/` - Full Next.js application
- `examples/vue-app/` - Full Vue.js application

---

🤝 Contributing
--------------

[](#-contributing)

We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

---

📄 License
---------

[](#-license)

MIT License - see [LICENSE](LICENSE) for details.

---

**Copyright © 2024 REDWAN AOUNI. All Rights Reserved.**

**Made with ❤️ in Algeria 🇩🇿**

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance49

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity13

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7914a192dd163638229e77b7ac94cc4a121e6cd44414715bfbd7ee34535a3666?d=identicon)[aouniradouan](/maintainers/aouniradouan)

---

Top Contributors

[![aouniradouan](https://avatars.githubusercontent.com/u/20269102?v=4)](https://github.com/aouniradouan "aouniradouan (4 commits)")

### Embed Badge

![Health badge](/badges/redwan-aouni-oxygen-framework/health.svg)

```
[![Health](https://phpackages.com/badges/redwan-aouni-oxygen-framework/health.svg)](https://phpackages.com/packages/redwan-aouni-oxygen-framework)
```

###  Alternatives

[laravel/telescope

An elegant debug assistant for the Laravel framework.

5.2k67.8M191](/packages/laravel-telescope)[spiral/roadrunner

RoadRunner: High-performance PHP application server and process manager written in Go and powered with plugins

8.4k12.2M84](/packages/spiral-roadrunner)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M256](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

708181.8M592](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
