SzymCode / DataManager

This website helps to storage various data types and share it with others.
https://data-manager.szymco.de
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link


DataManager


This website helps to storage various data types and share it with others. My target is to create fully responsive, functional and scalable ERP-like website based on RWD, MFD, BDD and FDD principles. Serves as my coding sandbox, where I can experiment with different coding techniques, implement new features, and refine my skills.

Join my project and become part of building something incredible!


Live preview

    XAMPP


🛠️ Installation - First make sure u have installed latest versions of [PHP](https://www.php.net), [Laravel](https://laravel.com/), [Vue.js](https://vuejs.org/), [Node.js](https://nodejs.org/en), [npm](https://www.npmjs.com), [XAMPP](https://www.apachefriends.org/pl/index.html) and [Composer](https://getcomposer.org/) - I recommend use [nvm](https://github.com/nvm-sh/nvm/blob/master/README.md) for install latest supported versions of [Node.js](https://nodejs.org/en) and [npm](https://www.npmjs.com), ``` nvm use --lts ``` - Clone this repository ``` git clone https://github.com/SzymCode/DataManager.git ``` - Change *.env.example* file to *.env* in root directory - Generate APP_KEY ``` php artisan key:generate ``` - Install modules in root directory ```bash npm install composer update # if you want use storybook cd storybook npm install ``` ### **Make sure u have installed all modules!** - run XAMPP mysql server and create database ```bash mysql -u root -p create database datamanager create database datamanager_test # it's not necessary, only for tests ```
🚀 Run
Root directory: ```bash npm run dev php artisan serve ```
❓ Usage
Migrations
```bash php artisan migrate:fresh --seed # Reset database by dropping all tables and then run all migrations # --seed flag runs the database seeders after the migrations ```
Factories
```bash php artisan tinker # if you wish, you can specify count in factory() or attributes in create() Article::factory(100)->create(); Contact::factory(100)->create(); User::factory(100)->create(); # for Spatie Activity model Database\Factories\ActivityFactory::new()->count(100)->create(); ```
Tests
 Backend tests: ```bash # run all tests ./vendor/bin/pest # or specify group ./vendor/bin/pest --group=api # defined tests groups: api, article-api, contact-api, sitemap-api, user-api, database, feature, global, unit, commands, controllers, services, factories, migrations, models # run all tests and check code coverage ./vendor/bin/pest --coverage ``` ![Tests](https://github.com/SzymCode/DataManager/assets/107359025/160b61df-0ef8-4bb7-a84a-38ad1941e9f7)![Coverage](https://github.com/SzymCode/DataManager/assets/107359025/dec55c40-669b-4483-ae59-4ec21594e147)  Frontend tests: ```bash npm run open ```  Storybook: ```bash cd storybook yarn storybook ```
npm
1. Npm clean install - ```npm ci``` 4. Vite build - ```npm run build``` 5. Eslint fix - ```npm run lint``` 6. Run prettier - ```npm run write``` 7. Husky install - ```npm run prepare```
Sitemaps
Generate XML sitemap ```bash php artisan sitemap:generate ```


    Docker


🛠️ Installation
- First make sure u have installed latest versions of [PHP](https://www.php.net), [Laravel](https://laravel.com/), [Vue.js](https://vuejs.org/), [Node.js](https://nodejs.org/en), [npm](https://www.npmjs.com), [Composer](https://getcomposer.org/) and [Docker](https://www.docker.com) - I recommend use [nvm](https://github.com/nvm-sh/nvm/blob/master/README.md) for install latest supported versions of [Node.js](https://nodejs.org/en) and [npm](https://www.npmjs.com), ``` nvm use --lts ``` - Clone this repository ``` git clone https://github.com/SzymCode/DataManager.git ``` - Change .env.example file to .env in root directory - Generate APP_KEY ``` php artisan key:generate ``` - Install modules in root directory ```bash composer update php artisan sail:install sail npm install # if you want use storybook cd storybook npm install ``` ### **Make sure u have installed all modules!**
Possible problems: - Error: EACCES: permission denied, mkdir '/var/www/html/node_modules': ```sudo chmod 777 -R DataManager``` or [Solution](https://stackoverflow.com/questions/49679808/error-eacces-permission-denied-mkdir-usr-local-lib-node-modules-node-sass-b)
🚀 Run
Root directory: ```bash # run Docker containers in the background sail start # run command inside laravel.test container bash sail npm run dev ``` **Remember to shutdown all XAMPP processes!** Possible problems: - Sail: no such file or directory found: [Solution 1](https://laravel.com/docs/10.x/sail#configuring-a-shell-alias), [Solution 2](https://stackoverflow.com/questions/71503871/laravel-error-laravel-sail-no-such-file-or-directory-found) - Error starting userland proxy: listen tcp4 0.0.0.0:3306: bind: address already in use: ```sudo service mysql stop```
❓ Usage
Migrations
```bash sail artisan migrate:fresh --seed # Reset database by dropping all tables and then run all migrations # --seed flag runs the database seeders after the migrations ```
Factories
```bash sail tinker # if you wish, you can specify count in factory() or attributes in create() Article::factory(100)->create(); Contact::factory(100)->create(); User::factory(100)->create(); # for Spatie Activity model Database\Factories\ActivityFactory::new()->count(100)->create(); ```
Tests
 Backend tests: ```bash # run all tests sail pest # or specify group sail pest --group=api # defined tests groups: api, article-api, contact-api, sitemap-api, user-api, database, feature, global, unit, commands, controllers, services, factories, migrations, models # run all tests and check code coverage sail pest --coverage ``` ![Tests](https://github.com/SzymCode/DataManager/assets/107359025/160b61df-0ef8-4bb7-a84a-38ad1941e9f7)![Coverage](https://github.com/SzymCode/DataManager/assets/107359025/dec55c40-669b-4483-ae59-4ec21594e147)  Frontend tests: ```bash npm run open # For now I've not configured Cypress with Docker ```  Storybook - visit ```localhost:6006``` after ```sail start```
npm
1. Npm clean install - ```sail npm ci``` 4. Vite build - ```sail npm run build``` 5. Eslint fix - ```sail npm run lint``` 6. Run prettier - ```sail npm run write``` 7. Husky install - ```sail npm run prepare```
Sitemaps
Generate XML sitemap ```bash sail artisan sitemap:generate ```


  🛠️   Tech Stack




    Contribute


Feel free to check [Project](https://github.com/users/SzymCode/projects/2) and [Issues](https://github.com/SzymCode/DataManager/issues) sections.
Your skills and expertise will directly contribute to the success of our project, helping us achieve our goals and create an attractive portfolio.