CodKep - lightweight web framework
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
EXAMPLE Remplace README.txt to README.md Jan 18, 2019
ckeditor Updated jQuery and CKEditor Oct 30, 2018
doc Doc fixes, adds logo to readme Jan 18, 2019
images Add medium sized logo image Jan 18, 2019
tools First codkep github commit with version: 1.035 Oct 27, 2017
LICENSE.txt Added LICENSE.txt file Oct 27, 2017
PORTING.txt Improve client address calculation Jan 4, 2019
README.md Add medium sized logo image Jan 18, 2019
activity.css Adds simplified database manipulation interface Jan 17, 2019
activity.php Makes poll view generation code works with callbacks Jan 18, 2019
ckcomm.css Adds DynTable class Oct 12, 2018
core.js Turn off browser ajax cache. Nov 5, 2018
core.php Improve client address calculation Jan 4, 2019
debug.php Makes array referencing unified Dec 18, 2018
doc.php Makes array referencing unified Dec 18, 2018
file.php Makes array referencing unified Dec 18, 2018
flex.css First codkep github commit with version: 1.035 Oct 27, 2017
flex.php Makes array referencing unified Dec 18, 2018
flex_colors.css First codkep github commit with version: 1.035 Oct 27, 2017
forms.php Makes array referencing unified Dec 18, 2018
index.php Add medium sized logo image Jan 18, 2019
jquery.js Updated jQuery and CKEditor Oct 30, 2018
modules.php Added activity module with commenting Nov 17, 2017
node.php Makes array referencing unified Dec 18, 2018
page.php Makes array referencing unified Dec 18, 2018
sfbuilder.js Turn off browser ajax cache. Nov 5, 2018
sfbuilder.php Makes array referencing unified Dec 18, 2018
sql.php Adds simplified database manipulation interface Jan 17, 2019
user.php Add some more authentication event hook Jan 14, 2019

README.md

CodKep Logo

CodKep - Lightweight web framework

CodKep is a lightweight web framework written in PHP. It has a modular design and use hook system for easy extend the core functions. Although the working of base api was inspired by the Drupal CMS (version 7), the CodKep does not contains or use any codes from Drupal, it's built on own codebase. (Written from scratch) It's designed to build very database active sites, so it has a rich set of form generation tools.

Install on bare machine

Note: The github repository contains the "sys" directory.

Steps to install

#Step 1: The CodKep needs a php enabled webserver to run.

$ sudo apt-get install -y apache2 libapache2-mod-php php-gd php-mysql php-pgsql php-apcu
$ sudo a2enmod rewrite 
$ cd /var/www/html

#Step 2: Copy the CodKep files in the webserver root's "sys" directory:

/var/www/html$ git clone https://github.com/hyper-prog/codkep.git sys

#Step 3: Make a symlink to sys/index.php

/var/www/html$ ln -s sys/index.php index.php

In case the php is enabled you shoud see the CodKep's open page in your browser. The documentation is also available there.

Docker images

Available with Debian and Apline linux with apache webserver on: Docker hub:

Downloadable (pullable) image names:

hyperprog/codkepdebian
hyperprog/codkepalpine

To run a pure CodKep container and expose to port 80 (For example to read the newest documentation)

$ docker run -t -p 80:80 hyperprog/codkepalpine

Settings for webservers

NGINX config sample with cleanurl support:

server {
    listen 80;
    listen [::]:80;

    server_name sandbox.example.com;

    root /var/www/mypage;
    index index.php;

    location / {
        try_files $uri @rewrite;
    }

    location @rewrite {
        rewrite ^ /index.php;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        # For php5:
        #fastcgi_pass unix:/var/run/php5-fpm.sock;
        # For php7:
        fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
    }
}

Apache 2.X config with cleanurl

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName sandbox.example.com
    DocumentRoot /var/www/mypage
    <Directory /var/www/mypage/>
        DirectoryIndex index.php
        AllowOverride None
        Options -Indexes +FollowSymLinks

        #On apache 2.2
         Order allow,deny
         allow from all
        #On apache 2.4
         Require all granted

        RewriteEngine on
        RewriteBase /
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ index.php [L]
    </Directory>
</VirtualHost>

If you use apache you can put the rewrite rules into .htaccess file:

DirectoryIndex index.php
Options -Indexes

RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L]