Skip to content

atifsoftware/NovaFlow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

NovaFlow Logo

NovaFlow PHP Framework

Version Downloads License PHP Version

๐Ÿš€ A lightweight, high-performance PHP MVC framework with premium admin panel


โœจ Features

  • MVC Architecture - Clean separation of concerns
  • Dependency Injection - Built-in IoC Container
  • RESTful API - Built-in API controller with JWT support
  • Authentication - Session & JWT based auth
  • Rate Limiting - Built-in brute force protection
  • Query Builder - Secure database operations with PDO
  • Active Record Models - Eloquent-like model support
  • Middleware System - Flexible request filtering
  • CLI Tools - Code generation & database migrations
  • Bilingual Docs - English & Bengali documentation

๐Ÿ“‹ Requirements

  • PHP 8.1 or higher
  • MySQL 5.7+ / MariaDB 10.2+
  • Apache/Nginx with mod_rewrite

๐Ÿ› ๏ธ Installation

Via Composer (Recommended)

composer create-project atifsoftware/novaflow myproject
cd myproject

Manual Installation

# Clone the repository
git clone https://github.com/yourusername/NovaFlow.git myproject
cd myproject

# Install dependencies
composer install

# Configure environment
cp .env.example .env

# Import database
mysql -u root -p novaflow_db < novaflow_db.sql

โš™๏ธ Configuration

Database Setup (.env)

DB_HOST=localhost
DB_NAME=novaflow_db
DB_USER=root
DB_PASS=
DB_DRIVER=pdo

JWT_SECRET=your-secret-key-here
APP_ENV=local

Routes (config/routes.php)

// Simple route
$router->get('/', 'HomeController@index');

// Protected routes
$router->group(['prefix' => 'admin', 'middleware' => 'auth'], function($router) {
    $router->get('/dashboard', 'AdminDashboardController@index');
});

// API routes
$router->group(['prefix' => 'api/v1'], function($router) {
    $router->post('/login', 'AuthApiController@login');
});

๐Ÿ“– Documentation

Quick Examples

Create a Controller

namespace App\Controllers;

use NovaFlow\Core\Controller;

class ProductController extends Controller {
    public function index() {
        $products = ProductModel::all();
        $this->view('products.index', ['products' => $products]);
    }
}

Database Query

use NovaFlow\Core\DB;

// Get all active products
$products = DB::table('products')->where('status', 'active')->get();

// Get single record
$user = DB::table('users')->where('email', $email)->first();

Authentication

use App\Services\AuthService;

$auth = Container::make(AuthService::class);
$result = $auth->login('email', 'password');

if ($result['success']) {
    // Redirect to dashboard
}

// API Login (returns JWT)
$result = $auth->loginApi('email', 'password');
$token = $result['token'];

File Upload

use NovaFlow\Core\UploadHandler;

$upload = new UploadHandler();
$upload->allowedTypes(['image/jpeg', 'image/png'])
       ->maxSize(2097152)
       ->processImage(800, 600, 85);

$result = $upload->upload('avatar');

๐Ÿ—‚๏ธ Project Structure

NovaFlow/
โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ controllers/      # Controllers
โ”‚   โ”œโ”€โ”€ models/          # Database models
โ”‚   โ”œโ”€โ”€ services/        # Business logic
โ”‚   โ”œโ”€โ”€ middleware/      # Request filters
โ”‚   โ”œโ”€โ”€ views/           # Templates
โ”‚   โ””โ”€โ”€ libraries/       # Core classes
โ”œโ”€โ”€ config/              # Configuration
โ”œโ”€โ”€ public/              # Public assets
โ”œโ”€โ”€ storage/             # Logs, cache
โ”œโ”€โ”€ tests/               # Unit tests
โ”œโ”€โ”€ cli.php              # CLI tools
โ””โ”€โ”€ composer.json        # Dependencies

๐Ÿงช Testing

# Run tests
composer test

# Run specific test
./vendor/bin/phpunit tests/Unit/SecurityTest.php

๐Ÿ”ง CLI Commands

# Show help
php cli.php

# System health check
php cli.php --health

# List routes
php cli.php --routes

# Run queue worker
php cli.php --work

๐Ÿค Contributing

Contributions are welcome! Please read our Contributing Guide first.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“ License

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


๐Ÿ™ Acknowledgments

  • Laravel (for inspiration)
  • Bootstrap 5
  • Font Awesome

Made with โค๏ธ by Mohidul Hasan

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors