Skip to content

Commit

Permalink
v2.0.0
Browse files Browse the repository at this point in the history
- Rewritten everything with better and consistant prompts
    - Four-space indentations
    - Hiding setup option when already done
    - Hiding update option when it's finished
    - Added a prompt helper function for code-brevity
    - Replaced copied original files with manual replacements
    - Refactored VSC env variables into USING_VSC single one
    - Renamed "multi-lingual" concept into "localized"
    - Ran migrations regularily
- Organized validations in place before each script
    - Ensured scripts aren't being ran directly
    - Validated against environment variables difference
- Controlled message logging during the scripts
    - Added a LOGGING_LEVEL env variable
    - Set up 3 different modes for logging
    - Hid warnings, to only show in level 2
    - Hid regular output, to only show in level 3
- Fixed dangling Apache sites upon deletion
- Replaced curl with wget for the update checking process
- Dropped mkcert installation command to be ran manually
- Fixed Minio's service in setup script
- Fixed NVM commands in setup script
- Fixed Code folder permissions for the opinionated setup
- Fixed the removal of non-existing VSC workspaces
- Fixed Laravel Telescope migrations pubishing
- Installing Expose only when its token is provided in .env
- Considered [auth.json] in git-ignore
- Added a JS closure in x-init
- Some opinionated changes
    - Updated personal settings
    - Added a VSC extension: shellscript
- Updated [README.md]
  • Loading branch information
GoodM4ven committed Sep 11, 2023
1 parent fdfc2fe commit 7a84968
Show file tree
Hide file tree
Showing 37 changed files with 1,321 additions and 2,248 deletions.
18 changes: 18 additions & 0 deletions .draft/scripts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Check if needed scripts exist and source them
declare -a script_paths=(
"./scripts/functions/prompt.sh"
)
for script_path in "${script_paths[@]}"; do
if [[ ! -f $script_path ]]; then
echo -e "Error: Working directory isn't the script's main.\n"

echo -e "Tip: Maybe run [cd ~/Downloads/lara-stacker/ && sudo ./lara-stacker.sh] commands.\n"

echo -n "Press any key to exit..."
read whatever

clear
exit 1
fi
source $script_path
done
9 changes: 9 additions & 0 deletions .draft/vscode.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Check if VSC is installed
found_vsc=false
if command -v code &>/dev/null; then
found_vsc=true
elif command -v codium &>/dev/null; then
found_vsc=true
fi

# TODO run the projects using it
6 changes: 3 additions & 3 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
LOGGING_LEVEL=1 # 1 = notifications only | 2 = 1 + errors + warnings | 3 = everything
PROJECTS_DIRECTORY=/var/www/html
USERNAME=<your-username>
DB_PASSWORD=<your-password>
EXPOSE_TOKEN=<your-token>
OPINIONATED=true
VSC_WORKSPACE=true
VSC_KEYBINDINGS=true
USING_VSC=true
EXPOSE_TOKEN="" # Installed when provided
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ This way, I don't have to worry about the things I've mentioned, plus I gain the
- [Mailpit](https://github.com/axllent/mailpit) (http://localhost:8025)
- [MinIO](https://min.io/) (http://localhost:9000)
- Active Services
- [Expose](https://expose.dev/docs) (Use `expose share https://[site-name].test` to work properly)
- [Expose](https://expose.dev/docs) (Installed if `EXPOSE_TOKEN` is provided in [.env] file. And use `expose share https://[site-name].test` to work properly)

</p>
</details>
Expand Down Expand Up @@ -106,11 +106,11 @@ This way, I don't have to worry about the things I've mentioned, plus I gain the
- [pestphp/pest-plugin-laravel](https://pestphp.com/docs/plugins#content-laravel) [Dev]
- [Option] TALL Stack && PEST
- [pestphp/pest-plugin-livewire](https://pestphp.com/docs/plugins#content-livewire) [Dev]
- [Option] Multilingual
- [Option] Localized
- [mcamara/laravel-localization](https://github.com/mcamara/laravel-localization)
- [spatie/laravel-translatable](https://spatie.be/docs/laravel-translatable/v6)
- [laravel-lang/lang](https://laravel-lang.com) [Dev]
- [Option] TALL Stack && Multilingual
- [Option] TALL Stack && Localized
- [filament/spatie-laravel-translatable-plugin:"^3.0-stable"](https://filamentphp.com/plugins/filament-spatie-translatable)
- [kenepa/translation-manager](https://filamentphp.com/plugins/kenepa-translation-manager)

Expand Down Expand Up @@ -163,22 +163,17 @@ This way, I don't have to worry about the things I've mentioned, plus I gain the

- Run the script with super-user permissions:
```bash
sudo chmod +x ./lara-stacker.sh && sudo ./lara-stacker.sh
chmod +x ./lara-stacker.sh && sudo ./lara-stacker.sh
```

- Ensure that the environment variables are all showing up in the output before selecting anything.

- Choose to [**setup**](./scripts/setup.sh) the lara stacker first, which will install everything necessary and eventually create a [[done-setup.flag](./done-setup.flag)] empty file in the directory.
- Choose to [**setup**](./scripts/setup.sh) the lara stacker first, which will install everything necessary and eventually create a [[done-setup.flag](./done-setup.flag)] file in the directory.

- Then choose to [**create**](./scripts/create.sh) your first stacked project and continue onwards...

That's it. You'll have your first project accessible in the end (displaying the site's URL too). JUST be PATIENT! `:)`
> **Warning**
> I found the best way to deal with workspace settings or extensions ("recommended", they call them) is to add them to your VSC profile's extensions, but then disable them, and every time you open a new workspace (project), you enable them for the workspace only.

> **Note**
> You're free to take a look at and apply the VSC [settings](./files/.opinionated/settings.json) I'm using locally, as well as their complete [extension list](./files/.opinionated/extensions.md). (You can also set up both in their own "TALL" VSC profile or something)
> If you want to debug the process or display all output during the scripts, change the `LOGGING_LEVEL` variable in your [[.env](./.env)] file.
## Before Production
Expand All @@ -188,14 +183,15 @@ That's it. You'll have your first project accessible in the end (displaying the

## Todos For Development:

- [ ] Find a consistant fix for $USERNAME env-variable
- [ ] Allow html attribute suggestion without endless blade snippets then enable blade snippet suggestions again
- [ ] Add laravel Vue stack (VILT) with/without SSR
- [ ] Add laravel React stack (RILT) with/without SSR
- [ ] Open VSC if available (check the commented code in [scripts/create.sh])
- [ ] Run PHPUnit tests with the keybinding (ctrl+shift+r) if in PHPUnit class, and BetterPest's otherwise
- [ ] Selective installation process as a self-deleting Composer package (check [.draft/stacking-wip.md])
- [ ] Selective installation process as a self-deleting Composer package
- [ ] Laravel Prompts
- [ ] Add laravel Vue stack (VILT) with/without SSR
- [ ] Add laravel React stack (RILT) with/without SSR
- [ ] Find a consistant fix for $USERNAME env-variable
- [ ] Automate the mkcert installation command during setup script without password
- [ ] Open VSC (or [Codium](https://vscodium.com/)) if available
## Credits
Expand All @@ -211,6 +207,11 @@ That's it. You'll have your first project accessible in the end (displaying the
- [Spatie](https://github.com/spatie)
- ( [Tech Stack List](#tech-stack-list) )
- ( [VSC Extensions](./files/.opinionated/extensions.md) )
> **Warning**
> I found the best way to deal with workspace settings or extensions ("recommended", they call them) is to add them to your VSC profile's extensions, but then disable them, and every time you open a new workspace (project), you enable them for the workspace only.

> **Note**
> You're free to take a look at and apply the VSC [settings](./files/.opinionated/settings.json) I'm using locally, as well as their complete [extension list](./files/.opinionated/extensions.md). (You can also set up both in their own "TALL" VSC profile or something)
- ( [Contributers](https://github.com/GoodM4ven/lara-stacker/graphs/contributors) )


Expand Down
2 changes: 1 addition & 1 deletion files/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
.env
.env.backup
.env.production
# auth.json
auth.json
npm-debug.log
# /.vscode
13 changes: 12 additions & 1 deletion files/.opinionated/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// * =========
// * Original
// * =======
"window.menuBarVisibility": "hidden",
"window.zoomLevel": 0.8,
"explorer.autoReveal": false,
"explorer.confirmDragAndDrop": false,
Expand Down Expand Up @@ -71,6 +70,18 @@
"**/node_modules",
"**/vendor"
],
// [SVG]
"svg.preview.mode": "svg",
// [shell-format]
"[shellscript]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
},
"shellformat.effectLanguages": [
"shellscript",
"dockerfile",
"dotenv",
"gitignore"
],
// * Specification
"[php]": {
// [Fold On Open]
Expand Down
13 changes: 0 additions & 13 deletions files/_stubs/tall/app/Http/Controllers/HomeController.php

This file was deleted.

16 changes: 0 additions & 16 deletions files/_stubs/tall/app/Http/Controllers/LoginRedirect.php

This file was deleted.

55 changes: 0 additions & 55 deletions files/_stubs/tall/app/Models/User.php

This file was deleted.

85 changes: 0 additions & 85 deletions files/_stubs/tall/app/Providers/AdminPanelProvider.php

This file was deleted.

Loading

0 comments on commit 7a84968

Please sign in to comment.