YouTubevideo· Oct 9, 2024· 8:12· 4,500 views on YouTube
React at a moment you like. The best moments light up here.
A couple of weeks ago, I put out a tweet saying that I wanted to create a personal opinion starter kit for demos, any new projects that I was making, or just when I want to try new things out. I like having a good starting point. Now, most of the time I use Laravel Breeze for that. But even then I like to have a little bit more flexibility and just opinions on how I like things set up.
Usually I like using volt and I also just like having one page that's already authenticated in this case, like a dashboard being the front and center page. And so I took it upon myself to once live wire flux had been released to start making my own dashboard. Personal starter kits. So this is fission.
Um, and it's basically a folio volt and flux starter kit that I can just keep up to date and then clone and start building my new projects or demos with this.
And I kind of, uh, Maybe do like a soft launch, I guess, on a video a couple of weeks back, and I made a lot of changes to it just in the past couple of days that I want to kind of show you and walk through why I think there's some cool things that I, I set up here again, all of this, I kind of say right here, it's an opinion starter kit. It's designed to fit my needs.
And while it might work great for you, you can definitely just, you know, clone it and, or just fork it and do whatever changes that you need. But there are some things that I've been messing around with that I think actually I really like. I didn't think I would like them at first, but I wanted something super clean, super simple, um, That way I can start moving forward. And a lot of this was inspired by the new getting started page within the, the Laravel instruction, the Laravel documentation.
So in Laravel. com, there's a new getting started page. There'll be a full video out as well. But new getting started page basically allows you to install PHP composer and the Laravel global installer with one command and using PHP artisan serve to serve that up. And before I was using herd and I still love. Heard, but I would, uh, have to run a couple of different steps and then basically open the dot test domain.
But a lot of times I just wanted one command to be up and running with that, and that's what kind of kickstarted a lot of the new things that I added to Fission. So why don't we, uh, open up my, uh, initial, the, the actual starter to show you the things that I, uh, did to add to this here. So the first step I created this, um. I, I created this install.
sh because one of the things that's, that's tricky when you're creating a new package or installing a new, uh, cloned repo is you then have to do composer install and you have to, you know, MPM install, and then you have to copy like environment variables. I wanted one command to be able to do all of that. And so it starts with this, let's install composer, and then.
It runs the fission install command, which is something that I created again, my own personal preferences so that I could just clone this repo for a new project, run the install SH bash script, and then be on my way. Uh, so it basically allows you to, um, installs the MPM modules.
Uh, if I have a off dot JSON for flux, because flux is a paid package, uh, it automatically runs the flux activate command, which allows you to input your email and, um, your license key. But if you are me personally, I have that on my local device, so I have it as code flux dash off dot JSON. And so it will automatically just copy that and install it using those, using those credentials.
And then it will set up the environment variable. So basically copy the dot ENV dot example with your particular project name. It will reload the environments. That way we have everything set up for migrations. It will generate the app key, run the migrations, and then set the project name based on your, based on the directory. It chooses you, you set this up in, or you can set your own project name. And then it will also.
Allow you to, uh, delete the fission install file as well as the bash script. So that way it's not just extra bloat that you have. Again, this is all my personal preferences, but hopefully I wanted to chronic build this. If this works out for you, if you like something like this, now here's where a little bit more of my personal opinions came in that I actually really like. And a lot of this actually kind of came out, uh, from, uh, some of the, uh, Theot3.
gg's. Little, uh, rant or opinions about how Laravel starts. And I like some of them. Uh, so in the, uh, V dot config dot JS, I have this new server open that basically opens the local host port 8, 000 or anything that you have in your app dot URL. So in your ENV app URL, and then what it does is in the. package.
json script, we have a couple of things I have concurrently so that I can run. I can just say NPM run dev. It will start PHP artisan serve. We have pale set up, and then it has those three things in different colors. So I can see which one's NPM, which one's PHP artisan serve, and which one is pale for any logs. Because especially now that I, usually I use maybe something like Ray, but especially with just.
Simple applications or little demo projects. If I was to go into the like index blade for, for dashboard, I can just use the info helper, which, uh, logs and info command that that's relatively new within a new helper within Laravel, and that then just pushes to my command, my, my terminal. Through pale. All that being set up, let's see what this looks like if I was to create a new project.
So what I would typically do now, again, this is all kind of set up from my personal tastes and my personal opinion, just how I work is I just say a GH repo clone. Cause I have the GitHub CLI installed and then it's Josh Siri slash fizz. And we can say that this is like a new start. Okay. So it clones into it. It brings it all down. Then the only command I have to do when I go into the new terminal, uh, or the new directory is just bash install.
sh. You can see it starts to install composer dependencies, and then it installed my off dot JSON. I'm going to run database migration. It's at the app environment. I have my new project. I have the URL, my project, and I want to remove the installation files. And then we're good to go. You can see, we can run NPM run dev to start the local server and PM run dev. It will automatically open this up in a new, in a new window so that I have this ready to go again. All my own personal preferences.
But if this is something you like, be sure to check out the repo. Give it a star for me if you can, but that's Josh Siri slash fission. Um, I really like it. It's something that I'm going to start using for all my new projects now. Um, And yeah, I like that. I now have this personal preference starter kit that I can just start building things.
I don't have to worry about, uh, if someone else like has this personal preference, I just like having a page that I can get up. It's an authenticated login and authenticated dashboard. And then I have one component already set up. To start a playground component that if I was to open this up in my, in my editor and just open up the playground component, I have a starting point, a class based live wire volt starting point to do whatever I please.
So this is my personal starting point to get building things , to start having ideas and putting it onto the page.
So whatever you're doing, maybe you can use this, but keep creating.