- 🔐 Sanctum SPA Auth - CSRF protected sessions
- 📝 Posts CRUD - Full content management
- 👑 Admin Panel - User & content moderation
- 📱 Mobile Responsive - Touch-friendly UI for all devices
- 🏪 Content Store - Digital content marketplace with CRUD
- ⚡ MobX State - Atomic transactions with runInAction
- 🐳 Docker Setup - One-command development
git clone https://github.com/lsthisloss/lara-react.git
cd lara-react
chmod +x run.sh && ./run.sh
./run.sh
# Select 1Первый сетап считается успешно запущенным если вы увидели вывод такого типа:
[+] Building 2/2
✔ frontend Built 0.0s
✔ backend Built 0.0s
Starting containers...
[+] Running 6/6
✔ Network laravel-react-app_app-network Created 0.0s
✔ Volume "laravel-react-app_dbdata" Created 0.0s
✔ Container laravel-db Healthy 9.1s
✔ Container laravel-backend Healthy 14.7s
✔ Container laravel-nginx Started 9.4s
✔ Container react-frontend Started 14.9s
Generating application key...
INFO Application key set successfully.
✅ First setup complete!
Frontend: http://localhost:3000
Backend: http://localhost:8000
Database: localhost:5432Auth:
POST /api/register- User registrationPOST /api/login- User authenticationPOST /api/logout- User logout
User Management:
GET /api/user- Get current user infoPUT /api/user/profile- Update user profilePUT /api/user/password- Change user passwordGET /api/users- Get all users listGET /api/users/{id}/profile- Get specific user profile
Posts:
GET /api/posts- List posts (with pagination)POST /api/posts- Create postGET /api/posts/{id}- Get postPUT/PATCH /api/posts/{id}- Update postDELETE /api/posts/{id}- Delete post
Admin:
GET /api/admin/dashboard- Dashboard statsGET /api/admin/users- User managementPATCH /api/admin/users/{user}/toggle-admin- Toggle admin status
Ready-to-use Postman collection for testing all API endpoints:
📁 Collection Location: backend/postman_collection.json
Import Steps:
- Open Postman
- Click Import → Upload Files
- Select
backend/postman_collection.json - Collection "Laravel React SPA API" will be added
Pre-configured:
- ✅ Base URL:
http://localhost:8000/api - ✅ Authentication token variable
- ✅ All endpoints with sample requests
- ✅ Environment variables for easy switching
Usage:
- Register/Login to get auth token
- Token automatically saves to
{{auth_token}}variable - All protected routes use Bearer authentication
- Test all CRUD operations with sample data
Email: admin@dev.pro
Password: password
| Layer | Technology |
|---|---|
| Frontend | React 19 + MobX + TypeScript + Ant Design |
| Backend | Laravel 11 + Sanctum Auth |
| Database | PostgreSQL |
| DevOps | Docker Compose |
| Mobile | Responsive Design + Touch UI |
- 📱 Mobile-First Design - Optimized for all screen sizes
- 🎯 Touch-Friendly UI - Ant Design responsive components
- 📊 Adaptive Tables - Horizontal scroll on mobile devices
- 🔧 Modal Optimization - Dynamic sizing for small screens
- ⚡ Fast Performance - Optimized for mobile networks
- 🔄 MobX Reactivity - Atomic state updates with runInAction for smooth UI
Built with ❤️ by sk8 for modern web development
Development Timeline 6h


