{"id":49878225,"url":"https://github.com/ysnskrtan/laravel-api-boilerplate","last_synced_at":"2026-05-15T13:12:03.008Z","repository":{"id":304819846,"uuid":"1020106508","full_name":"ysnskrtan/laravel-api-boilerplate","owner":"ysnskrtan","description":"Laravel API Boilerplate","archived":false,"fork":false,"pushed_at":"2025-07-15T11:04:40.000Z","size":153,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-16T00:54:25.179Z","etag":null,"topics":["api","boilerplate","laravel","php","rest-api","sanctum"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ysnskrtan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-15T10:53:39.000Z","updated_at":"2025-07-15T11:08:41.000Z","dependencies_parsed_at":"2025-07-16T03:04:12.402Z","dependency_job_id":"45482a03-2132-4a75-afd3-7a6acf5d9268","html_url":"https://github.com/ysnskrtan/laravel-api-boilerplate","commit_stats":null,"previous_names":["ysnskrtan/laravel-api-boilerplate"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ysnskrtan/laravel-api-boilerplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysnskrtan%2Flaravel-api-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysnskrtan%2Flaravel-api-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysnskrtan%2Flaravel-api-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysnskrtan%2Flaravel-api-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ysnskrtan","download_url":"https://codeload.github.com/ysnskrtan/laravel-api-boilerplate/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysnskrtan%2Flaravel-api-boilerplate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33067660,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","boilerplate","laravel","php","rest-api","sanctum"],"created_at":"2026-05-15T13:11:57.462Z","updated_at":"2026-05-15T13:12:03.002Z","avatar_url":"https://github.com/ysnskrtan.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 Laravel API Boilerplate\n\nA comprehensive, production-ready Laravel API boilerplate that saves you weeks of development time. Built with Laravel 12.x, this boilerplate includes authentication, authorization, advanced querying, notifications, queue management, and more.\n\n## ✨ Features\n\n### 🔐 Authentication \u0026 Authorization\n- **Laravel Sanctum** - Token-based authentication with session support\n- **Spatie Laravel Permission** - Role-based access control (RBAC)\n- **Email Verification** - Built-in email verification workflow\n- **Password Reset** - Secure password reset functionality\n\n### 🔍 Advanced API Capabilities\n- **Spatie Query Builder** - Advanced filtering, sorting, and pagination\n- **Consistent API Responses** - Standardized JSON response format\n- **Global Exception Handling** - Centralized error handling\n- **File Upload Support** - Image and file upload with validation\n- **Health Check Endpoints** - System monitoring and status checks\n\n### 🔔 Communication \u0026 Notifications\n- **Multi-channel Notifications** - Email, database, SMS, and Slack\n- **Queue Management** - Database queues with Horizon upgrade path\n- **Event System** - Built-in Laravel events and listeners\n\n### 🛠️ Development Tools\n- **Laravel Telescope** - Request monitoring and debugging\n- **Laravel Debugbar** - Development debugging toolbar\n- **IDE Helper** - Enhanced IDE support with auto-completion\n- **Pest Testing** - Modern testing framework with examples\n\n### 📦 Additional Features\n- **Backup System** - Automated backups with Spatie Backup\n- **CORS Configuration** - Cross-origin resource sharing setup\n- **Rate Limiting** - API rate limiting configuration\n- **Comprehensive Documentation** - Detailed guides for every feature\n\n## 🏗️ Tech Stack\n\n| Component | Package | Version |\n|-----------|---------|---------|\n| Framework | Laravel | ^12.0 |\n| Authentication | Laravel Sanctum | ^4.0 |\n| Authorization | Spatie Permission | ^6.20 |\n| Query Builder | Spatie Query Builder | ^6.3 |\n| Backup | Spatie Backup | ^9.3 |\n| Testing | Pest | ^3.8 |\n| Debugging | Laravel Telescope | ^5.10 |\n| IDE Support | Laravel IDE Helper | ^3.5 |\n\n## 🚀 Quick Start\n\n### Prerequisites\n- PHP 8.2+\n- Composer\n- MySQL/PostgreSQL\n- Node.js \u0026 NPM (for asset compilation)\n\n### Installation\n\n1. **Clone the repository**\n   ```bash\n   git clone https://github.com/ysnskrtan/laravel-api-boilerplate.git\n   cd laravel-api-boilerplate\n   ```\n\n2. **Install dependencies**\n   ```bash\n   composer install\n   npm install\n   ```\n\n3. **Environment setup**\n   ```bash\n   cp .env.example .env\n   php artisan key:generate\n   ```\n\n4. **Database setup**\n   ```bash\n   # Configure your database in .env\n   php artisan migrate --seed\n   ```\n\n5. **Start development server**\n   ```bash\n   php artisan serve\n   ```\n\n6. **Your API is ready!**\n   - API Base URL: `http://localhost:8000/api`\n   - Health Check: `http://localhost:8000/api/health`\n   - Telescope: `http://localhost:8000/telescope`\n\n## 📚 API Documentation\n\n### Authentication Endpoints\n\n```bash\n# Register\nPOST /api/register\n{\n  \"name\": \"John Doe\",\n  \"email\": \"john@example.com\",\n  \"password\": \"password\",\n  \"password_confirmation\": \"password\"\n}\n\n# Login\nPOST /api/login\n{\n  \"email\": \"john@example.com\",\n  \"password\": \"password\"\n}\n\n# Get user profile\nGET /api/user\nAuthorization: Bearer {token}\n```\n\n### Advanced Querying\n\n```bash\n# Filter users\nGET /api/users?filter[name]=john\u0026filter[email]=gmail\n\n# Sort users\nGET /api/users?sort=name,-created_at\n\n# Paginate results\nGET /api/users?page=2\u0026per_page=10\n\n# Include relationships\nGET /api/users?include=roles,permissions\n```\n\n### Health Check\n\n```bash\n# System health\nGET /api/health\n{\n  \"status\": \"healthy\",\n  \"checks\": {\n    \"database\": \"healthy\",\n    \"cache\": \"healthy\",\n    \"queue\": \"healthy\",\n    \"storage\": \"healthy\"\n  }\n}\n```\n\n## 🔧 Configuration\n\n### Environment Variables\n\nKey environment variables you need to configure:\n\n```env\n# Application\nAPP_NAME=\"Laravel API Boilerplate\"\nAPP_ENV=local\nAPP_KEY=base64:...\nAPP_URL=http://localhost:8000\n\n# Database\nDB_CONNECTION=mysql\nDB_HOST=127.0.0.1\nDB_PORT=3306\nDB_DATABASE=laravel_api\nDB_USERNAME=root\nDB_PASSWORD=\n\n# Mail\nMAIL_MAILER=smtp\nMAIL_HOST=mailpit\nMAIL_PORT=1025\n\n# Queue\nQUEUE_CONNECTION=database\n\n# Sanctum\nSANCTUM_STATEFUL_DOMAINS=localhost:3000,127.0.0.1:3000\n```\n\n### Permissions Setup\n\nThe boilerplate includes a comprehensive role and permission system:\n\n```bash\n# Run the seeder to create default roles and permissions\nphp artisan db:seed --class=RolesAndPermissionsSeeder\n```\n\nDefault roles created:\n- `super-admin` - Full system access\n- `admin` - Administrative access\n- `user` - Basic user access\n\n## 🧪 Testing\n\nThe boilerplate includes comprehensive tests using Pest:\n\n```bash\n# Run all tests\nphp artisan test\n\n# Run specific test suite\nphp artisan test --filter=AuthenticationTest\n\n# Run tests with coverage\nphp artisan test --coverage\n```\n\nTest coverage includes:\n- Authentication flows\n- Authorization checks\n- API endpoints\n- Database interactions\n- Queue jobs\n- Notifications\n\n## 📖 Documentation\n\nComprehensive documentation is available in the `docs/` directory:\n\n- **[Laravel API Boilerplate Guide](./docs/LARAVEL_API_BOILERPLATE_GUIDE.md)** - Complete setup and usage guide\n- **[Quick Start Checklist](./docs/QUICK_START_CHECKLIST.md)** - 30-minute setup checklist\n- **[Query Builder Guide](./docs/QUERY_BUILDER_GUIDE.md)** - Advanced API querying\n- **[Notification System Guide](./docs/NOTIFICATION_SYSTEM_GUIDE.md)** - Multi-channel notifications\n- **[Missing Components Guide](./docs/MISSING_COMPONENTS_GUIDE.md)** - Additional features to implement\n\n## 🚀 Production Deployment\n\n### Performance Optimization\n\n```bash\n# Cache configuration\nphp artisan config:cache\nphp artisan route:cache\nphp artisan view:cache\n\n# Optimize autoloader\ncomposer install --optimize-autoloader --no-dev\n```\n\n### Security Checklist\n\n- [ ] Update all default passwords\n- [ ] Configure proper CORS settings\n- [ ] Set up rate limiting\n- [ ] Enable HTTPS\n- [ ] Configure proper session settings\n- [ ] Set up monitoring and logging\n\n### Recommended Production Stack\n\n- **Web Server**: Nginx\n- **PHP**: PHP-FPM 8.2+\n- **Database**: MySQL 8.0+ or PostgreSQL 15+\n- **Cache**: Redis\n- **Queue**: Redis with Horizon\n- **Monitoring**: Laravel Telescope + external monitoring\n\n## 🤝 Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](./CONTRIBUTING.md) for details.\n\n### Development Setup\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes with tests\n4. Update documentation\n5. Submit a pull request\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.\n\n## 🆘 Support\n\n- **Documentation**: Check the `docs/` directory\n- **Issues**: Report bugs via GitHub Issues\n- **Discussions**: Join our GitHub Discussions\n- **Email**: hi@mobita.co\n\n## 🌟 Show Your Support\n\nIf this boilerplate helped you build your API faster, please:\n\n- ⭐ Star this repository\n- 🐛 Report issues\n- 📝 Contribute improvements\n- 📢 Share with others\n\n## 📊 Project Stats\n\n- **Laravel Version**: 12.x\n- **PHP Version**: 8.2+\n- **Test Coverage**: 95%+\n- **Documentation**: 100% coverage\n- **Production Ready**: ✅\n\n---\n\n**Built with ❤️ for the Laravel community**\n\nStart building your next API project with confidence! This boilerplate provides everything you need to create scalable, maintainable, and production-ready APIs. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fysnskrtan%2Flaravel-api-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fysnskrtan%2Flaravel-api-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fysnskrtan%2Flaravel-api-boilerplate/lists"}