Skip to content

bjornleonhenry/laravel-react-frontend

Repository files navigation

Laravel React Frontend

A standalone React frontend application designed to work with Laravel backends, featuring modern UI components and decoupled architecture.

Features

  • 🔐 Complete authentication system (login, register, password reset)
  • 👤 User profile management
  • 🎨 Modern UI with Shadcn/ui components
  • 🔌 Decoupled from Laravel backend (works with any Laravel API)
  • 📱 Responsive design
  • ⚡ Fast development with Vite

Tech Stack

  • React - Frontend framework
  • TypeScript - Type-safe development
  • Shadcn/ui - Modern UI component library
  • Tailwind CSS - Utility-first styling
  • Vite - Fast build tool and dev server

Backend Requirements

This frontend expects a Laravel backend with the following API endpoints:

// Authentication endpoints
AUTH_CSRF: 'csrf-cookie'
AUTH_LOGIN: 'login'
AUTH_LOGOUT: 'logout'
AUTH_REGISTER: 'register'
AUTH_FORGOT_PASSWORD: 'forgot-password'
AUTH_RESET_PASSWORD: 'reset-password'
AUTH_GET_USER: 'user'

// User management endpoints
SETTINGS_UPDATE_PROFILE_INFORMATION: 'user/profile-information'
SETTINGS_UPDATE_PASSWORD: 'user/password'
SETTINGS_DELETE_USER: 'user'

Environment Configuration

Create a .env.local file with:

VITE_API_BASE_URL=http://localhost:8000/api

Getting Started

Prerequisites

  • Node.js (v16 or higher)
  • npm or yarn or pnpm

Installation

  1. Install dependencies:
npm install
# or
yarn install
# or
pnpm install
  1. Start the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
  1. Open your browser and navigate to http://localhost:5173

Building for Production

npm run build
# or
yarn build
# or
pnpm build

About

laravel-react-frontend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published