zemit-cms / core
Zemit CMS Core
Fund package maintenance!
jturbide
Installs: 4 087
Dependents: 1
Suggesters: 0
Security: 0
Stars: 13
Watchers: 5
Forks: 3
Open Issues: 1
Requires
- php: >=8.2
- ext-intl: *
- ext-json: *
- ext-mbstring: *
- ext-pdo: *
- ext-phalcon: >=5.7
- ext-sodium: *
- docopt/docopt: ^1.0
- league/flysystem: ^3.27
- league/fractal: ^0.20.1
- phalcon/devtools: ~5.0
- phalcon/incubator-mailer: ^2.0
- vlucas/phpdotenv: ^5.6
Requires (Dev)
- ext-apcu: *
- ext-bcmath: *
- ext-gd: *
- ext-imap: *
- ext-redis: *
- ext-simplexml: *
- ext-sockets: *
- ext-zend-opcache: *
- aws/aws-sdk-php: ^3.300
- google/recaptcha: ^1.3
- joshtronic/php-loremipsum: ^2.1
- league/csv: ^9.15
- league/oauth2-client: ^2.7
- league/oauth2-facebook: ^2.2
- league/oauth2-github: ^3.1
- league/oauth2-google: ^4.0
- league/oauth2-instagram: ^3.1
- league/oauth2-linkedin: ^5.1
- mustache/mustache: ^2.14
- orhanerday/open-ai: ^5.1
- pds/skeleton: ^1.0
- phalcon/ide-stubs: ^5.7
- php-imap/php-imap: ^5.0
- phpspec/phpspec: ^7.5
- phpstan/phpstan: ^1.11
- phpunit/phpunit: ^10.5
- shuchkin/simplexlsxgen: ^1.4
- smarty/smarty: ^4.5
- spatie/array-to-xml: ^3.3
- squizlabs/php_codesniffer: ^3.10
- thiagoalessio/tesseract_ocr: ^2.13
- twig/twig: ^3.10
- xenolope/quahog: ^3.0
Suggests
- ext-apcu: *
- ext-bcmath: *
- ext-gd: *
- ext-imap: *
- ext-redis: *
- ext-simplexml: *
- ext-sockets: *
- ext-zend-opcache: *
- aws/aws-sdk-php: ^3.300
- google/recaptcha: ^1.3
- joshtronic/php-loremipsum: ^2.1
- league/csv: ^9.16
- league/oauth2-client: ^2.7
- league/oauth2-facebook: ^2.2
- league/oauth2-github: ^3.1
- league/oauth2-google: ^4.0
- league/oauth2-instagram: ^3.1
- league/oauth2-linkedin: ^5.1
- mustache/mustache: ^2.14
- orhanerday/open-ai: ^5.1
- php-imap/php-imap: ^5.0
- shuchkin/simplexlsxgen: ^1.4
- smarty/smarty: ^4.4
- spatie/array-to-xml: ^3.2
- thiagoalessio/tesseract_ocr: ^2.13
- twig/twig: ^3.8
- xenolope/quahog: ^3.0
- dev-master
- 1.0.x-dev
- 0.4.x-dev
- 0.4.13
- 0.4.12
- 0.4.11
- 0.4.10
- 0.4.9
- 0.4.8
- 0.4.7
- 0.4.6
- 0.4.5
- 0.4.4
- 0.4.3
- 0.4.2
- 0.4.1
- 0.4.0
- 0.2.3
- 0.1.33
- 0.1.31
- 0.1.30
- 0.1.29
- 0.1.28
- 0.1.27
- 0.1.26
- 0.1.25
- 0.1.24
- 0.1.23
- 0.1.22
- 0.1.21
- 0.1.20
- 0.1.19
- 0.1.18
- 0.1.17
- 0.1.16
- 0.1.15
- 0.1.14
- 0.1.13
- 0.1.12
- 0.1.11
- 0.1.10
- 0.1.9
- 0.1.8
- 0.1.7
- 0.1.6
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- dev-phalcon5
- dev-model-rest-refactor
This package is auto-updated.
Last update: 2024-11-04 16:06:36 UTC
README
Welcome to Zemit Core, an innovative enhancement for the Phalcon PHP Framework designed to supercharge your web development process. Zemit Core is not just an add-on; it's a comprehensive toolset that transforms the way you build and manage web applications.
At its heart, Zemit Core is about simplicity, efficiency, and scalability. Whether you're developing a complex enterprise application or a simple website, Zemit provides a robust, flexible foundation that adapts to your needs. Built on top of Phalcon, one of the fastest PHP frameworks available, Zemit Core leverages its performance while tweaking and existing components and introducing an array of new features and functionalities.
Key Highlights:
- Extensive Service Providers: From authentication to asset management, Zemit Core enriches your development experience with a vast array of customizable service providers and core features.
- Modular Architecture: With base modules like Frontend, CLI, CMS, Admin, Rest and Restful API, Zemit is versatile enough to let you be the maestro of your own architecture and efficiently handle various aspects of web development.
- Enhanced Productivity: By automating common tasks and reducing repetitive coding, Zemit lets you focus on what's unique about your project: the business logic.
- Community Driven: As an open-source project, Zemit is constantly evolving with contributions from a vibrant community of developers.
Whether you're a seasoned Phalcon developer or new to the framework, Zemit Core offers a seamless, intuitive experience, empowering you to create exceptional web applications with speed and ease.
Let's dive in and explore what Zemit Core has in store for your development journey!
Getting Started
Creating a new project using Zemit
If you want to create a new project from scratch, we invite you to visit the Zemit App repository for more informations.
The composer create-project
will be helpful for a brand new project, it will create all the necessary and recommended files and default configurations to save you time and effort.
# Replace <new-project-name> by your project name composer create-project zemit-cms/app <new-project-name>
Adding Zemit to your existing project
The composer require
will be helpful for an existing project.
composer require zemit-cms/core
There you go, you can already start using Zemit classes simply by loading the composer autoloader within your application.
If you want to benefit the full potential of Zemit, you can bootstrap your application using \Zemit\Bootstrap
. Here is a minimalstic example of how to achieve this using \Phalcon\Autoload\Loader
.
// index.php <?php use Phalcon\Autoload\Loader; use Zemit\Bootstrap; $loader = new Loader(); $loader->setFiles(['vendor/autoload.php']); $loader->setNamespaces(['MyApp' => 'src/']); $loader->register(); echo (new Bootstrap())->run();
Configuration
Zemit will automatically look for the .env
from the root of your project. There you can add your own custom variables for your custom application or set the ones that are natively supported by Zemit.
Add the database config, note that we use dotenv to load the .env config. Simply add .env file to the root of your project.
# My App Config MY_APP_VARIABLE="my-app-value" # Example: Database Config DATABASE_HOST=<my-db-host> DATABASE_DBNAME=<my-db-name> DATABASE_USERNAME=<my-db-user> DATABASE_PASSWORD=<my-db-pass>
Initialize Database
We are using phalcon cli to run & generate database migration.
./vendor/bin/phalcon migration run --config=./src/Config/Migration.php --directory=./ --migrations=./src/Migrations/ --no-auto-increment --force --verbose --log-in-db
Serve Application
To use Web MVC modules of Zemit Core locally, you can use PHP's built-in web server, note that this web server is designed to aid application development. It may also be useful for testing purposes or for application demonstrations that are run in controlled environments. It is not intended to be a full-featured web server.
php -S 0.0.0.0:8000 /public/index.php
You should now be able to access Zemit Core Frontend module from http://localhost:8000
This web server runs only one single-threaded process, so PHP applications will stall if a request is blocked. For more information about the CLI SAPI built-in web server, refer to the official documentation: https://www.php.net/manual/en/features.commandline.webserver.php
Full-featured Web Server
If you want to expose the application to the public world wide web, you can use apache, nginx or any similar production ready web servers.
You will need a Web server service to point to the /public/
folder of your new project.
Here is virtual host example using apache 2.4 + php-fpm 8.2 from remi repository on Redhat.
<VirtualHost *:80> ServerName domain.tld ServerAlias www.domain.tld DocumentRoot /mnt/hgfs/dev/zemit/core/public/ <Directory /mnt/hgfs/dev/zemit/core/public/> Options -Indexes +FollowSymLinks +MultiViews AllowOverride All Require all granted </Directory> <FilesMatch \.(php|phar)$> SetHandler "proxy:unix:/var/opt/remi/php82/run/php-fpm/www.sock|fcgi://localhost" </FilesMatch> </VirtualHost> <VirtualHost *:443> ServerName domain.tld ServerAlias www.domain.tld DocumentRoot /mnt/hgfs/dev/zemit/core/public/ <Directory /mnt/hgfs/dev/zemit/core/public/> Options -Indexes +FollowSymLinks +MultiViews AllowOverride All Require all granted </Directory> <FilesMatch \.(php|phar)$> SetHandler "proxy:unix:/var/opt/remi/php82/run/php-fpm/www.sock|fcgi://localhost" </FilesMatch> SetEnv HTTPS on SetEnv HTTP_X_FORWARDED_PROTO https </VirtualHost>
Requirements
Zemit Core is designed to work seamlessly with a specific set of technologies and PHP extensions to ensure optimal performance and functionality.
To check and install the necessary PHP extensions and manage Zemit’s dependencies, use Composer:
composer require zemit-cms/core
This command will automatically verify if your environment meets the requirements for running Zemit Core and install any missing dependencies.
By meeting these requirements, you can ensure a smooth and efficient experience with Zemit Core.
Languages & Compatibilities
Zemit is built to be flexible and powerful, supporting a wide range of technologies and components. While we have certain core requirements, you have the freedom to integrate additional tools as per your project's needs.
- Composer: Required for managing dependencies in Zemit. Composer simplifies the installation and update process of PHP packages, making it a vital tool for managing Zemit’s components.
- PHP >= 8.3: Essential for Zemit, PHP 8.3+ brings modern features and improved performance.
- PhalconPHP >= 5.8.0: Our core framework. Phalcon's efficiency and rich feature set are crucial for Zemit's performance.
- Database Flexibility: While we recommend MySQL >= 8.0 for its robustness, Zemit is compatible with other databases supported by Phalcon. This flexibility allows you to choose the database that best fits your project's requirements.
- PSR Standards: Compliance with PSR standards is mandatory, ensuring interoperability and standard coding practices.
Additionally, while not mandatory, the following are highly recommended for enhancing performance and functionality:
- Redis: Excellent for advanced caching mechanisms, session storage, and more.
- APCu: Useful for opcode caching, reducing runtime for PHP scripts.
- Opcache: Improves PHP performance by storing precompiled script bytecode.
By utilizing these technologies, Zemit offers a scalable, robust platform for developing web applications, giving you the flexibility to tailor the environment to your needs.
Contact Information
Got questions, feedback, or need assistance with Zemit? We're here to help!
- General Inquiries & Live Support: If you have general questions or seek immediate assistance regarding Zemit, feel free to join our vibrant community on Discord. It’s the perfect place for real-time discussions, support, and advice from both the Zemit team and fellow users.
- Community Support: Join our community on GitHub Discussions. It's a great place to seek help, share your Zemit experiences, and connect with fellow users and the development team.
- Issue Reporting: Encounter a bug or have a feature request? Please file a detailed report on our GitHub Issues page.
- Social Media: Follow us on Twitter and Facebook for the latest news, updates, and community discussions.
Your input and interactions are invaluable to Zemit’s ongoing development and success. Don't hesitate to reach out - we're always eager to hear from you!
Contributing
We warmly welcome contributions to the Zemit project! Whether you're skilled in coding, documentation, design, or testing, your input can make a significant difference.
Here are some ways you can contribute:
- Code Contributions: Submit bug fixes, add new features, or enhance existing ones.
- Documentation: Improve or update the documentation to make Zemit more accessible to users.
- Issue Reporting: Report bugs or propose new ideas and enhancements.
- Community Support: Help new users by answering questions on our forums or social media channels.
To get started, please review our CONTRIBUTING.md guide. It covers everything you need to know about contributing to Zemit, including how to submit your changes and our coding standards.
Join us in shaping Zemit into an even more powerful and user-friendly CMS!
License
Zemit is dedicated to open-source and community-driven development, proudly licensed under the BSD 3-Clause License. This license grants you broad freedom to use, modify, and distribute the software, ensuring that Zemit remains a community asset accessible to all.
We respect intellectual property and the efforts of contributors. As such, all use of Zemit should adhere to the conditions outlined in the license.
For the complete terms and conditions of the BSD 3-Clause License, please refer to our LICENSE.txt file.
© 2017-present, Zemit Team. All rights reserved.