GithubHelp home page GithubHelp logo

arout / diamondphp Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 2.0 184.73 MB

Diamond PHP is a fully featured framework built for PHP 7 and offers extreme performance, a modular architecture, elegant syntax and an easy to use philosophy.

License: MIT License

ApacheConf 0.16% PHP 41.48% HTML 15.87% JavaScript 26.60% CSS 8.58% CoffeeScript 0.36% Shell 0.02% Java 0.24% Smarty 6.69% Batchfile 0.01%
php php7 web web-framework web-development web-application-framework php-framework diamond-php web-development-tools

diamondphp's Introduction

DIAMONDPHP

DiamondPHP is a fully featured web development framework built for PHP 7 and offers extreme performance, a modular architecture, elegant syntax and an easy to use philosophy.

PROJECT STATUS

DiamondPHP is currently in BETA stages of development. As such, it is not recommended to use the framework in a production environment yet - there are still bugs needing fixed and a few more features to be added. A production-ready version 1.0.0 is scheduled for public release on September 30, 2017.

PHILOSOPHY & GOALS

Like all frameworks, DiamondPHP strives to simplify and speed up the web development process. Where DiamondPHP deviates from most frameworks is in its emphasis on the developer, by creating an extraordinarily easy to learn and easy to use environment -- without sacrificing performance, features or extensibility. A framework should help a developer by completing common tasks for the developer and providing options for other tasks, but still being perfectly capable of "getting out of the way" when needed. A framework cannot be all things to all people, so it is important to be able to safely work outside the box with minimal fuss when needed. We think that you'll find the blazing fast performance, the ultra-light footprint, the comprehensive feature set and the emphasis on ease of use to be an indispensable new tool in your web development repertoire.

FEATURES

  • PHP 7.0 compliant
  • MVC architecture
  • Pimple Dependency Injection
  • Composer package management
  • Symfony observer/event dispatching
  • Smarty 3 template engine
  • Large collection of custom developer tools (Geolocation, cronjob management, IP white & black listing, text/date/time formatting, and much more)
  • Basic administration panel to build upon and customize
  • Built-in login system & session management
  • Profile create/edit
  • View other member profiles
  • Built-in messaging system
  • Built-in friend management system
  • Responsive theme included with framework

Documentation

Full and comprehensive documentation is currently in development, and is packaged along with the framework. Once the framework is installed, visit http://yoursite.com/documentation.

Requirements

  • Apache Server 2.2+ or Nginx Web Server
  • PHP 7.0 or newer
  • Any PDO compatible database
  • Composer package manager
  • SSH access to your server (optional, but recommended)

Installation

  1. Create an empty database. Using a tool of your choice (phpMyAdmin, SSH, etc), import the diamondphp.sql file located in the /var/install folder.
  2. Upload the diamondphp-master zip file to your installation directory. Using command prompt (Windows) or terminal (OS X / Linux), navigate to the directory where you unpacked the framework. Example: ** cd /var/www/html ** Using Composer, run the command 'composer update'. Get Composer here if you do not already have Composer installed (Composer is required in order to use the framework, and to keep everything up to date): https://getcomposer.org/download/
  3. Open the configuration file, located in the root of your installation directory: .env (rename the included .env.example file to .env)
  4. Enter your database connection settings on lines 4 - 7
  5. Enter your full site URL on line 22 [site_url=""], including protocol (http / https), and append a trailing slash at the end http://www.example.com/
  6. Enter your site or business name on line 23 [site_name = ""]
  7. Enter your site admin / customer care email address on line 25 [site_email = ""]

That's it! If you are installing the framework into a subdirectory, you'll have one more step to complete:

IF YOU ARE INSTALLING IN A SUBDIRECTORY

To complete installation in subdirectory, you will need to also update the RewriteBase rule in the provided .htaccess file in the root directory. Change RewriteBase / to RewriteBase /name-of-your-subdirectory/

The remaining settings are optional to complete, but is highly recommended to go through them and add/edit as necessary.

diamondphp's People

Contributors

arnovr avatar arout avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

arout77 flye32

diamondphp's Issues

Use environment configuration file to populate /app/code/core/config/Config.php

Instead of having a static configuration per project you could make use of an environment file that populates generic Config settings.

Example:
Project A will be released under a different branch name, now you have to clone the repo and commit configuration changes, or adjust them manually. Database credentials is a perfect example.
Using a (generated) environment file you don't have this inside your codebase.

Take a look at: https://github.com/vlucas/phpdotenv.
or, if still alive: https://github.com/hassankhan/config

Make framework code unreachable to clients

At this time, access to the core/module code is mitigated by having an index.html file in each module, but this is far from secure - anyone with knowledge of the project's structure could reach arbitrary files by simply typing their path into the address bar of their browser.

Ideally, this would mean having a separate web root that does not contain any core/module code and/or templates, but instead only contains the index.php file and whatever frontend assets need to be reachable from the client's browser.

declare(strict_types=1); should be declared per file

In https://github.com/arout/diamondphp/blob/master/app/code/core/system/global.php#L6, a global declare(strict_types=1); is called. This command, however, works on a per-file basis and should therefor be the first operation in every single PHP file in the repo to take any effect.

Currently, it only affects calls to methods and functions declared inside app/code/core/system/global.php, but there aren't any there.

For more information, please refer to http://php.net/manual/en/functions.arguments.php#functions.arguments.type-declaration.strict

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.