Lesson 4 of 16 · 45 min suggested practice
Build a searchable resource library in Lovable
Create the cards, search, topic filters, and detail routes that form Resource Shelf's first useful workflow.
Give the data a clear shape
Prepare a CSV or equivalent data object with id, title, topic, summary, format, level, download_url, and updated_date. Use stable IDs such as client-kickoff-checklist rather than row positions. A title may change later; the resource's identity should remain stable.
Inspect the six rows before building. Ensure each has a unique ID and one primary topic. Include varied title lengths and descriptions so the layout has realistic material. Blank download URLs are allowed during the exercise, but the interface must show their availability honestly.
Build cards around the visitor's decision
A useful card tells someone what the resource helps them do, who it suits, and what they will receive. Show the title, a short outcome-focused summary, topic, and file format. Use one clear detail link and a separate save action if favourites are already available.
Avoid decorative metrics and invented popularity signals. Do not add ratings or download counts without real supporting data. The library's value comes from the relevance of the resources and the ease of finding them, not from fabricated social proof.
Specify search and filter behavior
Choose simple matching for the first version: title and summary, case-insensitive, with trimmed whitespace. Search narrows the active topic, rather than silently clearing it. Show a result count so visitors understand what changed. The All topics state should restore the full topic set.
Add a clear empty-results message and a reset control. Test at least one exact title fragment, one description word, an uppercase query, and a query that has no results. For six records, predictable behavior is more useful than a complex recommendation system.
Verify the journey and fix mismatches
Open each card and confirm that the detail route shows the matching record. Refresh a detail URL and use the browser's back button. Try an unknown ID. The app should show a helpful missing-resource state rather than a blank screen or a different record.
If search results are wrong, inspect the source fields and matching rule before changing the visual design. If a detail page loses its data on refresh, investigate how the route resolves the ID. Record the working result as a checkpoint before adding persistence or accounts.
Try this focused prompt.
Build Resource Shelf's library from the attached six-row practice dataset. Use stable resource IDs for detail routes. Show title, outcome-focused summary, topic, format, and level. Add case-insensitive search across title and summary, a topic filter, an accurate result count, and a reset action. Detail pages must work on direct navigation and refresh. Handle unknown IDs and blank download URLs explicitly. Keep this version static; do not add accounts or a database.
Replace the sample context with your own approved facts. Review Lovable’s proposed changes before accepting them.
Evidence before the next step
Check your work.
- All six cards resolve to the correct detail page.
- Search, topics, and reset behave consistently.
- Direct URLs, refresh, no results, and unknown IDs have usable outcomes.
Your checkmark stays in this browser. It records your own progress, not a certification.
Official sources & further reading
Reviewed November 19, 2026. Plans, terminology and interfaces can change; follow the linked documentation if your workspace differs.