Laravel Developer Applicant Challenge
As part of the application process, you’ve been requested to complete the following challenge. If you have any questions, please respond to the last email you received from our team.
Introduction:
Welcome to the Awesome Motive Laravel Developer Challenge! This challenge is designed to help us understand your skills and approach to building robust, maintainable, and well-tested applications using the Laravel framework. We appreciate you taking the time to participate.
The goal is to showcase your architectural thinking, problem-solving abilities, and proficiency with Laravel, particularly in a scenario that allows for your agency in making design and implementation decisions. We are interested in how you build as much as what you build.
The Challenge: FlashcardPro
You are tasked with building a “FlashcardPro” application. This application will allow users to create, manage, and study flashcards. The primary interface for creating, managing, and studying cards should be built using Laravel and Laravel Livewire.
- Core Scenario: Users should be able to register/login, create and manage their flashcards, organize them into decks, and then study cards from a chosen deck. Additionally, some card data should be exposable via an API.
- Design Inspiration: We’ve provided some rudimentary UI mockups for inspiration, which you can view here: FlashcardPro UI Mockups. You are not strictly bound by these designs; feel free to adapt or create your own, but they may help visualize some of the core features.
Core Requirements:
Your FlashcardPro application should implement the following high-level features:
- User Authentication:
- Standard user registration and login.
- Protected routes/functionality for authenticated users.
- User Flashcard & Deck Management:
- Allow users to:
- Create, read, update, and delete flashcards (with at least a question and answer field).
- Organize cards into “decks” (e.g., by creating/editing decks and assigning cards to them).
- Protected routes/functionality for authenticated users.
- Allow users to:
- Study Feature (Livewire Frontend):
- Implement a feature using Livewire (and Tailwind CSS) that allows an authenticated user to “test themselves” with the cards from one of their decks. The exact mechanism (e.g., random display, one-by-one reveal) is up to you.
- Implement a feature using Livewire (and Tailwind CSS) that allows an authenticated user to “test themselves” with the cards from one of their decks. The exact mechanism (e.g., random display, one-by-one reveal) is up to you.
- Public API for Cards:
- Implement a few public API endpoints that allow for fetching card data (e.g., cards from a specific public deck, or all public cards – you can decide on the scope).
- These API endpoints must be secured by an authentication mechanism of your choice.
- Database:
- Set up the necessary database schema using Laravel migrations.
- Seed the database with some initial data for at least a couple of users, with decks and cards to demonstrate functionality.
- (Bonus) Vue.js Integration:
- As a bonus, you can incorporate Vue.js for a specific interactive element or a complementary part of the user interface if you wish to showcase your skills with it alongside Livewire.
Technical Specifications & Constraints:
- Framework: Latest stable version of Laravel.
- Database: Use any database supported by Laravel (SQLite is fine for simplicity). Define the schema using Laravel migrations. Seed some initial data for several users with decks and cards.
- Eloquent ORM: Utilize Eloquent for all database interactions, including relationships (one-to-many, many-to-many if you find a use case), accessors/mutators, and query scopes where appropriate.
- Validation: Implement robust input validation for all incoming data (e.g., using Form Requests).
- Error Handling: Implement graceful error handling.
- Testing (Critical):
- Write comprehensive unit and feature tests (PHPUnit or Pest).
- Aim for high test coverage.
- Middleware: Implement at least one custom middleware. This could be related to your API key authentication, request logging, or another relevant aspect of the application.
- Service Container & Dependency Injection: Structure your business logic effectively. While specific patterns like service or action classes are not mandated, demonstrate good organization and testability in your code.
Attention to Detail:
- Naming Conventions:
- All custom classes, methods, and database tables/columns should follow Laravel’s standard naming conventions. Prioritize clarity and convention.
- Code Standards: Adhere to PSR-12 coding standards.
- Security:
- Properly sanitize inputs and escape outputs where necessary (though API resources help with output).
- Implement authorization correctly (e.g., using Policies or Gates) to ensure users can only access their own data.
AI Tool Usage Policy:
We encourage the use of AI-powered tools (like GitHub Copilot, ChatGPT, etc.) as part of a modern development workflow. We believe these tools can significantly enhance productivity and efficiency. Our primary interest is in your ability to leverage these tools effectively and integrate their output into a high-quality, well-understood solution.
- Encouraged Uses: You are encouraged to use AI tools for any part of this challenge where you believe it will help you build a better solution, faster. This includes, but is not limited to:
- Generating boilerplate code (e.g., migrations, controller methods, test shells).
- Assisting with syntax lookups and code completion.
- Suggesting refactorings or alternative implementations for code you’ve written.
- Brainstorming solutions or approaches to specific problems.
- Generating core logic or features, provided you thoroughly review, understand, test, and can explain the generated code.
- Understanding & Accountability: The key is that you are responsible for all code submitted. You must:
- Thoroughly understand any code generated or assisted by AI.
- Be able to explain its functionality and justify the design decisions behind it, as well as the prompt used to generate the code.
- Be able to debug any issues that arise from it.
- Integrate AI-assisted code thoughtfully into the overall architecture.
- Disclosure Requirement: Transparency is crucial. In your README.md, please provide a detailed account of your AI tool usage:
- Specify which AI tools were used (e.g., ChatGPT, Cursor, GitHub Copilot).
- For each significant use, describe:
- When: At what stage of development or for which feature.
- Where: Which specific files or modules were affected.
- Why: What was the goal of using the AI tool for that specific part.
- How: Briefly describe the nature of the assistance. We encourage you to share examples of effective prompts you used, as this demonstrates your skill in leveraging AI tools.
- The goal is to understand your process, your prompting strategy, and how AI contributed to it.
- Our Evaluation: We will evaluate your ability to effectively use AI tools—including skilled prompting—to produce a high-quality, well-documented, and thoroughly tested solution that you can confidently explain and defend. Simply submitting large amounts of unvetted AI-generated code is not the objective.
Submission Guidelines:
- Format: Submit a single ZIP file containing your complete Laravel project.
- Version Control: The submission must include the .git directory with a meaningful commit history. Show your work and thought process through your commits.
- Environment:
- Include an .env.example file.
- Specify the PHP and Laravel versions used in your README.md.
- Instructions for setting up with Laravel Sail (sail up) or a similar Docker-based environment are highly encouraged for ease of evaluation.
- README.md File: This is crucial. It must include:
- Your Name and Email.
- PHP and Laravel versions used.
- Detailed step-by-step setup instructions (including how to run migrations and seeders).
- Clear instructions on how to execute the test suite.
- A brief explanation of key architectural decisions or any assumptions made.
- Your AI tool usage disclosure.
- (Optional) Any notes on parts of the challenge you found particularly interesting or challenging.
- Deadline: Please submit your solution within 10 days of receiving this challenge. If you anticipate any difficulties meeting this deadline, please communicate with us as soon as possible.
- Submission Method: Please reply to the email you received this challenge from, attaching the ZIP file or providing a link to a secure cloud storage location (e.g., Google Drive, Dropbox) with the file.
Evaluation Criteria:
Your submission will be evaluated based on:
- Functionality & Correctness: Does the application meet all requirements and work as expected?
- Laravel Proficiency: Correct and idiomatic use of Laravel features and best practices.
- Architectural Design: Code structure, separation of concerns, maintainability, and scalability.
- Code Quality & Readability: Clean, well-organized, and understandable code.
- Testing: Thoroughness and quality of tests.
- Problem-Solving: Your approach to tackling the requirements.
- Attention to Detail: Adherence to specific instructions and overall polish.
- AI Tool Usage & Disclosure: Responsible use and transparent reporting.
A Note on Time and Questions:
We understand that you have other commitments. This challenge is designed to be completed within a reasonable timeframe (estimated 10-20 hours of focused work). Prioritize quality and completeness over rushing.
If you have any clarifying questions about the requirements, please don’t hesitate to ask. However, try to make reasonable assumptions where appropriate, and document them in your README.
Good luck, and we look forward to seeing your solution!