I'll add a "Discounted Books" feature where users can browse and order all of Srila Prabhupada's books in multiple languages. Let me first explore the current project structure.
Let me examine the key files to understand the current structure and naming conventions.
Now let me look at App.tsx, HomeScreen, and SideMenu to understand how screens are wired up.
Let me look at HomeScreen and SideMenu to understand their structure.
Now I have a clear understanding of the codebase. I'll build a complete "Discounted Books" store feature. Let me start by creating the books catalog data file with all of Srila Prabhupada's books and multiple languages.
Now let me create a cart hook with localStorage persistence:
Now let me add the translation keys for the books store to the translations file. First the type definition:
Now I need to add these keys to all three language objects. Let me add them to English first:
Now Hindi:
Now Odia:
All translation keys added. Now let me create the BookCard component:
Now let me create the BooksStoreScreen component:
Now let me create the CartScreen component with order summary and checkout:
Now let me create an OrderConfirmationScreen for the success state:
Now let me wire everything together in App.tsx. Let me rewrite it to add the new screens and cart:
I need to fix several things. Let me update the Header component first to accept the new props:
Now let me update the Header to include cart access and the new screen labels:
Now let me update the screenLabel in Header and add the cart/books buttons. Let me update the screen label logic and right-side buttons:
Now let me add the books and cart buttons to the Header right side, before the language selector:
Now let me update the HomeScreen to add the "Discounted Books" entry point. First update the props and add the banner:
Now let me add the "Discounted Books" banner to the HomeScreen, right after the Quick Links section:
Now let me fix App.tsx — remove unused lang and precompute nav active states to fix the type narrowing issue. Let me update the top section:
Now let me update the bottom nav JSX to use the precomputed navActive values instead of direct comparisons:
Now let me replace the entire bottom nav block with a version using the precomputed navActive booleans:
All App.tsx errors resolved. Now let me add the "Discounted Books" option to the SideMenu:
Now let me add the line-clamp-3 utility and spin animation if missing, and build the project:
animate-spin and line-clamp-3 are built-in Tailwind utilities. Let me build the project to verify everything compiles:
The build succeeds. Let me verify the final file structure of the new feature:
The build is successful and all components are in place. I've added a complete "Discounted Books" ordering feature. Here's a summary of what was implemented:
📚 Discounted Books Store — Summary
New Files Created
| File | Purpose |
|---|
src/data/books.ts | Catalog of 20 of Srila Prabhupada's books with discounted prices, ratings, page counts, and available languages |
src/hooks/useCart.ts | Cart state management with localStorage persistence (add/remove/update quantity, totals, savings) |
src/components/BookCard.tsx | Individual book card with cover, rating stars, discount badge, per-book language picker, and Add to Cart / Buy Now |
src/components/BooksStoreScreen.tsx | Full store with search, language filter chips, category filter, and a floating cart bar |
src/components/CartScreen.tsx | Cart review, quantity controls, order summary with savings, free-shipping logic, and place order |
src/components/OrderConfirmationScreen.tsx | Animated success screen with "Hare Krishna!" message |
Books Available (20 total)
Scriptures: Bhagavad-gītā As It Is, Śrīmad-Bhāgavatam (Complete Set), Caitanya-caritāmṛta, Kṛṣṇa book · Philosophy: Nectar of Devotion, Science of Self-Realization, Teachings of Lord Caitanya/Kapila/Queen Kuntī, etc. · Beginners & Pocket books
🌐 All Languages Supported
Every book can be filtered/ordered in 10 languages: English, हिन्दी, ଓଡ଼ିଆ, বাংলা, தமிழ், తెలుగు, ಕನ್ನಡ, मराठी, ગુજરાતી, অসমীয়া. Major books are available in all languages; titles/descriptions are localized for Hindi & Odia with English fallback.
Where users access it
- Bottom navigation bar — new "Discounted Books" 📚 tab + a 🛒 Cart tab with live count badge
- Home screen — a prominent gradient banner
- Side menu — highlighted "Discounted Books" option with a SALE badge
- Header — quick 📚 and 🛒 buttons (cart shows live count)
Pricing & Features
- Discounted MRP → sale prices with % OFF badges
- Free shipping above ₹999, savings summary
- Full multilingual UI (English / Hindi / Odia) across the entire store, cart, and checkout
- Cart persists across sessions via localStorage
The feature is fully functional, builds cleanly (506 kB / 132 kB gzipped), and integrates seamlessly with the existing quiz app and language system.
Files built: src/data/books.ts, src/hooks/useCart.ts, src/data/translations.ts, src/components/BookCard.tsx, src/components/BooksStoreScreen.tsx, src/components/CartScreen.tsx, src/components/OrderConfirmationScreen.tsx, src/App.tsx, src/components/Header.tsx, src/components/HomeScreen.tsx, src/components/SideMenu.tsx