Skip to main content

The Ultimate Plugin-Based Application Platform - Build modular, scalable applications with ease

Project description

Nexus

PyPI version Python 3.11+ License: MIT CI/CD Documentation Codecov Code style: Black

The Ultimate Plugin-Based Application Platform - Build modular, scalable applications with ease.

Nexus revolutionizes application development by making everything a plugin. Create applications as collections of focused, reusable plugins that work together seamlessly.

โœจ Key Features

  • ๐Ÿ”Œ Pure Plugin Architecture - Every feature is a plugin, ensuring complete modularity
  • ๐Ÿ”ฅ Hot-Reload Support - Add, update, or remove plugins without restarting
  • ๐ŸŽฏ FastAPI Integration - Modern async web framework with automatic OpenAPI docs
  • ๐Ÿ›ก๏ธ Built-in Authentication - JWT-based auth with role-based access control
  • ๐Ÿ“Š Multi-Database Support - SQLAlchemy integration with PostgreSQL, MySQL, SQLite
  • ๐ŸŒ API-First Design - Automatic REST API generation with Swagger UI
  • โšก High Performance - Async/await throughout with optimized request handling
  • ๐Ÿ“ˆ Monitoring & Metrics - Health checks, metrics collection, and observability
  • ๐Ÿ”ง CLI Tools - Powerful command-line interface for development and deployment

๐Ÿš€ Quick Start

Installation

pip install nexus-platform

Create Your First Application

from nexus import create_nexus_app

app = create_nexus_app(
    title="My App",
    description="Built with Nexus",
    version="1.0.0"
)

if __name__ == "__main__":
    import uvicorn
    uvicorn.run(app, host="0.0.0.0", port=8000)

Your application runs at http://localhost:8000 with:

  • API Docs: http://localhost:8000/docs
  • Health Check: http://localhost:8000/health

Create Your First Plugin

nexus plugin create my_plugin
from nexus import BasePlugin
from fastapi import APIRouter

class MyPlugin(BasePlugin):
    def __init__(self):
        super().__init__()
        self.name = "my_plugin"
        self.version = "1.0.0"

    async def initialize(self) -> bool:
        self.logger.info("Plugin initialized!")
        return True

    def get_api_routes(self):
        router = APIRouter(prefix="/my-plugin", tags=["my-plugin"])

        @router.get("/")
        async def get_info():
            return {"plugin": self.name, "status": "active"}

        return [router]

def create_plugin():
    return MyPlugin()

๐Ÿ“š Documentation

๐Ÿš€ Getting Started

๐Ÿ—๏ธ Architecture & Development

๐Ÿ“š Complete Documentation

๐Ÿ—๏ธ Architecture

graph TD
    A[Nexus App] --> B[Plugin Manager]
    A --> C[Event Bus]
    A --> D[Service Registry]
    A --> E[FastAPI Core]

    B --> F[Plugin 1]
    B --> G[Plugin 2]
    B --> H[Plugin N...]

    F --> C
    G --> C
    H --> C

    F --> D
    G --> D
    H --> D

๐Ÿ”ง CLI Tools

# Application management
nexus run --host 0.0.0.0 --port 8000
nexus init
nexus status
nexus health

# Plugin management
nexus plugin create <name>
nexus plugin list
nexus plugin info <name>

# Admin tools
nexus-admin system info
nexus-admin user create <username>
nexus-admin plugin status

๐Ÿ“ Project Structure

my-nexus-app/
โ”œโ”€โ”€ main.py                    # Application entry point
โ”œโ”€โ”€ nexus_config.yaml          # Configuration file
โ”œโ”€โ”€ nexus/                     # Nexus framework core
โ”œโ”€โ”€ plugins/                   # Plugin directory
โ”œโ”€โ”€ plugin_template/           # Plugin development template
โ”œโ”€โ”€ config/                    # Configuration files
โ””โ”€โ”€ pyproject.toml            # Package configuration

๐ŸŒŸ Core Components

Plugin Manager

Handles plugin lifecycle, loading, and dependency management with hot-reload support.

Event Bus

Asynchronous publish-subscribe system for loose coupling between plugins.

Service Registry

Dependency injection container for sharing services between plugins.

Authentication Manager

JWT-based authentication with role-based access control.

Database Adapter

Multi-database support with connection pooling and transaction management.

๐Ÿค Contributing

We welcome contributions! Here's how to get started:

Development Setup

# Clone repository
git clone https://github.com/dnviti/nexus-platform.git
cd nexus

# Set up development environment
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Install dependencies
poetry install --with dev,test

# Set up git hooks for quality assurance (RECOMMENDED)
python scripts/pre_push_check.py

# Verify setup
python scripts/test_ci_locally.py --fast

Quality Assurance

โš ๏ธ IMPORTANT: Contributors should use git hooks to ensure code quality and reduce CI failures.

Automatic Setup (Recommended):

python scripts/pre_push_check.py  # Sets up pre-commit hooks automatically

Manual Setup:

git config core.hooksPath .githooks
chmod +x .githooks/*

What the hooks validate on each commit:

  • โœ… Code formatting (Black)
  • โœ… Import sorting (isort)
  • โœ… Linting (Flake8)
  • โœ… Type checking (MyPy)
  • โœ… Security scanning (Bandit)
  • โœ… Full test suite (496 unit + 16 integration tests)
  • โœ… Code coverage analysis
  • โœ… Build validation

Development Workflow

# Quick development validation
python scripts/pre_push_check.py --fast

# Make changes, then commit (triggers full validation)
git add .
git commit -m "Your meaningful commit message"

# Push after successful validation
git push

Note: Git hooks ensure every commit meets the same quality standards as our CI pipeline, significantly reducing development friction and CI failures.

See .githooks/README.md for detailed hook documentation.

๐Ÿ“„ License

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

๐Ÿ”— Links

๐Ÿ™ Acknowledgments


Made with โค๏ธ by the Nexus Team

Start building your next great application with Nexus today!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nexus_platform-0.1.5.tar.gz (599.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nexus_platform-0.1.5-py3-none-any.whl (72.0 kB view details)

Uploaded Python 3

File details

Details for the file nexus_platform-0.1.5.tar.gz.

File metadata

  • Download URL: nexus_platform-0.1.5.tar.gz
  • Upload date:
  • Size: 599.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nexus_platform-0.1.5.tar.gz
Algorithm Hash digest
SHA256 3567aa1b1fd05a4687986336bac1995d8f6b75b1e6670a5c875c99c177f2e742
MD5 54c5d80b907079656c461b5f63f7da84
BLAKE2b-256 4f466c41dd971b0ece182a4bd0b4aa7a4e8756dcfd21fa442e5fc28ed56a82ff

See more details on using hashes here.

File details

Details for the file nexus_platform-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: nexus_platform-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 72.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nexus_platform-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6f37e29875960bb4fd7c713bda9e95822a98c43b4eb691723701ab0f31ef259f
MD5 a70b4935ed45c68d096c6ba94eec0dd2
BLAKE2b-256 b7cb4bffbcb07ea6cd05f625c119fdc8520e6f2a45406598f3891d880dd3e15e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page