As part of the application process, you’ve been requested to complete the following challenge.
If you have any questions pleasesend them to hire@launchandsell.com.
Task: Develop a Custom WordPress Plugin
Objective: Create a “Movies” custom post type, accessible via a REST API and create a frontend javascript “Launch and Sell Movies” app that lets users save a list of movies to a list.
Technical Requirements:
- Custom Post Type: “Movies”
- The post type should have a title, a movie description, and the year it was released
- Please provide example data for at least 20 entries
- Add Movies as a top level menu on the backend
- Provide a way to view a list of the movies on the backend
- Provide a way to edit a movie on the backend
- API Development:
- Make the “Movies” post type available through a REST API.
- The API endpoint must reside at: [site url]/wp-json/launchandsell/v1/movies
- API endpoint to read all movies
- API endpoint to read a single movie with the relevant data given
- All these API endpoints should only be accessible by logged in users.
- Non logged in users should not be able to access these endpoints.
- Frontend Framework: Use a modern JavaScript framework (React is recommended).
- WordPress Integration:
- Load the app in the context of WordPress. Meaning, only people that are logged into WordPress should be allowed to use the app.
- The app should be presented on a WordPress page called “Movies” located at [site url]/movies/
- You can insert the app on that page any way you like. Just let us know the set up instructions when you submit.
- The header of the app should have a text heading “Launch and Sell Movies”
- The header of the app should have two links:
- “Show All Movies”
- “My List”
- App Features:
- Displaying movies:
- When the app loads, it should query the API endpoint and display a grid listing of all the movies.
- Movie listings throughout the app should be paginated to 10 movies per page.
- Each movie should have a “heart” button that, when clicked, will add the movie to the person’s “My List” list.
- Maintaining a “My List”:
- Maintain in the session data a “My List”, this list should persist across the app.
- The “My List” should be persisted even if you refresh the whole page.
- The app should have a “My List” page to view/manage their list.
- The “My List” page should show a grid of the current movies in the “My List”.
- Each item should have an action to remove the movie from the list.
- Displaying movies:
- Data/API source:
- You must use the API endpoint you created for the movies in Challenge #1 to retrieve and show movie data in the grid.
Development Guidelines:
- Ensure to properly escape, sanitize, and validate data in each step as appropriate using built in PHP and WordPress functions.
- Ensure all user facing strings/text are translatable.
- Your submission should be a fully functional WordPress plugin meeting the requirements listed above.
- Originality: Code must be your own, without using boilerplate or tutorial templates.
- Modern Practices: Employ current JavaScript practices and state management (e.g., React with Redux) and modern PHP approaches/architecture (example: OOP, autoloading, PSR4, Composer, etc).
- UI Library: You may use any UI libraries you like.
- Submission: Deliver a fully functional React app that meets all requirements.
- Quality over Speed: Focus on simplicity and clarity, as your code will reflect your skill and alignment with our core values.