This repository has been archived by the owner on Oct 14, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
318 changed files
with
582 additions
and
37,823 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
/tmp/ | ||
/files/ | ||
*.key | ||
/index.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,87 @@ | ||
Kwai | ||
==== | ||
Kwai-api | ||
======== | ||
|
||
Kwai is a club/content management system. At the moment it's main focus is a | ||
judo club (kwai means club), but in the future it may be possible to support | ||
Kwai-api is a part of the kwai system. The ultimate goal of Kwai is to manage a (sports)club. The focus is currently on judo sport (Kwai means club in Japanese), but in the future it may be possible to support | ||
other sports. | ||
|
||
High level | ||
========== | ||
|
||
- club website | ||
- news | ||
- events | ||
- information | ||
- membership management | ||
- team management | ||
- team membership management | ||
- training calendar | ||
- absence / presence registration | ||
The frontend of kwai can be found in the [kwai-ui](https://github.com/fbraem/kwai-ui) repository. | ||
|
||
API | ||
=== | ||
Kwai-api is the REST api for Kwai. It's written in PHP and it tries to follow the [JSONAPI](http://jsonapi.org) standard. | ||
|
||
Currently the following api's are already available: | ||
|
||
- news | ||
- pages | ||
- members | ||
- teams | ||
- trainings | ||
|
||
Although there is still a lot to do, kwai is already used in production for our club. | ||
|
||
TODO | ||
==== | ||
|
||
There is still a lot to do: | ||
|
||
- tournament management | ||
- member follow-up system | ||
- events | ||
- ... | ||
|
||
Kwai is already used in production but it is still a work in progress and | ||
contains some club specific data which needs to be standardized... It's usable | ||
but you will need to do some work to adopt it to your club ... | ||
Kwai is currently more CRUD then domain oriented. This api must evolve from an anemic model to real DDD. | ||
|
||
Installation | ||
============ | ||
|
||
Clone this repository and run `composer install` in the `src` as current directory. When all goes well, create a `config.php` in the `api` directory. This PHP file must return an array with some configuration: | ||
|
||
return [ | ||
'database' => [ | ||
'development' => [ | ||
'adapter' => 'mysql', | ||
'host' => '', | ||
'user' => '', | ||
'pass' => '', | ||
'name' => '', | ||
'charset' => 'utf8', | ||
'prefix' => '' | ||
] | ||
], | ||
'default_database' => 'development', | ||
'files' => '', | ||
'oauth2' => [ | ||
'private_key' => 'file:///', | ||
'public_key' => 'file:///', | ||
'encryption_key' => '', | ||
'client' => [ | ||
'name' => '', | ||
'identifier' => '', | ||
'secret' => '', | ||
'redirect' => '' | ||
] | ||
], | ||
'mail' => [ | ||
'host' => '', | ||
'user' => '', | ||
'pass' => '', | ||
'port' => 2525, | ||
'from' => [ ], | ||
'subject' => '' | ||
], | ||
'website' => [ | ||
'url' => '', | ||
'email' => '' | ||
] | ||
]; | ||
|
||
Create a public and private key as explained on [league/oauth2-server](https://oauth2.thephpleague.com/installation/). | ||
|
||
When the configuration is finished, run the database migrations from the `src` directory: | ||
|
||
./vendor/bin/phinx migrate -c phinx.php | ||
|
||
On shared hosting: | ||
|
||
php ./vendor/robmorgan/phinx/phinx.php migrate -c phinx.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
require '../src/vendor/autoload.php'; | ||
|
||
$app = \Core\Clubman::getApplication(); | ||
|
||
$app->group('/team_categories', function () { | ||
$this->get('', \REST\Teams\Actions\TeamCategoryBrowseAction::class) | ||
->setName('team_categories.browse') | ||
->setArgument('auth', true) | ||
; | ||
$this->get('/{id:[0-9]+}', \REST\Teams\Actions\TeamCategoryReadAction::class) | ||
->setName('team_categories.read') | ||
->setArgument('auth', true) | ||
; | ||
$this->post('', \REST\Teams\Actions\TeamCategoryCreateAction::class) | ||
->setName('team_categories.create') | ||
->setArgument('auth', true) | ||
; | ||
$this->patch('/{id:[0-9]+}', \REST\Teams\Actions\TeamCategoryUpdateAction::class) | ||
->setName('team_categories.update') | ||
->setArgument('auth', true) | ||
; | ||
}); | ||
|
||
$app->run(); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.