• Stars
    star
    770
  • Rank 59,000 (Top 2 %)
  • Language Blade
  • License
    MIT License
  • Created over 1 year ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An Application Starter Kit - Built with Laravel Folio and Volt

Genesis Logo

Build Status Total Downloads

About Genesis

Genesis is a Laravel Starter Kit that utilizes the TALL Stack as well as single-file Volt and Folio files. This starter kit contains Authentication, User Dashboard, Edit Profile, and a set of UI Components.

genesis cover

It will be beneficial to have a good understanding of the following technologies (which Genesis is built upon):

Learn how to install and configure Genesis below.

Installation

This preset is intended to be installed into a fresh Laravel application.

After creating a new Laravel application you can install Genesis with the following commands:

composer require devdojo/genesis dev-main
php artisan ui genesis
npm install
npm run dev

Finally, you'll want to connect a database inside of your application .env file and run the following migrations:

php artisan migrate

Visit your application homepage and you should be good to go 🤘

Routes in your application

Currently Genesis creates 11 routes including the homepage, authentication, dashboard view, and a few others. You can see all the routes currently in your application by using the php artisan folio:list command:

  GET       / ................................................ index.blade.php
  GET       /about ........................................... about.blade.php
  GET       /auth/login ................................. auth/login.blade.php
  GET       /auth/password/confirm ........... auth/password/confirm.blade.php
  GET       /auth/password/reset ............... auth/password/reset.blade.php
  GET       /auth/password/{token} ........... auth/password/[token].blade.php
  GET       /auth/register ........................... auth/register.blade.php
  GET       /auth/verify ............................... auth/verify.blade.php
  GET       /dashboard ............................. dashboard/index.blade.php
  GET       /learn ..................................... learn/index.blade.php
  GET       /profile/edit ............................. profile/edit.blade.php

                                                           Showing [11] routes

Let's cover each of the pages provided by Genesis.

Home Page

The homepage (screenshot shown above 👆) is located at resources/views/pages/index.blade.php. This file as well as all the other pages are utilizing Page-based routing thanks to Folio.

This file contains a middleware redirect-to-dashboard which is registered at the top of the file:

middleware(['redirect-to-dashboard']);

This will redirect an authenticated user to the dashboard when they try and visit the homepage. You can simply remove this line if you do not wish to redirect the authenticated user.

About Page

This is a simple about page that you can feel free to remove or use in your application. This page also contains the ui/marketing/breadcrumbs.blade.php component which can also be used on any other marketing page.

Authentication Pages

All the authentication files are located inside of the resources/views/pages/auth folder. These files are mapped to routes thanks to Folio. Here are the current authentication routes:

  1. login.blade.php
  2. register.blade.php
  3. verify.blade.php
  4. password/confirm.blade.php
  5. password/reset.blade.php
  6. password/[token].blade.php

Dashboard Page

The dashboard page is very minimal which makes it very easy for you to customize. You'll notice that this page has the following middleware:

middleware(['auth', 'verified']);

You will probably want to add this middleware to many of your application pages where you want to make sure that the user is authenticated and verified.

Edit Profile Page

The edit profile page is located at resources/views/profile/edit, and it can also be loaded by visiting url.com/profile/edit. This file contains the same middleware as the dashboard page, which means that users must be authenticated and verified before visiting.

This page has three different sections

  1. Update profile section where users can update the name and email in their profile.
  2. Update password section where users can update their password.
  3. Delete profile section where users can delete their profile.

To learn more about this file, visit the documentation in the Wiki here.

Learn Page

This page displays the Genesis Readme file. It simply fetches the README.md file that you are reading right now and displays it in the dashboard.

Layouts

Within Genesis there are three layouts, located inside of resources/views/components/layouts:

  1. app.blade.php - This is the layout for any pages inside associated with your application (user must be authenticated)
  2. marketing.blade.php - This is the layout used for pages like your homepage, blog, and any other marketing pages.
  3. main.blade.php - This is the layout that contains the main HTML structure of your website. Both the app and marketing template inherit from this main template.

You can use these layouts as follows:

<!-- App Layout -->
<x-layouts.app>
    <!-- content here... -->
</x-layouts.app>

<!-- Marketing Layout -->
<x-layouts.marketing>
    <!-- content here... -->
</x-layouts.marketing>

<!-- Main Layout -->
<x-layouts.main>
    <!-- content here... -->
</x-layouts.main>

There may be times when you want to use the Main Layout for a page. These might be use-cases where you don't need the app or marketing header/footer content. For instance, the auth pages inherit the main layout

UI Components

We are also providing a handful of Blade Components that you can use in your new application which are located inside of resources/views/components/ui. These components include:

  • button
  • checkbox
  • input
  • light-dark-switch
  • link
  • logo
  • modal
  • nav-link
  • placeholder
  • text-link

There are also two folders inside the UI components which include app and marketing. Each of which correspond to the available app and marketing layout. Here are the components available in those folders:

-- app.header -- marketing.header -- marketing.breadcrumbs

All these components are pretty self-explanatory; however, you may want to look into how each one works so that way you can get the most out of it.

Updating the logo throughout your application is as easy as updating the logo.blade.php component with your logo SVG or image.

Testing

Genesis has some basic tests to test out the authentication functionality. You can check those tests by running the following command:

./vendor/bin/pest

Every test inside the tests/Feature folder has a test file that corresponds to each page in the resources/views/pages folder.

Troubleshooting

There may be times where you'll see Line numbers printed out in the view causing a weird layout and output. You'll want to run php artisan view:clear. This is probably due to the fact that Folio and Volt are still in Beta 😉

NPM errors

If you are seeing an error on http://localhost:5173 try:

npm upgrade 

Laravel installer issues.

APP_URL will be set differently according to how you install laravel. Some might use the laravel installer some may use composer. Vite will is serving on http://localhost:5173 while other parts of the app are using http://[::1]:5173.

For best results try this:

composer create-project --prefer-dist laravel/laravel genesis-app

then change your APP_URL in your .env:

APP_URL=http://127.0.0.1:8000

then start the npm server and laravel servers:

npm run dev
php artisan serve

Credits

License

The MIT License (MIT). Please see License File for more information.

More Repositories

1

voyager

Voyager - The Missing Laravel Admin
PHP
11,767
star
2

wave

Wave - The Software as a Service Starter Kit, designed to help you build the SAAS of your dreams 🚀 💰
PHP
5,105
star
3

pines

The Pines UI library
HTML
2,562
star
4

chatter

Chatter is a Simple Laravel Forum Package
PHP
900
star
5

tails-components

The Tails Open Source Components are a (no-config) copy'n paste free collection of hand-crafted templates and components built in TailwindCSS.
HTML
760
star
6

larasail

LaraSail - Set Sail with your Laravel app on DigitalOcean
Shell
580
star
7

static

⚡️ The ultimate static site generator. Tailor-made for killer blogs, sizzling SaaS landings, audacious personal sites, and every web fantasy you dare to dream up.
JavaScript
128
star
8

php-login-script

This is a simple PHP login script using PHP, PDO, and MySQL
PHP
97
star
9

tailwind-breakpoint-tool

A simple breakpoint tool for develping your TailwindCSS sites.
JavaScript
91
star
10

voyager-themes

Theme Hook for Voyager
PHP
82
star
11

create-alpine-app

A simple starter template for your Alpine and Tailwind projects
HTML
56
star
12

voyager-polls

Create Interactive Polls with this hook for Voyager
Vue
47
star
13

laravel-user-image

Repo for episode tutorial on adding a user profile photo -
PHP
43
star
14

tails

This is the Tails composer package for Laravel. Easily fetch designs in your Laravel application that you design inside of the Tails Site/Page Builder.
PHP
35
star
15

create-a-php-routing-system

This repo is the code used in the DevDojo Creating a PHP Routing System Video Series
PHP
33
star
16

laravel-reactions

A Laravel Reactions Package
PHP
32
star
17

voyager-redirects

A Hook that allows you to add redirects to your Laravel and Voyager App
PHP
32
star
18

voyager-site

This is the source for LaravelVoyager.com website
HTML
26
star
19

voyager-installer

This is the repo for the Voyager installer
PHP
25
star
20

wordpress-import

This is a hook for Voyager that will import a Wordpress xml file into the Voyager DB
PHP
24
star
21

image-uploads-with-laravel-and-filepond

This is the source code for the video 'Image Uploads with Laravel and Filepond'
PHP
18
star
22

website-screenshot-with-laravel

Learn how to create a screenshot of a website with Laravel
PHP
16
star
23

themes

A package to add themes functionality in your Laravel application (Currently for Voyager)
PHP
14
star
24

livewire-trix-editor-post

This is a repository for the trix editor post written on the DevDojo
PHP
13
star
25

htmlinclude

A simple script allowing you to include html files inside of html
JavaScript
13
star
26

google-image-search

Google Image Search PHP Package
PHP
12
star
27

wordsmith-ui

The UI for the Wordsmith CMS built using the Tallstack
HTML
7
star
28

html5-platform-game

An HTML5 Platform Game created for https://devdojo.com/course/html5-platform-game
JavaScript
7
star
29

pages

This is one of the default themes for the Voyager Themes Hook
JavaScript
6
star
30

dribbble

Dribbble API Package for Laravel
PHP
5
star
31

behance

Behance API Package for Laravel 4
PHP
5
star
32

sample-theme

This is a very basic sample theme for Voyager Themes Hook
HTML
5
star
33

blog

The DevDojo Blog Power-up
Blade
4
star
34

laravel-socialite-tutorial

Laravel Socialite Tutorial
PHP
4
star
35

laravel-wave-api-endpoints

Endpoints for Wave API
4
star
36

welcome

A simple welcome package
PHP
4
star
37

mochi

Mochi Mini Framework
PHP
3
star
38

devblog

Developer Blogging Platform
JavaScript
3
star
39

create-a-php-singleton-class

This is the source code creating in the video 'The PHP Singleton Class'
PHP
3
star
40

forrst

A Forrst API Wrapper Package for Laravel 4
PHP
3
star
41

ninjamediascript

Ninja Media Script Documentation
JavaScript
3
star
42

blockjs

The BlockJS Editor
JavaScript
2
star
43

static-starter

The starter template for Static
HTML
2
star
44

devcoin

This is the repo for stored assets for the DevCoin
2
star
45

slider

A TailwindCSS Slider with multiple flavors including React, Vue, Alpine, and VanillaJS
JavaScript
2
star
46

blockjs-website

Website for BlockJS
CSS
2
star
47

app

This is the repo for the DevDojo products application package
PHP
2
star
48

.github

The Dev Community where we can all create, learn, and grow together.
1
star
49

laravel-deployer-cloudways

This is the repo for the Laravel Deployer Cloudways video
PHP
1
star
50

components

Components for your Laravel applications powered by Volt
Blade
1
star
51

devdojo

The DevDojo NPM CLI
1
star
52

Ninja-Media-Script-Theme-Default

Ninja Media Script Theme - Default
PHP
1
star
53

static.devdojo.com

The repo for the main static website
HTML
1
star