Skip to content

wayjay4/todo_laravel_react_app

Repository files navigation

Todo App

A Todo demo application to illustrate Laravel with Inertia/React.

TodoApp_screenshot.png

Backend Framework:

Frontend Framework:

Frontend installed packages:

Note:

  • using server-side mysql database to save todo data
  • using react zustand for props state management
  • Docker/Sail is installed

Local Dev Installation

Clone the repo locally:

git clone https://github.com/wayjay4/todo_laravel_react_app.git todoapp

Go into todoapp dir:

cd todoapp

Install PHP dependencies (composer v2.6.6):

composer install

Install NPM dependencies (node v20.11.0, npm v10.3.0):

Node

nvm install <version>
nvm use <version>

Npm

npm install npm@x.x.x -g

Build assets:

npm install
npm run dev

Two options to serve the Todo Application

  • 1.) using php artisan serve and local database (see instructions below)
  • 2.) using docker service container (see instructions below)

1.) Serve application with php artisan and local database

Setup configuration:

cp .env.example .env

Generate application key:

php artisan key:generate

Create a local MySql database. You can also use another database (SQLite, Postgres), simply update your configuration accordingly.

  • open .env file and change db settings as needed
  • make database as needed

env_conf_mysql_setting_screenshot.png

Run database migrations and seeder:

php artisan migrate:fresh --seed

Run the dev server (the output will give the address):

php artisan serve

You're ready to go! Visit Todo App in your browser!


2.) Serve application with Docker/Sail

Setup configuration:

cp .env.docker .env

Generate application key:

php artisan key:generate

Install Docker

Make sure you have installed and started Docker Desktop Application:

Start Docker/Sail:

./vendor/bin/sail up

Configuring A Shell Alias for 'sail' (optional)

sail up

Run database migrations and seeder for db service container:

sail artisan migrate:fresh --seed

You're ready to go! Visit Todo App in your browser!:

http://localhost/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published