/yii2-app-sudoku

Sudoku game application based on Yii2 Advanced Template

Primary LanguagePHPBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Sudoku Game (based on Yii2 Advanced Project Template)

Sudoku Game based on Yii 2 Advanced Project Template Yii 2. Documentation is at docs/guide/README.md.

Installing using Vagrant

This way is the easiest but long (~20 min).

This installation way doesn't require pre-installed software (such as web-server, PHP, MySQL etc.) - just do next steps!

Manual for Linux/Unix users

  1. Install VirtualBox

  2. Install Vagrant

  3. Create GitHub personal API token

  4. Prepare project:

    git clone git@github.com:wmsamolet/yii2-app-sudoku.git
    cd yii2-app-sudoku/vagrant/config
    cp vagrant-local.example.yml vagrant-local.yml
  5. Place your GitHub personal API token to vagrant-local.yml

  6. Change directory to project root:

    cd yii2-app-sudoku
  7. Run command:

    vagrant up
  8. Connect to vagrant by ssh and start sudoku websocket server:

    vagrant ssh
    cd /app
    php yii sudoku/server/listen
  9. Open website in browser and sign in:

     http://sudoku.local/
    
     Login: player1
     Password: player
    
     Login: player2
     Password: player
     
     Login: player3
     Password: player
     
     Login: player4
     Password: player
     
     Login: player5
     Password: player

That's all. You just need to wait for completion! After that you can access project locally by URLs:

Manual for Windows users

  1. Install VirtualBox

  2. Install Vagrant

  3. Reboot

  4. Create GitHub personal API token

  5. Prepare project:

    • download repo yii2-app-sudoku
    • unzip it
    • go into directory yii2-app-sudoku-master/vagrant/config
    • copy vagrant-local.example.yml to vagrant-local.yml
  6. Place your GitHub personal API token to vagrant-local.yml

  7. Open terminal (cmd.exe), change directory to project root and run command:

    vagrant up

    (You can read here how to change directories in command prompt)

  8. Connect to vagrant by ssh and start sudoku websocket server:

    vagrant ssh
    cd /app
    php yii sudoku/server/listen
  9. Open website in browser and sign in:

     http://sudoku.local/
    
     Login: player1
     Password: player
    
     Login: player2
     Password: player
     
     Login: player3
     Password: player
     
     Login: player4
     Password: player
     
     Login: player5
     Password: player

That's all. You just need to wait for completion! After that you can access project locally by URLs:

DIRECTORY STRUCTURE

common
    bootstrap/                  contains bootstrap classes (DI container)
    config/                     contains shared configurations
    mail/                       contains view files for e-mails
    models/                     contains model classes used in both backend and frontend
    tests/                      contains tests for common classes    
console
    config/                     contains console configurations
    controllers/                contains console controllers (commands)
    migrations/                 contains database migrations
    models/                     contains console-specific model classes
    runtime/                    contains files generated during runtime
apps/backend
    assets/                     contains application assets such as JavaScript and CSS
    config/                     contains backend configurations
    controllers/                contains Web controller classes
    models/                     contains backend-specific model classes
    runtime/                    contains files generated during runtime
    tests/                      contains tests for backend application    
    views/                      contains view files for the Web application
    web/                        contains the entry script and Web resources
apps/frontend
    assets/                     contains application assets such as JavaScript and CSS (Sudoku frontend)
    config/                     contains frontend configurations
    controllers/                contains Web controller classes
    models/                     contains frontend-specific model classes
    runtime/                    contains files generated during runtime
    tests/                      contains tests for frontend application
    views/                      contains view files for the Web application
    web/                        contains the entry script and Web resources
    widgets/                    contains frontend widgets
vendor/                         contains dependent 3rd-party packages
environments/                   contains environment-based overrides
packages/                
    wmsamolet/                  contains self-written packages (wmsamolet/*)
        php-collections/        contains a library for implementing PHP collections
        php-json-rpc-2/         contains a library-wrapper for JsonPRC 2.0
        php-websoket/           contains a library-wrapper for websocket-server
        php-websoket-ratchet/   contains a library-wrapper for websocket-server based on [Ratchet](https://github.com/ratchetphp/Ratchet) 
        yii2-module-sudoku/     contains a Sudoku game Yii2 module 
        yii2-tools/             contains a some tools for Yii2