Skip to content

Commit 0cbf1fd

Browse files
committed
fix: updated documentation and added release workflow
1 parent ee17228 commit 0cbf1fd

File tree

9 files changed

+797
-6
lines changed

9 files changed

+797
-6
lines changed
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Getting Started
2+
3+
## 📚 Table of Contents
4+
5+
1. [Requirements](#1-requirements)
6+
2. [Installation](#2-installation)
7+
- [Use it as Template](#use-it-as-template)
8+
- [Clone It](#clone-it)
9+
- [Why Using Git?](#using-git)
10+
- [How this works?](#how-this-works)
11+
3. [Features](#3-built-in-features)
12+
- [Auth System](#auth-system)
13+
- [Global Configurations](#global-configurations)
14+
- [Email Templates](#email-templates)
15+
16+
## 1. Requirements
17+
18+
Make sure you have the following installed:
19+
20+
- PHP 8.4+
21+
- Composer
22+
- Node.js & npm (or yarn/pnpm)
23+
24+
## 2. Installation
25+
26+
### Use it as Template
27+
28+
You can just go to github page of this repository from [here](https://github.com/devsbuddy/laravel-react-starter-kit) and select `Use this template` button to create your own repository using this starter-kit.
29+
30+
### Clone it
31+
32+
Or you can clone this starter-kit directly by:
33+
34+
```bash
35+
git clone https://github.com/devsbuddy/laravel-react-starter-kit.git your-awesome-app
36+
```
37+
38+
### Using Git?
39+
40+
**_Why using git clone instead of composer install?_**
41+
42+
This starter kit will only be available as a GitHub repository or a repository template. It will not be released on Packagist, which means you won’t be able to install or create a project using Composer.
43+
44+
The main goal of this starter kit is to be an independent, easy-to-update base that can quickly receive new features or bug fixes in the future.
45+
46+
A common issue with most starter kits is that once you create a project from them, your project can’t easily receive future updates made to the original kit. To solve this, this starter kit works differently — instead of releasing it as a typical package, you can create your project using this kit and then add it as a Git remote in your own repository. This way, you’ll be able to pull future updates directly.
47+
48+
#### How this works?
49+
50+
Git and GitHub already provide a feature that allows you to use multiple remote URLs for a single repository.
51+
Your project will have its own remote URL (usually named `origin`) to track your work, and you can also add this starter kit’s remote URL — for example, as `starter-kit` or `updates` (you can choose any name you like).
52+
53+
In the future, if this starter kit receives new updates, you can simply fetch the latest changes from that remote and merge them into your project. This way, your project will always stay up to date with the starter kit.
54+
55+
> Keep in mind that if you modify any core functionality or features from the starter kit, you might face some merge conflicts when applying future updates. Otherwise, fetching the latest updates will be smooth and straightforward.
56+
57+
**Tip**: Checkout [Updating Guide](UPDATING.md) to know how you can receive future updates.
58+
59+
## 3. Built in features
60+
61+
This starter kit comes with several built-in features that are commonly used across projects. It helps you avoid reinventing the wheel every time by providing a solid foundation with essential features that most projects need.
62+
63+
### Auth System
64+
65+
Every application needs some form of authentication, and this starter kit includes one as well. Like Laravel’s official starter kits, it now supports **`2FA authentication`** as this is a fork of it. This isn’t a new feature in this starter kit — I’ve simply adjusted and tweaked certain parts to match the coding style and conventions of this starter kit otherwise it is from the laravel official starter kit.
66+
67+
### Global Configurations
68+
69+
Whenever you build an application, you often need a central place to store commonly used data that can be easily managed and updated without extra work.
70+
71+
To address this, the starter kit includes a global app configuration feature. It stores information such as `Application Logo`, `Favicon`, `Application Name`, `Email Configurations`, and more in a dedicated database table. You can manage these settings easily from the dashboard and use them throughout the application without worrying about future changes.
72+
73+
### Email Templates
74+
75+
Why use email templates instead of creating a Mailable class every time?
76+
77+
This feature uses dynamic Mailable classes to send emails, so you don’t need to create a new Mailable class, fill in the details, and design the email UI each time.
78+
79+
The starter kit provides two types of dynamic Mailable classes:
80+
81+
1. A regular synchronous class that sends emails immediately during the HTTP request.
82+
2. A queueable class that sends emails in the background using Laravel’s queue system.
83+
84+
Yes, you read that right — this starter kit supports both synchronous and queueable emails to cover all your email needs. You can configure this setting in the Global App Configuration to choose whether emails should be queued or sent immediately. Once set, emails will work automatically according to your preference.
85+
86+
#### More features are coming soon...

.github/docs-stubs/README.stub.md

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
# Laravel + React Starter Kit - ${LATEST_VERSION}
2+
3+
[Shoaib Khan](https://github.com/iamspydey) from [Devs Buddy](https://devsbuddy.com) presenting you a highly opinionated Laravel Starter Kit with Inertia and React. It helps you get up and running quickly with clean, consistent, and fully type-safe code.
4+
5+
## 🧩 Introduction
6+
7+
This starter kit is a fork of [laravel's official react starter kit](https://github.com/laravel/react-starter-kit).
8+
9+
It has been modified to be fully strict, with 100% type safety, and follows an action-oriented pattern.
10+
11+
A few more helpful default features have been added, and the built-in authentication system has been updated to follow these strict rules.
12+
This ensures consistent code quality across your entire project.
13+
14+
---
15+
16+
## 🌟 Inspirations
17+
18+
- [nunomaduro/laravel-starter-kit-inertia-react](https://github.com/nunomaduro/laravel-starter-kit-inertia-react)
19+
- [nunomaduro/laravel-starter-kit](https://github.com/nunomaduro/laravel-starter-kit)
20+
21+
These projects were the main inspiration for creating this starter kit. I’ve added additional features that are essential for most modern applications.
22+
23+
## 🚀 Highlights
24+
25+
1. **Fully Strict Types**: It follows 100% of type coverage for all the classes, methods and logic.
26+
2. **Action Oriented Pattern**: It uses dedicated Action classes for handling business logic and mutations. This keeps your controllers clean and makes actions reusable across your project.
27+
3. **Cruddy by Design**: It embraces the Cruddy by Design pattern to stay aligned with Laravel’s core concepts, making everything easy to understand and extend.
28+
29+
---
30+
31+
## ⚙️ Default features
32+
33+
1. **Authentication**: Based on Laravel’s built-in authentication, with a few tweaks to fit this project’s structure and standards.
34+
2. **Global Configs**: Most apps need some kind of global configuration that can be managed from one place and applied across the app. Includes settings like:
35+
- App Logo
36+
- App Favicon
37+
- Basic Mail Config (excluding mail server credentials)
38+
3. **Mail Templates**: Includes a dynamic mail template system with a flexible Mailable class.
39+
You can create templates with fields like Subject and Content, then send emails by simply calling helper methods with the template code — it just works.
40+
4. **Queuable Mail**: The mailing system combines the global config and mail template features.
41+
If mail queueing is enabled in the config, emails will automatically be pushed to the queue for asynchronous delivery.
42+
5. **Events**: From the beggining this starter kit includes some events that are being fired on each action that may some other action in future, for this I follow to create Event for each action taken in the app, this way in future you just add a listener to listen these events and act upon them.
43+
- Why custom events instead of model observers?
44+
45+
I prefer explicit event handling over “magic” behavior. With custom events, you can keep logic clean and encapsulated inside dedicated listener classes.
46+
47+
6. **Custom Helpers**: Instead of a typical `helpers.php` file, this kit organizes helpers as **Traits**, **Services**, **Support** classes, and **Facades**.
48+
- A small `helpers.php` file is still included for global functions where class imports aren’t possible.
49+
50+
---
51+
52+
## 🧰 Getting Started
53+
54+
### 1. Requirements
55+
56+
Make sure you have the following installed:
57+
58+
- PHP 8.4+
59+
- Composer
60+
- Node.js & npm (or yarn/pnpm)
61+
62+
### 2. Installation
63+
64+
Clone the repository and install dependencies:
65+
66+
```bash
67+
git clone https://github.com/devsbuddy/laravel-react-starter-kit.git your-awesome-app
68+
```
69+
70+
### Setup
71+
72+
Navigate to newly created prject directory and run setup commands
73+
74+
```bash
75+
cd your-awesome-app # Navigate to the project directory
76+
77+
composer setup # Install all deps and setup project
78+
```
79+
80+
### Configure
81+
82+
By default this starter kit uses sqlite database and if you want to use other database driver you can configure that in your `.env` file:
83+
84+
```bash
85+
# Example PostgreSQL Config
86+
87+
DB_CONNECTION=pgsql
88+
DB_HOST=127.0.0.1
89+
DB_PORT=5432
90+
DB_DATABASE=your_awesome_app
91+
DB_USERNAME=postgres
92+
DB_PASSWORD=
93+
```
94+
95+
After configuring new database you can run migration and seeders:
96+
97+
```bash
98+
php artisan migrate --seed
99+
100+
# OR
101+
102+
php artisan migrate:fresh --seed
103+
```
104+
105+
### Start development server
106+
107+
Now as the app is all setup correctly you can start working on it:
108+
109+
```bash
110+
# Start development server
111+
composer dev
112+
```
113+
114+
### Check on browser
115+
116+
After running your development server you can visit to [http://localhost:8000](http://localhost:8000) or [http://127.0.0.1:8000](http://127.0.0.1:8000) on your favorite browser to see the app in action.
117+
118+
### Documentatin
119+
120+
You can find more refined and detailed [Documentation](DOCUMENTATION.md) here.
121+
122+
### 🤝 Contributing
123+
124+
Contributions are welcome!
125+
If you’d like to improve this starter kit, feel free to:
126+
127+
1. Fork the repository
128+
2. Create a new feature branch (`git checkout -b feature/your-feature`)
129+
3. Commit your changes (`git commit -m 'Added some feature'`)
130+
4. Push to the branch (`git push origin feature/your-feature`)
131+
5. Open a Pull Request
132+
133+
Please make sure your code follows the existing structure and style conventions also all tests are passing.
134+
135+
### 📄 License
136+
137+
This project is open-source and available under the MIT License.

0 commit comments

Comments
 (0)