Download the PHP package gemvc/installer without Composer
On this page you can find all versions of the php package gemvc/installer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gemvc/installer
More information about gemvc/installer
Files in gemvc/installer
Package installer
Short Description Super light Framework based on Gemvc Library
License Apache-2.0
Informations about the package installer
geminstaller
installer package for gemvc framework
Overview
GEMVC Framework is built on top of GEMVC Library (v3.27.8), providing a structured approach to building microservice-based RESTful APIs. The framework adds additional features and conventions on top of the library's core functionality.
AI Assistant Learning Process (RESTRICTED - HIGH IMPORTANCE)
For AI assistants, the following learning process is mandatory and must be followed in strict order:
-
Study Working Examples (First Priority)
- Location:
/app
folder - Purpose: Understand real-world implementation patterns
- Files to study:
/app/api/*.php
- API service implementations/app/controller/*.php
- Controller implementations/app/model/*.php
- Model implementations/app/table/*.php
- Table implementations
- Focus: Learn from existing working code before attempting any implementation
- Location:
-
Read Framework Documentation
- Location:
README.md
(this file) - Purpose: Understand framework structure and basic concepts
- Focus: Framework overview, installation, and basic usage
- Location:
-
Study AI Assistant Rules
- Location:
GEMVCAIAssistantRules.json
- Purpose: Understand framework-specific guidelines
- Focus: Rules, conventions, and best practices
- Location:
- Framework and Library Documentation
- Location:
/vendor/gemvc/framework/Documentation.md
/vendor/gemvc/library/Documentation.md
- Purpose: Deep understanding of framework and library capabilities
- Focus: Detailed technical documentation
- Location:
Important Restrictions for AI Assistants
- Must follow the learning process in strict order
- No implementation attempts before understanding working examples
- All implementations must be verified against existing examples
- Must follow established patterns strictly
- Must respect framework conventions
Installation
Framework Structure
Core Components
All core framework components are located in the Gemvc\Core
namespace:
Namespace Structure
Application Structure
The framework follows a layered architecture pattern:
Layer Responsibilities
-
API Layer (
/app/api
):- Handles HTTP requests and responses
- Validates input data
- Routes requests to appropriate controllers
- Implements API documentation
-
Controller Layer (
/app/controller
):- Contains business logic
- Processes validated requests
- Interacts with models
- Returns processed results
-
Model Layer (
/app/model
):- Defines data structures
- Extends (inherit) from its relevant table layer file example: TodoModel extends TodoTable
- Allways must call parent::__construct(); in its constructor
- must not use CRUDTable or Table , because its parent already extended from Table or CRUDTable!
- Implements data validation rules
- Handles data relationships
- Table Layer (
/app/table
):- Manages database operations
- Allways Extend (inherit) from Table OR CRUDTable example : TodoTable extends CRUDTable
- Allways must call parent::__construct(); in its constructor
- Implements CRUD operations
- Handles database relationships
Environment Configuration
The framework uses Symfony's Dotenv component for environment management:
Important Notes
- Always use
Gemvc\Core\Auth
for authentication (notGemvc\Auth\Auth
) - Core components are in the
Core
namespace - HTTP components are in the
Http
namespace - Database components are in the
Database
namespace - When manually setting POST parameters, use array syntax:
$request->post['key'] = $value
(notsetPost()
method) - Auth token user ID is accessed via
$auth->token->user_id
(not$auth->token->id
) - For string validation with length constraints, use
validateStringPosts()
with format:['field'=>'min|max']
- For email validation, use
validatePosts()
with format:['email'=>'email']
- The Auth class automatically handles invalid tokens by returning a 403 response and stopping execution
Input Validation Best Practices
The framework provides different validation methods for different types of input:
Authentication
Basic Validation
String Length Validation
Validation Flow
- Always validate authentication first - Auth class will handle invalid tokens automatically
- Validate input before processing
- Use appropriate validation method based on input type
- Set additional parameters after validation
- Pass validated request to controller
Example of a secure endpoint:
Documentation
The complete API documentation for your application is available at:
This documentation is automatically generated from your code's PHPDoc comments and mock responses.
Database Setup
Create the users table with the following structure:
API Documentation Generation
Mock Response System
The GEMVC Framework includes an automatic API documentation generation system using the mockResponse
static method. This feature helps maintain accurate and up-to-date API documentation.
How to Implement
- Add a static
mockResponse
method to your API service class:
Response Structure
Your mock responses should follow this structure:
Best Practices
- Always include the
@hidden
annotation to mark the method as internal - Provide realistic example data that matches your actual response structure
- Include all possible response variations (success, error cases)
- Keep the example data up to date with your actual API responses
- Use proper type hints and return type declarations
Example
AI Assistant Support
The GEMVC Framework includes comprehensive AI Assistant rules to ensure consistent and secure development assistance. These rules are defined in GEMVCAIAssistantRules.json
and cover:
Key AI Assistant Guidelines
-
Core Principles
- Security-first approach
- Strict type safety (PHPStan level 9)
- Respect for layered architecture
- Framework convention adherence
-
Architecture Understanding
- Layer-specific responsibilities
- Proper inheritance requirements
- Access control between layers
- Component relationships
-
Security Enforcement
- Authentication patterns
- Input validation methods
- Parameter handling
- Token validation
- Response Standards
- Consistent response formats
- HTTP status code mapping
- Error handling patterns
AI Assistant Resources
The framework provides several resources to support AI-assisted development:
-
Framework AI Assist
- Location:
vendor/gemvc/framework/GEMVCFrameworkAIAssist.jsonc
- Purpose: Framework-specific AI assistance rules
- Features: Architecture patterns, security rules, best practices
- Location:
-
Library AI Assist
- Location:
vendor/gemvc/library/AIAssist.jsonc
- Purpose: Core library AI assistance rules
- Features: Component usage, error handling, security patterns
- Location:
- API References
- Framework:
vendor/gemvc/framework/GEMVCFrameworkAPIReference.json
- Library:
vendor/gemvc/library/GEMVCLibraryAPIReference.json
- Purpose: Detailed API documentation for AI assistance
- Framework:
AI Assistant Best Practices
When working with AI assistants, follow these guidelines:
-
Code Generation
- Always verify generated code against framework rules
- Ensure proper layer separation
- Validate security implementations
- Check type safety compliance
-
Documentation
- Use PHPDoc comments for all public methods
- Include mock responses for API endpoints
- Provide clear examples in comments
- Follow framework documentation standards
- Security
- Verify authentication implementations
- Validate input handling
- Check parameter setting methods
- Ensure proper error responses
IMPORTANT Resources
- GEMVC Framework Documentation
- GEMVC Framework API Reference
- GEMVC Framework AI Assist
- GEMVC Library Documentation
- GEMVC Library API Reference
- GEMVC Library AI Assist
- GEMVC AI Assistant Rules