Welcome To Trishul API!
A Framework for Restful APIs.
Learn More

Why Trishul API?

Trishul API is a PHP Framework for creating restFul APIs.

Lightweight

It is very lightweight and you can make your first endpoint in just less than 10 seconds.

Easy to Implement

Implementation is very easy. Everything is documented. A lot of inbuilt classes and functions are useful for handling the requests and responses.

Fast Coding

You can code faster with this framework. As lot of task is already handled by the Framework.

Features

Trishul API comes with all features of a full fledged framework.

...

Routing

For creating routes
...

Logging

Inbuilt LoggerFactory for logging in application.
...

Middlewares

Acts as request and response interceptors. (AuthMiddleware, LoggingMiddleware)
...

CORS Support

Support for CORS.
...

DI (Dependency Injection)

Automatic Dependency Injection at service layer.
...

Swagger Doc

Automatically Generates Swagger Documentation.

Our Amazing Team

Trishul API is made by these developers.

Shyam Dubey

Shyam Dubey

Founder & Lead Developer

We are inviting developers to use this framework and contribute in developing this framework. We strongly believe that this will be the first choice of all PHP developers when they want to build restFul APIs.

Core Components Overview

Key classes and features of Trishul API Framework

Request.php

Handles incoming HTTP requests. Provides easy access to query parameters, headers, body, cookies, session, and path variables. Used in controllers and middleware to interact with client requests.

Response.php

Manages HTTP responses. Supports setting status codes, headers, cookies, and response bodies. Easily return JSON responses and control output to the client.

App.php

The main entry point of the framework. Bootstraps the application, initializes routing, exception handling, CORS, logging, and Swagger documentation. Configure and start your API here.

Environment.php

Utility class for accessing environment variables from .env files or system environment. Simplifies configuration management for different environments.

HttpStatus.php

Enum listing standard HTTP status codes (e.g., 200, 404, 500). Use for consistent and readable API responses.

Exception Handling

Centralized exception handler (see ExceptionHandler) for catching, logging, and formatting errors in API responses. Ensures robust error management.

LoggerFactory

Provides logging capabilities for your application. Supports info, warning, and error logs, with customizable log directory and daily log rotation.

MiddlewareInterface.php

Interface for creating custom middleware. Allows you to intercept and modify requests and responses (e.g., for authentication, logging, or CORS).

Contact Us

Contact us for any query.

An email is required.