Giter VIP home page Giter VIP logo

dncr's Introduction

DNCR

Run Status

Dance studio management software.

System requirements

For Windows

  1. Windows 10 64bit
  2. Hyper-V
  3. Docker for Windows
  4. NodeJS

For Linux

  1. Up-to-date Linux distribution

  2. Docker

    Note: please keep in mind your SELinux configuration!

  3. docker-compose

  4. NodeJS

Recommended to install

Getting started

  1. Clone repository

    Note: Rest of Getting Started section can be done automatically using prepenv.sh script. Run ./prepenv.sh -k -p -w . Run ./prepenv.sh -h for more info about this script. This script doesn't cover (Windows Only) parts. After running script go to Working with PhpStorm section.

  2. (Windows Only) Setup Docker:

    1. Click the whale icon in the tray
    2. Select Shared Drives and enable C (or drive where you have cloned the repository)
  3. Boot up machines:

    • Go to the repository you cloned

    • (Windows Only) If you have used port 80 you need to update docker-compose.yml: change line 18 to - "8080:80" - your server will be available at http://localhost:8080

      Note: Remember not to commit this changed file!

    • Run docker-compose up -d - this will build and boot required Docker images in background

      Note: drop -d to see all logs in the console. Note: If, for any other reason docker-compose up doesn't build your image - try again.

    • To stop containers use docker-compose stop

  4. Install required dependencies:

    • docker exec -it dncr_php_1 composer install

    • cd frontend && npm install

      For Windows: add -no-bin-links to npm install command so it properly installs required dependencies.

  5. Setup application:

    • cp .env.dev .env
    • docker exec -it dncr_php_1 php artisan key:generate
  6. Create and seed database:

    • docker exec -it dncr_php_1 php artisan migrate:refresh --seed
  7. Generate frontend application:

    • cd frontend && npm run build:dev

      For problems with Windows: npm install MISSING_PACKAGE

  8. (Linux only) Update cache permissions:

    • chmod 777 -R storage/*
    • chmod 777 bootstrap/cache
  9. Go to http://localhost:8080 to see the application.

Working with PhpStorm

Setup

When you open the project (cloned directory) in PhpStorm you need to:

  1. Install Docker Integration:
    1. PhpStorm Settings -> Plugins -> Browse repositories...
    2. "Docker integration" -> install
  2. Setup Docker integration:
    1. Go to PhpStorm Settings
    2. Enter Build, Execution, Deployment tab
    3. Enter Docker tab
    4. Click green +
      • For Windows
        • Enter http://127.0.0.1:2375 as API URL
        • Clear Certificates folder
      • For Linux enter: unix:///var/run/docker.sock as API URL
  3. Select proper PHP interpreter in PhpStorm:
    1. Go to PhpStorm Settings
    2. Enter Languages & Frameworks tab
    3. Enter PHP tab
    4. Select Remote PHP7 interpreter.
  4. Setup ability to debug PHP application:
    1. Toggle the “Start Listening for PHP Debug Connections” button. No special debug run configuration is needed. Toggle_Off Toggle_On

      Note: Remember to repeat this step after PhpStorm restart.

    2. Enter PhpStorm Settings > Language & Frameworks > PHP > Servers

    3. Click + and in Name and Host enter localhost

    4. (Windows Only) Change port to 8080

    5. Select Use path mappings checkbox

    6. In the Absolute path on the server column enter /var/www/html next to project main directory.

  5. Setup NPM integration:
    1. Press Alt + F11
    2. Select npm in the top left corner
    3. Click + and select dncr/frontend/package.json
    4. You should see a list of commands
  6. Setup TSLint integration:
    1. Enter PhpStorm Settings > Language & Frameworks > TypeScript > TSLint
    2. Enable at the top should be checked
    3. Set TSLint package to dncr/frontend/node_modules/tslint
    4. Configuration file should be set to dncr/frontend/tslint.json
  7. Setup database integration:
    1. Make sure that docker container dncr_db_1 is running
    2. Open View > Tool windows > Database
    3. In Database view on the right and click +
    4. Select Data sources > MySQL
    5. Leave default Host: localhost and Port: 3306. As for Database, User and Password - ask somebody on the team
    6. Click Test Connection and save changes
    7. To open database query editor, click console icon (first from the right) in Database view
  8. Setup polish dictionary integration:
    1. Enter PhpStorm Settings > Editor > Spelling
    2. Enter Dictionaries tab
    3. Click + in Custom Dictionaries Folder
    4. Select dncr/.idea/dictionaries directory
  9. Install Laravel Plugin.
    1. Enter PhpStorm Settings > Plugins > Spelling > Browse repositories...
    2. Search for Laravel Plugin, select it and Install

Abilities

PhpStorm allows you to:

  • Run frontend build (NodeJS on your computer is required)
  • Run Docker containers (boot up application)
  • Run PHP tests
  • Run frontend tests

Building frontend

  1. Press Alt + F11
  2. Run watch command

This will build dev version of application into public directory served by Docker container.

Running Docker containers

  1. Press Alt + Shift + F10 (or go to Run -> Run...) and select 'Application'
  2. Visit http://localhost

This command will properly stop and start Docker containers defined in docker-compose.yml

Note: You can also select 'Application' in main toolbox and press play.

Running PHP tests

  1. Press Alt + Shift + F10 (or go to Run -> Run...) and select 'Tests'
  2. Press play for all tests

Note: You can also select 'Tests' in main toolbox and press play.

Used libraries

We are developing a new app so we are using brand new technologies:

For development purposes we are using webpack

FAQ

My PhpStorm Docker is not working on Windows!

This is a weird issue and can be fixed by running several commands:

  1. Open PowerShell as Administrator
  2. Run Remove-VMSwitch -Name DockerNAT
  3. Open Docker settings
  4. Go to Reset and click Reset to factory defaults...
  5. Setup Docker once again

You can also check netstat -ab in PowerShell to see whether Docker is listening on 127.0.0.1:2375 (com.docker.proxy.exe). Unfortunately we have no idea why is it coming up like this.

I removed laravel ide helpers and don't know where to find them!

  1. Visit https://github.com/barryvdh/laravel-ide-helper
  2. Download L5 gist
  3. Place it in application directory (cloned repository)

I have permission denied errors after generating file with artisan!

  1. Use dartisan.sh script. Type ./dartisan.sh -h for more info.

Copyright and license

Code copyright 2016 by Tomasz Legutko, Amadeusz Starzykiewicz, Bartosz Rakoczy, Szymon Łabuz and Marek Łakomy under the Apache 2.0 License.

dncr's People

Contributors

megawebmaster avatar tlegutko avatar tifts avatar marek-kurs avatar szimin18 avatar droodev avatar sytchi avatar

Stargazers

 avatar Z2X avatar Karim Hernandez avatar Sebastien Labbe avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

dncr's Issues

Documentation: App overview, features or screenshots

I'm interested in exploring this as a possible solution for my dance studio management needs, but short of running it for myself, I don't have any idea how complete the features are. Could someone respond with a short overview?

Suggestion for improvement would be to add an overview, feature breakdown and maybe links to screenshots in the readme.

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.