Skip to content

rackycz/yii3web

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

446 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Yii

Yii3 web application

A CUSTOMIZED application template for a new web project


This is a clone of the official web application https://github.com/yiisoft/app

What was added/modififed:

  • CSS Bootstrap was added and the main menu was created
  • Added more containers (mainly MariaDB) to docker/dev/compose.yml
    • Added more env variables to docker/.env
  • MariaDB is used, migrations were enabled in CLI, password hashing, Annotations and Repository were engaged.
  • REST API enabled. See config/common/routes.php and src/Api.
    • Some middleware was moved from config/web/di/application.php to config/common/routes.php
    • ... because session and CSRF are only needed in the web application
    • Note: Error "422 Unprocessable entity" = missing CSRF token
    • Note: Error "Formatter is not set" = the API does not know whether XML or JSON should be returned. See the solution in config/common/routes.php.
  • REST API endpoints added
    • / = Lists all the users
    • /login = validates the login and creates the bearer token
      • Use this data in the POST request: { "username": "admin", "password": "admin" }
    • /bearer = tests if the correct bearer token is in the POST request
      • Use the "Bearer Token" Auth Type in Postman on the Authorization tab.
  • Enabled step debugging via xDebug
  • The first attempt at the user-CRUD implemented. Only routes index & view work.
  • Font Awesome added (via CDN)
  • GridView used to display list of users

TODO:

  • Filter in the GridView should be an array: <input name="filter[id]" ...>. But it may not be possible. See renderFilter() in DataColumnRenderer.
  • Study all the files in the src/Api/Shared folder. Are they needed? I just copied them from the API demo.
  • Use ActiveRecord
  • Show usage of https://htmx.org/
  • Implement user management
  • Add language and timezone selection to the main menu, save them to the user profile
  • Place the language-code at the beginning of the URL?
  • Implement translations and localization (datetime format, numbers, etc.)

About

Yii3 web application template plus (unofficial)

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • PHP 91.8%
  • Makefile 5.1%
  • CSS 1.8%
  • Dockerfile 1.2%
  • Batchfile 0.1%