A Laravel Livewire CRUD application to manage users with features like image upload, country selection, and gender specification. Built using TDD, adheres to DDD best practices, and implements clean, maintainable code structure.
✅ Create, Read, Update, Delete (CRUD) for users
- 📸 Profile picture upload (with image validation)
- 🌍 Country selection from a predefined list
- 👨👩👧 Gender selection
- 🔒 Password and password confirmation
- 🔎 View individual user details
- 🔔 Flash messages for create, update, delete actions
- ✅ Livewire-powered UI for smooth interaction
- 🧪 Fully tested with Feature tests using Laravel’s built-in tools and Livewire testing utilities
App\Livewire\– Livewire components for User CRUD (CreateUser, EditUser, UserList, UserView, DeleteUser)App\Models\User– Extended to support profile image storageDatabase\Factories\UserFactory– Generates test and dummy users, including imagesresources/views– Blade views with Tailwind CSS styling
Located in tests/Feature/UserLivewireTest.php, covering:
- ✅ User creation
- ✅ User update
- ✅ User deletion (with confirmation)
- ✅ Viewing user details
- ✅ Listing all users
php artisan testOr sun a specific test:
php artisan test tests/Feature/UserLivewireTest.phpgit clone https://github.com/awizendd/tech-task.git
cd tech-taskcomposer install
npm install
npm run devcp .env.example .env
php artisan key:generateUpdate .env:
DB_CONNECTION=mysql
DB_DATABASE=your_database
DB_USERNAME=root
DB_PASSWORD=Then:
php artisan migratephp artisan serveVisit: http://127.0.0.1:8000
- Laravel 10+
- Laravel Livewire
- Alpine.js
- Tailwind CSS
- SQLite/MySQL
- PHPUnit & Laravel Test Framework
- 🔁 Animated alert messages using Tailwind transitions
- 🧪 TDD methodology with red-green cycle
- 📸 Image storage in storage/app/public/profile_picture
- 🧪 Factories used for database seeding and testing
To contribute:
- Fork the repository
- Create your branch (git checkout -b feature/feature-name)
- Commit your changes (git commit -m 'Add feature')
- Push to the branch (git push origin feature/feature-name)
- Open a Pull Request
MIT License © Emmanuel John