Microservice APIs in minutes SUPER EASY with GEMVC

Well Documented and Easy to Learn, modern OpenSwoole/Apache/Nginx PHP library/framework to Build professional, High performant, Dockerized and secure Microservice APIs in minutes, not hours.

🎓 Easy
âš¡ Fast
🔒 Secure
🚀 Modern
app/api/User.php

namespace AppApi;

use GemvcCoreApiService;
use GemvcHttpRequest;
use GemvcHttpJsonResponse;
use AppControllerUserController;

// API endpoint is https://yourdomain.com/user/getUsers
class User extends ApiService {
    public function __construct(Request $request) {
        parent::__construct($request);
    }
    
    public function getUsers(): JsonResponse {
        // Check if the user is authenticated 
        // and has the admin role
        if (!$this->request->auth(['admin'])) {
            return $this->request->returnResponse();
        }
        
        return (new UserController($this->request))->list();
    }
}

Core Features

Security by Principle

Built-in JWT authentication, input sanitization, and comprehensive protection against common vulnerabilities.

Super Light

Whole of GEMVC with its dependencies is under 2MB with very low memory footprint and minimal dependencies.

Library & Framework

Use it as a powerful library to modernize legacy projects, or as a complete framework for new applications.

Type-Safe Architecture

Type-Safe from Request to Response lifecycle, in controller, model, and Database.

Webserver Agnostic

Seamlessly switch between OpenSwoole , Apache or Nginx servers! your code works identically on all of them.

Database Abstraction

Type-safe queries, ORM capabilities, and table generation with connection pooling for maximum performance.

Real-time Ready

WebSocket support with Redis scaling for real-time applications and live updates.

Powerful CLI

Project Initialization, DB Migration, and code generation based on your own coding style!

AI Ready

Built-in APIs and interfaces optimized for AI assistant integration and automation.

Ready-to-use Postman Collection

Visit /index/documentation in your project root, download and import JSON file to start testing your APIs.

High Performance

OpenSwoole full support with Redis integration, GEMVC is built for high-traffic demands without code changes.

Straightforward Installation

With help of Composer and Docker, you can install and use GEMVC in your project in seconds.

Ready to Start Your Journey?

Begin with learning GEMVC and become an expert developer to build modern, secure PHP applications!

How To Install

Get GEMVC up and running on your system in minutes

learn how to install gemvc

How To Write CRUD

Learn to create Create, Read, Update and Delete APIs

Learn CRUD

Authentication

How to Authenticate and Authorize API users and requests with built-in JWT token

Setup Auth

API Documentation

How to create and use documentation for your API

View Docs Guide

How to Use CLI

List of CLI commands for GEMVC and how to use them

CLI Reference

API Security

How to secure your APIs against attacks

Security Guide

Best Practices

How to write clean and maintainable code

Best Practices

AI Assistance

How to use the power of AI Assistance like Copilot, Cursor or Gemini

AI Integration

Complex Model

How to create complex models from different tables and relations

Model Guide

Redis

How to implement and use the power of Redis in your project

Redis Guide

Static Test

How to use the power of Static Test PhpStan Level 9 in your project

Testing Guide

do you need frontend for your fantasctical project?

try STCMS! Power of PHP and React under same roof!