LaraCars is a modern, full-featured car listing platform built with Laravel and Alpine.js. It provides a seamless experience for users to discover, list, and manage cars for sale with a beautiful, responsive interface.
- π User Authentication - Secure registration and login system
- π Car Listings - Create, read, update, and delete car listings
- πΌοΈ Image Upload - Upload and manage car images with automatic storage
- π Advanced Search - Search and filter listings by tags, title, and description
- π·οΈ Tag System - Organize listings with custom tags
- π° Price Management - Display and manage car prices
- π± Responsive Design - Beautiful UI that works on all devices
- π¨ Modern UI - Built with TailwindCSS for a premium look
- β‘ Fast & Lightweight - Optimized performance with Alpine.js
- π‘οΈ Form Validation - Comprehensive validation for all user inputs
- π€ User Dashboard - Manage your listings from a personal dashboard
- Laravel 9.x - PHP framework for web artisans
- PHP 8.0+ - Modern PHP with type safety
- MySQL - Relational database management
- Alpine.js - Lightweight JavaScript framework
- TailwindCSS 3.x - Utility-first CSS framework
- Blade Templates - Laravel's powerful templating engine
- Laravel Mix - Asset compilation and bundling
- Composer - PHP dependency management
- NPM - JavaScript package management
- Vite - Next-generation frontend tooling
- PHP >= 8.0.2
- Composer
- Node.js & NPM
- MySQL 5.7+ or MariaDB 10.3+
- PHP Extensions:
- BCMath
- Ctype
- Fileinfo
- JSON
- Mbstring
- OpenSSL
- PDO
- Tokenizer
- XML
- cURL
git clone https://github.com/kisio/LaraCars.git
cd LaraCars# Install PHP dependencies
composer install --ignore-platform-reqs
# Install JavaScript dependencies
npm install# Copy the example environment file
cp .env.example .env
# Generate application key (if PHP XML extension is available)
php artisan key:generate
# If the above fails, manually set APP_KEY in .env
# Generate a key at: https://generate-random.org/laravel-key-generatorEdit .env and set your database credentials:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laracars
DB_USERNAME=your_username
DB_PASSWORD=your_passwordCreate the database:
mysql -u your_username -p
CREATE DATABASE laracars;
exit;php artisan migratephp artisan storage:link# For development
npm run dev
# For production
npm run productionphp artisan serveThe application will be available at: http://localhost:8000
# Run all tests
./vendor/bin/phpunit
# Run specific test suite
./vendor/bin/phpunit --testsuite Feature
./vendor/bin/phpunit --testsuite Unit
# Run with coverage
./vendor/bin/phpunit --coverage-html coverage- Homepage: http://localhost:8000 - Browse all car listings
- Register: http://localhost:8000/register - Create a new account
- Login: http://localhost:8000/login - Sign in to your account
- Create Listing: http://localhost:8000/listings/create - Add a new car (requires authentication)
- Manage Listings: http://localhost:8000/listings/manage - View and edit your listings
- Browse Listings - Visit the homepage to see all available cars
- Search - Use the search bar to find specific cars by keywords
- Filter by Tags - Click on tags to filter listings by category
- View Details - Click on any listing to see full details and contact information
- Register/Login - Create an account or sign in
- Create Listing:
- Navigate to "List a Car" from your dashboard
- Fill in car details (title, company, location, price, etc.)
- Add tags for better discoverability
- Upload a high-quality image
- Submit the listing
- Manage Listings:
- View all your listings from the dashboard
- Edit listing details anytime
- Delete listings when sold
- Contact Management - Buyers can reach you via the email provided in your listing
LaraCars/
βββ app/
β βββ Http/
β β βββ Controllers/
β β β βββ ListingController.php # Car listing CRUD operations
β β β βββ UserController.php # Authentication & user management
β β βββ Requests/
β β βββ StoreListingRequest.php # Listing creation validation
β β βββ UpdateListingRequest.php # Listing update validation
β β βββ StoreUserRequest.php # User registration validation
β βββ Models/
β βββ Listing.php # Listing model with search scope
β βββ User.php # User model
βββ database/
β βββ migrations/ # Database schema migrations
βββ resources/
β βββ views/ # Blade templates
βββ routes/
β βββ web.php # Application routes
βββ public/ # Public assets
βββ storage/ # File storage
βββ tests/ # Test suites
Maximum image size: 2MB
Allowed formats: JPEG, PNG, JPG, GIF, SVG
To change these settings, edit app/Http/Requests/StoreListingRequest.php:
'image' => 'nullable|image|max:2048', // Change max size (in KB)Default listings per page: 4
To change, edit app/Http/Controllers/ListingController.php:
'listings' => Listing::latest()->filter(request(['tag', 'search']))->paginate(4)- Set
APP_ENV=productionin.env - Set
APP_DEBUG=falsein.env - Configure production database credentials
- Set up proper mail configuration
- Run
composer install --optimize-autoloader --no-dev - Run
npm run production - Run
php artisan config:cache - Run
php artisan route:cache - Run
php artisan view:cache - Set up SSL certificate (HTTPS)
- Configure proper file permissions
- Set up automated backups
This application can be deployed to:
- Laravel Forge - Recommended for Laravel apps
- DigitalOcean - App Platform or Droplet
- AWS - EC2, Elastic Beanstalk, or Lightsail
- Heroku - With ClearDB MySQL addon
- Shared Hosting - Any host supporting PHP 8.0+
Contributions are welcome! Please follow these guidelines:
- Fork the Repository - Create your own fork of the project
- Create a Feature Branch -
git checkout -b feature/AmazingFeature - Follow PSR-12 - Adhere to PHP coding standards
- Write Tests - Add tests for new features
- Commit Changes -
git commit -m 'Add some AmazingFeature' - Push to Branch -
git push origin feature/AmazingFeature - Open Pull Request - Submit a PR with a clear description
This project follows PSR-12 coding standards. Run the following before committing:
# Format code (if you have PHP CS Fixer installed)
./vendor/bin/php-cs-fixer fixIf you discover a bug, please create an issue on GitHub with:
- Clear bug description
- Steps to reproduce
- Expected vs actual behavior
- Screenshots (if applicable)
- Environment details (PHP version, OS, etc.)
This project is licensed under the MIT License - see the LICENSE file for details.
Kisio
- GitHub: @kisio
- Laravel - The PHP framework for web artisans
- Alpine.js - Your new lightweight JavaScript framework
- TailwindCSS - A utility-first CSS framework
- Laravel Community - For excellent documentation and support
For support and questions:
- Create an issue on GitHub
- Check existing issues for solutions
- Review the Laravel Documentation
Future enhancements planned:
- Advanced filtering (price range, location, etc.)
- User ratings and reviews
- Favorite/wishlist functionality
- Email notifications for new listings
- Admin dashboard
- API endpoints for mobile apps
- Multi-language support
- Social media integration
- Car comparison feature
- Payment integration for premium listings
Made with β€οΈ using Laravel and Alpine.js
Live Demo: Coming soon!
Documentation: Wiki
Issues: GitHub Issues