Skip to content

A light wight easy to use RESTful apis framework for education & demo purposes. stripped down framework to the fundamental components that that every one would essentially need to (learn / make a demo application).

License

Notifications You must be signed in to change notification settings

ahmedalaahagag/tiny-framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tiny Framework (PHP)

Light weight and easy to use RESTful api framework for education & demo purposes. stripped down to the fundamental components that every one would essentially need to (learn/create a demo application).

Installation Instructions

# Clone tiny-framwork
git clone https://github.com/ahmedalaahagag/tiny-framwork.git

# Cd into the cloned repo
cd tiny-framework

# Run "composer update -o" then "composer du"
composer update -o && composer du

# Run the this command "php -S localhost:8080 -t public/", or change it according to your configuration
php -S localhost:8080 -t public/

# Create a database according to the config file or 
import the given demo user table user.sql in database folder

Features

1 - Service Container.

2 - Routes.

3 - Response (json).

4 - Session Handler.

5 - Database (PDO driver).

6 - Command Line (Symfony Component).

7 - Dependency Injection.

8 - Models / Controllers.

9 - Class Mapping / Reflections.

10 - File Handler.

11 - Api calls

Where to get started

Typically the entry point is public/index.php

creates a new app object

from here you will find the framework bootstrapping

injecting the autoload and calling bootstrap/app.php

form this point on the framework goes into action filling a service container

reading the routes

matching the requested route with the registered then get the controller and the requested function

Commands

  • Create CRUD Controller / Model / Routes
 php tiny crud:make <name>
  • Create Api Call
 php tiny api-call:make <ClassName>

asciicast

Run Unit Tests

cd /path/to/app && run ./vendor/bin/phpunit
# or
cd /path/to/app && composer test

TODOs

  • Add more db drivers
  • Add frontend integration/handling
  • Cover more test cases
  • More Commands (makes it easier to use the framework)
  • Add DB migration files feature

Special Thanks to

Mahmoud Nassar

Mohamed Nagy

Ahmed Jamal

For their support

About

A light wight easy to use RESTful apis framework for education & demo purposes. stripped down framework to the fundamental components that that every one would essentially need to (learn / make a demo application).

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages