Skip to content

cristianscheid/users-crud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Users CRUD

Description

A simple CRUD application designed to demonstrate the integration of Laravel with React via a RESTful API. This project provides a clear example of connecting a Laravel backend with a React frontend, featuring user authentication, login functionality, and basic operations for managing user data.

Features

  • Secure sign-up, login, and logout functionality using token-based authentication with Laravel Sanctum.
  • Basic operations for creating, reading, updating, and deleting user records.
  • Pagination on the frontend for navigating through user data.
  • Feedback notifications for actions like adding, deleting, and updating records.
  • Password validation and required field checks to ensure data integrity and correctness.

Built With

PHP Laravel MySQL

JavaScript React CSS

Visuals

demo.mp4

Installation

To get started with this project, follow the steps below:

  1. Clone the repository

    git clone https://github.com/cristianscheid/users-crud.git
    cd users-crud
    
  2. Set up backend environment

    • Navigate to the backend directory (users-crud/backend/).

    • Install dependencies:

      composer install
      
    • Set up environment variables:

      cp .env.example .env
      

      Open the .env file and configure your database and other settings (you can keep the default settings to use SQLite for simplicity).

    • Generate application key:

      php artisan key:generate --ansi
      
    • Run database migrations and seed the database:

      php artisan migrate --seed
      
  3. Set up frontend environment

    • Navigate to the frontend directory (users-crud/frontend/).

    • Install dependencies:

      npm install
      
    • Set up environment variables:

      cp .env.example .env
      

      Open the .env file and set the API base URL to point to your Laravel application (default: http://localhost:8000).

  4. Start the servers

    • From backend directory (users-crud/backend/):

      php artisan serve
      
    • From frontend directory (users-crud/frontend/):

      npm run dev
      

    Usage

    Once the application is running, you can access it at http://localhost:5173.

    License

    Distributed under the MIT License. See LICENSE.txt for more information.

About

Simple CRUD application developed to showcase the integration of Laravel and React via a RESTful API. It includes user authentication and provides basic CRUD operations for managing users.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors