Download the PHP package someline/someline-starter-app without Composer

On this page you can find all versions of the php package someline/someline-starter-app. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package someline-starter-app

Someline Starter App PHP Framework

Latest Version on Packagist

Someline Starter is a PHP framework for quick building Web Apps and Restful APIs, with modern design pattern foundation.

It is built on top of popular Laravel 5 framework, Vue.js, Restful API, Repository Design, OAuth2, JWT, Unit Tests, isolated front-end and back-end layer.

Someline Starter is born for two reasons:

  1. Quick application or Restful API starter without the need to build from scratch using Laravel.

  2. Introduce modern design pattern, which have a better foundation when starting, for PHP projects.

See In Action

Someline Starter Demo

Frontend with Vue.js and displaying data via Restful API

Email: [email protected]

Password: Abc12345

See In Video

Watch the video tutorial from below.

YouTube: https://youtu.be/6_lxJNX0Qe0

Framework Overview

Someline Starter is suitable for Restful API oriented projects.

The Restful APIs as a backend layer which provide simple unified interfaces for frontend: Web and Mobile apps.

It utilized Laravel Passport to authenticate protected resources.

It also provides Unit Tests for API testing and framework testing.

It is shipped with Angulr Theme and features in every part that you can easily reference.

It is fully utilised Repository Design pattern.

Out-of-box Components

If you are not familiar with any of these packages, you are recommended to get to know them as they are really helpful when you needed.

Framework

Foundation

Core

Authentication

Theme

Frontend

Get Started

Make sure you have already installed PHP 7.0 and composer.

You can get started either option A or B:

A. Get started via composer

Under working folder, run the command:

A.1. Add to a git repository (When Needed)

Change https://github.com/username/repository-name.git to your own git repository address.

B. Get started via cloning repository

Clone this project to your working folder and open the directory:

B.1. Add to a git repository (When Needed)

Change https://github.com/username/repository-name.git to your own git repository address.

Installation

Development Requirements

Install Essentials

Open someline-starter folder (Optional, run only when you are not inside the project root folder)

All these commands should be executed under the root of someline-starter project

Install composer dependencies

Install npm dependencies

Install bower dependencies

Set-up Laravel, after these commands, please change .env file for your own environment settings

Database & Seeding

You need to create a Database e.g. someline_starter with Encoding utf8mb4 and Collation utf8mb4_unicode_ci.

MySQL Query:

Change database config in .env file to the match the database that your just created.

After having database configuration setup, you can now do migrations and seeding.

Install Laravel Passport with encryption keys to generate secure access tokens.

Ready to go

Until this point, you should be able to visit the home page.

For example, if you have set the domain: http://someline-starter.app/.

Just visit: http://someline-starter.app/

It should prompt you for login, use:

You are free to change the seeding account information from the file: database/seeds/UsersTableSeeder.php

You are done. Yeah!

Explore and start to build on top of it.

Development Process and Flow

Essential Knowledge

You will need to know, read and understand fowllowing before you can start build on top of these.

We recommend use PHPStorm IDE to build and develop your projects.

Namespace

The default namespace for app/ folder is Someline.

It is NOT recommended to change the namespace, if you are not familiar with namespace of Someline Starter as the Someline namespace is used heavily within whole project.

However, you can still change it if you know how what you are doing, because some namespaces required manually changing.

To change namespace to your preference:

BaseClass

In order to ultise all features provided by Someline Starter, you should extended the Class from BaseClass (if there has one), e.g. BasePresenter, BaseController, etc.

Models

All models are located under app/Models/ folder.

User Model under folder app/Models/Foundation/ is created by default with primary key user_id, you should not change this class heavily because it is used almost everywhere within whole project. You can use global function auth_user() to access currently logged in user.

Every model should extend Someline/Models/BaseModel which has a observer Someline/Observers/BaseModelObserver that you can utilize all model events within the Model, e.g. onCreating, onCreated, onUpdating, onDeleting, etc.

When creating new model, you should do it using command to auto generate related Repository classes.

Web Http

All Web related files are located under app/Http/ folder.

Web Routes are defined in file routes/web.php

Web Controllers are defined in folder app/Http/Controllers/

Restful API

All API related files are located under app/Api/ folder.

API Routes are defined in file routes/api.php

API Controllers are defined in folder app/Api/Controllers/

When you create APIs, you need to test them before you can use it. You should test all APIs using Unit Tests provided or create new Unit Tests. Not recommended to test using Browser or Postman, etc.

Repository Pattern

All repository related files are located under app/ with specific types as parent folders.

Repositories: app/Repositories/

Repositories Eloquent: app/Repositories/Eloquent/

Repositories Interface: app/Repositories/Interfaces/

Repositories Criteria: app/Repositories/Criteria/

Presenters: app/Presenters/

Transformers: app/Transformers/

Validators: app/Validators/

Resouces

Angulr Styles and Scripts: resources/assets/angulr/

Angulr with Blade views: resources/views/angulr/

Vuejs: resources/assets/js/

Less styles: resources/assets/less/app.less

Sass styles: resources/assets/sass/app.scss

When made changes in scripts, styles, you will need to run the command.

In development, run:

In production, run:

When you changed theme files, run:

API and Unit Tests

Note:

You may need to change the local service configs under dev environment from config/rest-client.php to fit your local development configurations.

Also change the value of API_TEST_CLIENT_SECRET in .env file to the secret value of Password Grant Client record in oauth_clients table.

Unit Tests: tests/

API Unit Tests: tests/Api/

Debug and Clockwork

View all requests and request information from file storage/clockwork.sqlite

OAuth Web Support

OAuth HTTP URL: http://someline-starter.app/console/oauth

Web Log Viewer

Log Viewer HTTP URL: http://someline-starter.app/console/logs

Database

We recommend to use migrations for database structure and seeding.

Directly changing from database or not follow migrations is strongly NOT recommended.

Flow of creating database migrations:
  1. Create a migration file (Auto generated when use php artisan starter:entity), under folder database/migrations/

  2. Add essential columns to migration file (Auto generated when use php artisan starter:entity):

You are recommended to use tablename_id format as primary incremental key, for example, for table posts, you need to use post_id, and when this become a foreign key, you should keep the same name in other table post_id.

You are also recommended to use the user_id field in all tables, for example, use user_id as staff id instead of staff_id in company_staffs table. If there are no meaning for user_id in certain tables, you should still put user_id field in case for future usage. So, you need to use it smartly to fit your table scenarios accordingly. And, similarly, you may optionally want to add a related_user_id field to indicate certain record is related to a user depends on your own needs.

The following columns are always required by BaseModel:

And remove timestamps():

Finally, the table blue print should be looks like, e.g. in posts table:

  1. Add factory support, under file database/factories/ModelFactory.php

  2. Create seeding support, under folder database/seeds/
Refresh Database Migrations and Seeding

When you added or changed to migrations or seeds files, or you just simply want to refresh everything in database:

License

The Someline Starter framework is open-sourced software licensed under the MIT license.


All versions of someline-starter-app with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.4
dingo/api Version 1.0.x@dev
someline/starter-framework Version 1.3.*
rap2hpoutre/laravel-log-viewer Version ^0.7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package someline/someline-starter-app contains the following files

Loading the files please wait ....