Welcome to BaseAPI, a sleek, flexible, and powerful framework-less PHP API project. Whether you're setting up a small backend service or scaling up to a larger system, BaseAPI is designed to make the process smooth and efficient.
BaseAPI provides seamless integration with NGINX and PHP-Server ensuring your API has a robust and optimized environment to run on.
Effortlessly manage your application's logic and endpoints with our intuitive controllers and routing system.
- Auto-generated OpenAPI documentation based on all your controllers.
- Auto-generate TypeScript models from all controllers and response models, ensuring your frontend and backend remain in sync.
- Define and manage your data structures with our Entities system.
- Keep track and execute migrations with ease using our Migration Tracker.
- Use the Migration Generator to automatically generate migrations based on entity model properties.
- Send instant mails or queue them for later.
- QueueWorker ensures your queued mails are processed efficiently.
- A pre-defined UserModel to kickstart your user management.
- Handle file uploads with ease using our FileModel system.
Bring your API to an international audience with our easy-to-use translation system.
- QueryBuilder for efficient database queries.
- Dependency Injection for better code organization.
- EnvService: Differentiate between Dev, Integration, Staging, and Production systems.
- ParameterTools: Ensure the incoming data is clean and sanitized.
- Profiler: Analyze and optimize your method runtimes.
- MockAPI: Test your controllers with ease.
- DBCache: Store and retrieve serialized data from the database.
- UriService: A helper service for URL construction.
-
Clone the Repository
git clone https://github.com/TimAnthonyAlexander/baseapi.git
-
Set Up Your Environment
EnvService detects the environment. Write your current environment in the ignored config/system.json file.
-
Kickstart Your First Entity
Extend on EntityModel, define your properties, and use the Migration Generator to generate your first migration.
Your contributions are always welcome! Please fork, create a pull request against main.
This project is licensed under the MIT License.