<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tanishka</title>
    <description>The latest articles on DEV Community by Tanishka (@ttiwari13).</description>
    <link>https://dev.to/ttiwari13</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1144054%2F59b4eea5-7b52-4905-bf8b-7c6afc00a6c5.jpg</url>
      <title>DEV Community: Tanishka</title>
      <link>https://dev.to/ttiwari13</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ttiwari13"/>
    <language>en</language>
    <item>
      <title>An Audiobook Called BookRadio</title>
      <dc:creator>Tanishka</dc:creator>
      <pubDate>Thu, 03 Jul 2025 18:25:43 +0000</pubDate>
      <link>https://dev.to/ttiwari13/an-audiobook-called-bookradio-1a2g</link>
      <guid>https://dev.to/ttiwari13/an-audiobook-called-bookradio-1a2g</guid>
      <description>&lt;h2&gt;
  
  
  "From Music to Audiobooks — The Idea Behind BookRadio"
&lt;/h2&gt;

&lt;p&gt;I have created a perfect way to listen to books — not just modern ones, but timeless classics from the late 18th, 19th, and 20th centuries.&lt;/p&gt;

&lt;p&gt;Welcome to BookRadio — a platform with over 10,000 audiobooks, spanning diverse genres, languages, and legendary authors from history.&lt;/p&gt;

&lt;h3&gt;
  
  
  But how did this idea come to life?
&lt;/h3&gt;

&lt;p&gt;Well, I’m not exactly a bookworm — but I do love a good story. Whether it’s music or spine-chilling fiction, I enjoy listening during my free time.&lt;/p&gt;

&lt;p&gt;One day, I thought: what if we could listen to classic books — old fiction, detective tales, and timeless adventures — just like we listen to songs?&lt;/p&gt;

&lt;p&gt;And that’s how BookRadio was born.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;em&gt;So… how did I actually build it?&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;I wanted to create a user-friendly, interactive, and animated website that not only looks good but also helps users find and enjoy stories effortlessly.&lt;/p&gt;

&lt;p&gt;So I started exploring — searching for resources that could bring this idea to life.&lt;/p&gt;

&lt;p&gt;That’s when I discovered LibriVox, a public domain audiobook platform. It turned out to be the perfect match!&lt;/p&gt;

&lt;p&gt;I used their API to extract rich book metadata — including titles, authors, genres, and languages — and seeded it into my own database.&lt;/p&gt;

&lt;p&gt;This became the foundation of BookRadio.&lt;br&gt;
I Started seeding the data into my mongoDB through WebScrapping&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Genre keywords mapping
const GENRE_KEYWORDS = {
  'Fiction': ['novel', 'story', 'tale', 'narrative', 'fiction'],
  'Mystery': ['mystery', 'detective', 'crime', 'murder', 'investigation', 'sherlock', 'holmes'],
  'Romance': ['romance', 'love', 'romantic', 'courtship', 'marriage', 'hearts'],
  'Adventure': ['adventure', 'journey', 'quest', 'expedition', 'travel', 'exploration'],
  'Horror': ['horror', 'ghost', 'haunted', 'terror', 'supernatural', 'vampire', 'monster'],
  'Science Fiction': ['science fiction', 'sci-fi', 'future', 'space', 'alien', 'technology', 'robot'],
  'Fantasy': ['fantasy', 'magic', 'wizard', 'dragon', 'fairy', 'enchanted', 'mythical'],
  'Historical': ['historical', 'history', 'war', 'civil war', 'revolution', 'ancient', 'medieval'],
  'Biography': ['biography', 'life of', 'memoirs', 'autobiography', 'life and times'],
  'Philosophy': ['philosophy', 'philosophical', 'ethics', 'moral', 'metaphysics', 'logic'],
  'Poetry': ['poetry', 'poems', 'verse', 'sonnet', 'ballad', 'rhyme'],
  'Drama': ['drama', 'play', 'tragedy', 'comedy', 'theatrical', 'act', 'scene'],
  'Children': ['children', 'kids', 'juvenile', 'young readers', 'fairy tale', 'nursery'],
  'Religion': ['religious', 'bible', 'Christian', 'spiritual', 'prayer', 'sermon', 'theology'],
  'Non-Fiction': ['essays', 'treatise', 'study', 'analysis', 'examination', 'discourse']
};

connect.DB();
//function to detect genres from text
function detectGenresFromText(title,description){
   const detectGenres= new Set();
   const textToAnalyze = `${title} ${description}`.toLowerCase();
   Object.entries(GENRE_KEYWORDS).forEach(([genre, keywords]) =&amp;gt; {
    const hasKeyword = keywords.some(keyword =&amp;gt; 
      textToAnalyze.includes(keyword.toLowerCase())
    );

    if (hasKeyword) {
      detectedGenres.add(genre);
    }
  });

  return Array.from(detectedGenres);
}
// a small snippet of seeding
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  After seeding data into mongoDB I wrote backend for it
&lt;/h3&gt;

&lt;h4&gt;
  
  
  MVC helped me separate logic and routes for better maintainability.
&lt;/h4&gt;

&lt;p&gt;My backend was structured using the Model-Controller-Router (MVC/MVR) pattern to ensure scalability, modularity, and maintainability.&lt;/p&gt;

&lt;h4&gt;
  
  
  Model — Defines the Data Structure
&lt;/h4&gt;

&lt;p&gt;I created Mongoose models for Book and User.These define how data is stored, validated, and indexed in MongoDB.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const bookSchema = new mongoose.Schema({
  title: String,
  author: String,
  genre: [String],
  language: String,
  description: String,
  duration: Number,
  created At: { type: Date, default: Date.now }
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Controller — Business Logic
&lt;/h4&gt;

&lt;p&gt;Each controller contains the logic for handling specific routes.&lt;br&gt;
For example, my bookController.js manages:&lt;br&gt;
*Searching books&lt;br&gt;
*Filtering by genre/language&lt;br&gt;
*Pagination&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const searchBooks = async (req, res) =&amp;gt; {};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Router — Route Handling
&lt;/h4&gt;

&lt;p&gt;My bookRoutes.js file defines the endpoints and connects them to their corresponding controllers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const express = require('express');
const router = express.Router();
const { searchBooks } = require('../controllers/bookController');
router.get('/search', searchBooks);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  Middleware- The Middleman
&lt;/h4&gt;

&lt;p&gt;Middlewares played a central role in my backend. They handle:&lt;br&gt;
*JWT authentication&lt;/p&gt;

&lt;p&gt;console.log("Backend setup complete");&lt;/p&gt;

&lt;h3&gt;
  
  
  Building the frontend part
&lt;/h3&gt;

&lt;p&gt;With the backend logic in place, I shifted focus to building the frontend — where functionality meets design and user experience.&lt;/p&gt;

&lt;p&gt;Designing the frontend wasn't just about putting components together. It required:&lt;/p&gt;

&lt;p&gt;🎯 A strong design system&lt;br&gt;
📱 Responsive layouts&lt;br&gt;
✨ Smooth animations&lt;br&gt;
🧠 Component reusability&lt;br&gt;
🌙 Theme integration &lt;/p&gt;

&lt;p&gt;“React.js, a widely-used frontend library, was my choice to build a fast, component-driven UI.”&lt;br&gt;
To design an interactive and responsive UI, I used Tailwind CSS and Framer Motion for styling and smooth animations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Challenges which I faced during making of this projects were:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Making it responsive for all size screens.&lt;/li&gt;
&lt;li&gt;Fetching and Handling Complete Book Metadata.&lt;/li&gt;
&lt;li&gt;Web Scraping for Enhanced Information.&lt;/li&gt;
&lt;li&gt;Designing a Genre Detection Algorithm.&lt;/li&gt;
&lt;li&gt;JWT Authentication and Secure Routing.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Features of BookRadio
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Listen to public domain audiobooks from LibriVox.&lt;/li&gt;
&lt;li&gt;Play individual episodes via inline audio players.&lt;/li&gt;
&lt;li&gt;Full-text search across title, author, genre, description, tags.&lt;/li&gt;
&lt;li&gt;Authentication &amp;amp; Profile&lt;/li&gt;
&lt;li&gt;Feedback form&lt;/li&gt;
&lt;li&gt;User Interface &amp;amp; Experience&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How is BookRadio Unique?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;User-First Audio Experience&lt;/li&gt;
&lt;li&gt;Personal Collection Feature&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🔗 Like the idea? Don't forget to ⭐ the repo!&lt;br&gt;
&lt;a href="https://github.com/ttiwari13/BookRadio" rel="noopener noreferrer"&gt;GitHub: BookRadio Project&lt;/a&gt;&lt;/p&gt;

</description>
      <category>books</category>
      <category>audiobook</category>
      <category>webdev</category>
      <category>software</category>
    </item>
  </channel>
</rss>
