A modern Laravel 12 application for managing club memberships and rewards using Inertia.js with Vue 3 and TypeScript.
# Clone the repository
git clone https://github.com/cwray-tech/club-rewards.git
cd club-rewards
# Install dependencies
composer install
npm install
# Environment setup
cp .env.example .env
php artisan key:generate
# Database setup
php artisan migrate
php artisan db:seed
# Start development servers
composer run devVisit http://localhost:8000 to see the application.
- Getting Started Guide - Complete setup and installation guide
- Project Structure - Overview of the codebase organization
- PHP Development Guide - Backend development patterns and standards
- Frontend Development Guide - Vue 3 + TypeScript development patterns
- Inertia.js Patterns - Full-stack integration patterns
- Testing Guidelines - Testing strategies and best practices
- Common Patterns - Practical examples and reusable patterns
- Troubleshooting Guide - Solutions for common issues
- Backend: Laravel 12 with PHP 8.2+
- Frontend: Vue 3 + TypeScript + Inertia.js
- Styling: Tailwind CSS + shadcn/ui
- Database: MySQL/PostgreSQL
- Testing: Pest PHP + Vue Testing Library
- Build Tool: Vite
This project follows modern Laravel patterns:
- Laravel Action Pattern - Business logic in dedicated Action classes
- Strict Types - All PHP files use
declare(strict_types=1); - Inertia.js - SPA-like experience without API complexity
- TypeScript - Full type safety for frontend code
- Component-Based UI - Reusable Vue components with shadcn/ui
club-rewards/
├── app/
│ ├── Actions/ # Business logic using Laravel Action pattern
│ ├── Http/
│ │ ├── Controllers/ # HTTP controllers returning Inertia responses
│ │ ├── Requests/ # Form request validation
│ │ └── Middleware/ # Custom middleware
│ ├── Models/ # Eloquent models with relationships
│ ├── Policies/ # Authorization policies
│ └── Enums/ # PHP enums for status/roles
├── resources/js/
│ ├── components/ # Vue 3 components
│ ├── pages/ # Inertia page components
│ ├── layouts/ # Vue layouts
│ └── types/ # TypeScript type definitions
├── database/
│ ├── migrations/ # Database schema
│ ├── seeders/ # Database seeders
│ └── factories/ # Model factories
└── docs/ # Project documentation
# PHP formatting
./vendor/bin/pint
# Frontend formatting
npm run format
# TypeScript checking
npm run type-check
# Linting
npm run lint# Backend tests
php artisan test
# Frontend tests
npm run test
# Test coverage
php artisan test --coverage# Run migrations
php artisan migrate
# Seed database
php artisan db:seed
# Reset database
php artisan migrate:fresh --seed- PHP 8.2+
- Node.js 18+
- MySQL/PostgreSQL
- Redis (optional, for caching)
# Install dependencies
composer install --optimize-autoloader --no-dev
npm ci
npm run build
# Environment configuration
cp .env.example .env
# Edit .env with production values
# Database setup
php artisan migrate --force
php artisan config:cache
php artisan route:cache
php artisan view:cache- Follow the coding standards outlined in the documentation
- Write tests for new features
- Use the Action pattern for business logic
- Implement proper TypeScript types
- Follow the established naming conventions
- PHP: Use strict types, follow PSR-12, implement Actions
- Vue: Use Composition API with TypeScript, follow component patterns
- Testing: Write feature and unit tests with Pest PHP
- Documentation: Update relevant docs when adding features
- Club Management - Create and manage clubs with member roles
- Visit Tracking - Track member visits to club locations
- Reward System - Implement points-based reward levels
- User Authentication - Secure user registration and login
- Role-Based Access - Admin, member, and guest roles
- File Uploads - Club logo and image management
- Real-time Updates - Inertia.js for seamless UX
- Laravel's built-in security features
- CSRF protection enabled
- Form request validation
- Authorization policies
- Secure file uploads
- SQL injection prevention
- Database query optimization
- Eager loading for relationships
- Asset optimization with Vite
- Caching strategies
- Pagination for large datasets
Having issues? Check the Troubleshooting Guide for common solutions.
Common issues:
- Strict Types Errors
- Inertia Response Issues
- TypeScript Errors
- Database Issues
- Inertia Testing Issues
This project is open-sourced software licensed under the MIT license.
- Documentation: Check the docs/ directory
- Issues: Create an issue in the repository
- Discussions: Use GitHub Discussions for questions
Built with ❤️ using Laravel, Vue.js, and TypeScript.