Skip to content

A beautiful Laravel/Elasticsearch dashboard app with new data every day for testing, prototyping, and demoing purposes.

License

Notifications You must be signed in to change notification settings

sergionader/larappone

Repository files navigation

LarAppOne

LarAppOne is a Laravel/Elasticsearh demo site with a beatiful dashboard and many cool features. Please fell free to fork it. There many, many nice features to be added to it.

Getting Started

It is recommended some previous experience with Laravel and Elasticsearch. In other words, it should be important to use this app in a computer where Laravel and Elasticsearch are already configured.

Demo Site

http://thedevproject.info

Prerequisites

You will need:

  • PHP 7.x
  • mySQL (tested with 5.7.17)
  • Composer
  • Laravel 5.5 -- not tested with other versions
  • Elasticsearch 5.6 -- not tested with other versions

Installation

  1. Clone this repository: git clone https://github.com/sergionader/larappone/
  2. cd larappone
  3. Update config/scout.php to reflect your Elasticsearch installation (see the instructions in the next section)
  4. Rename .env.example to /.env, edit it to insert your mySQL credentials -- if you want to test the email features, put your mailtrap.io credentials as well.
  5. Run php artisan key:generate to generate a key (if you haven't done it yet) and add it to the APP_KEY variable in .env file.
  6. From your project folder run composer update
  7. Run the migration: php artisan migrate
  8. Start the server php artisan serve --port 8000
  9. Run the seeder that will create the user admin@example.org: php artisan db:seed --class=UsersTableSeeder
  10. Browser the app: http://localhost:8000
  11. Log in with user admin@example.org and password test1234
  12. Go to the settings menu (gear icon at the upper right)
  13. Open the section Populate Aux Tables and then click on Populate -- proceed when the confirmation dialog appears.
  14. Open the section Add Random Records. Try adding 10 records and choose "Today" from the date list
  15. Goto to the left menu, App, List, Search, Edit, Delete & Add and see your records.
  16. Enjoy! - and make sure to read the LarAppOne Official Documentation

Elasticsearch Setup

Larapone uses Elasticsearch's default port. Your /config/scout.php file should show:

 'driver' => env('SCOUT_DRIVER', 'elasticsearch'),

    'elasticsearch' => [
        'index' => env('ELASTICSEARCH_INDEX', 'larappone'),
        'hosts' => [
            env('ELASTICSEARCH_HOST', 'http://localhost'),
        ],
    ],

The Elasticsearch driver used in the project does not create the index automacally, so we have to do so:

curl -XPUT 'localhost:9200/larappone?pretty' -H 'Content-Type: application/json' -d'
{
    "settings" : {
        "index" : {
            "number_of_shards" : 3, 
            "number_of_replicas" : 2 
        }
    }
}'

Adding records automatically each X minutes

If you are using a Linux or a Mac computer, run the following:

* * * * * php /path-to-your-project/artisan schedule:run >> /dev/null 2>&1

Detailed instructions on how to change the time interval of the cronjob can be found at the Task Scheduling page from the official Laravel documentation.

About the mySQL user

If you ever put this app in a production server, please create a user to run it and update the .env file accordingly. You should never run any production application with the root user!

Questions

Please open an issue if you have any question.

To Do

  • Move the remaining chart selects to eloquent
  • Implement Roles & permissions
  • Analyze where and implement wueues
  • Make it multilanguage
  • Revise ES implementation -- there is room from improvement
  • Grid export (at least to CVS
  • Implement reCaptcha

Documentation

Just navigate to the LarAppOne Official Documentation

Built With

  • Full Stack - All the packages used in the project

Author

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

About

A beautiful Laravel/Elasticsearch dashboard app with new data every day for testing, prototyping, and demoing purposes.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published