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 Requirements:

Your FlashcardPro application should implement the following high-level features:

  1. User Authentication:
    • Standard user registration and login.
    • Protected routes/functionality for authenticated users.
  2. 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.
  3. 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.
  4. 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.
  5. 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.
  6. (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:

  1. Framework: Latest stable version of Laravel.
  2. 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.
  3. 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.
  4. Validation: Implement robust input validation for all incoming data (e.g., using Form Requests).
  5. Error Handling: Implement graceful error handling.
  6. Testing (Critical):
    • Write comprehensive unit and feature tests (PHPUnit or Pest).
    • Aim for high test coverage.
  7. 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.
  8. 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:

  1. Naming Conventions:
    • All custom classes, methods, and database tables/columns should follow Laravel’s standard naming conventions. Prioritize clarity and convention.
  2. Code Standards: Adhere to PSR-12 coding standards.
  3. 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.

Submission Guidelines:

  1. Format: Submit a single ZIP file containing your complete Laravel project.
  2. Version Control: The submission must include the .git directory with a meaningful commit history. Show your work and thought process through your commits.
  3. 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.
  4. 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.
  5. 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.
  6. 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.
    • Please include a few screenshots of your completed work.

Evaluation Criteria:

Your submission will be evaluated based on:

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!

Submit Your Code

We will review your application and get back to you as soon as possible.

Step 1 of 2