This tool should help with the registration for the ICCM conferences.
This software is written in Laravel. The long-term goal is to have a client written separately, that communicates with this backend.
A basic API is now availble providing the following endpoints:
/api/users
/api/groups
/api/postregistrations
The API is protected by a token, which is generated on login after the user has been authenticated using /api/auth
.
A new user can be registered by sending a POST request to /api/users/register
.
A full documentation with examples and test UI of the API can be found at /api/documentation
. It was created with the help of L5 Swagger using the OpenAPI 3.0 standard. Documentation is generated automatically from the code using annotations.
Run php artisan l5-swagger:generate
or composer generate-docs
to generate or update the documentation.
To setup a local development environment with sample data, run these commands:
git clone https://github.com/iccm-africa/iccm-backend.git
cd iccm-backend
composer install --no-dev
cp .env.example .env
# TODO: edit .env and set your database credentials etc.
# set unique application key
php artisan key:generate
# initialise the database
php artisan migrate
# load sample data
mysql -u <username> <dbname> -p < database/database-example.sql
mysql -u <username> <dbname> -p < database/payment-methods.sql
# update the admin user with email address and valid password
php artisan tinker --execute="\$user = User::where('name', 'admin')->first();\$user->password = Hash::make('NOT_TopSecret1234');\$user->email = 'admin@example.org';\$user->save();"
php artisan serve
Prerequisites: Docker and ddev installed (see: https://ddev.readthedocs.io/en/latest/users/install/ddev-installation/).
ddev start
ddev composer install --no-dev
cp .env.example .env
# TODO: edit .env and set your database to use ddev default config.
ddev artisan key:generate
ddev artisan migrate
ddev mysql < database/database-example.sql
ddev mysql < database/payment-methods.sql
ddev artisan tinker --execute="\$user = User::where('name', 'admin')->first();\$user->password = Hash::make('NOT_TopSecret1234');\$user->email = 'admin@example.org';\$user->save();"
Follow the instructions at eg. https://laravel.com/docs/9.x/upgrade
Update the composer dependencies in composer.json, according to the upgrade instructions.
Then run:
composer update
composer install
app/Models
, eg. app/Models/Group.php
resources/views/
, eg. about.blade.php
and auth/register.blade.php
app/Http/Controllers/
, eg. GroupController.php
and AdminController.php
composer cs-fix FILE/DIR
after installing the dependencies with composer cs-fix-install
. The dependencies are installed to tools/php-cs-fixer
to avoid conflicts with other projects.composer cs-fix-annotations
will reformat the annotations in the code. APP_DEBUG=false
and APP_ENV=production
in .env
.This software is licensed under the GNU AGPLv3.