Skip to content

Repository files navigation

daasa.sanchaya.net (ರನ್ನ ಸಂಚಯ)

Dasa Sahitya digital archive — a Rails 4.2 application for browsing, searching, and annotating Kannada keerthanas (poems) by Dasa saints.

Features

  • Browse poems by starting letter with concordance (letter-based) navigation
  • Browse authors by starting letter with concordance navigation
  • Full-text search across poems with exact/partial matching, letter filter sidebar, and usage statistics
  • Keyword index — browse words alphabetically; each word shows poem count, author count, and links to search results
  • Author pages (/authors/:id) — shows parsed author metadata (birth place, time period, guru, pen name, etc.) with their poems listed below
  • Annotation — hypothes.is embedded for collaborative annotation of poem text

SEO, URL hashing & scraping protection (ported from vachana.sanchaya.net)

  • SEO meta tags — SeoHelper (app/helpers/seo_helper.rb) sets page <title>, description, keywords, and canonical URL. Per-action overrides live in PoemsController and AuthorsController.
  • Open Graph + Twitter Cards — the layout (app/views/layouts/application.html.erb) emits og:* and twitter:* tags plus JSON-LD SearchAction and BreadcrumbList structured data for rich results.
  • Hashed / slugged URLs — poems and authors are now reachable at SEO-friendly, hash/slug-based paths:
    • GET /poems/:id/:slug → PoemsController#show (poem_with_slug_path)
    • GET /authors/:id/:slug → AuthorsController#show (author_with_slug_path)
    • GET /poems/:start_letter and GET /authors/:start_letter for letter-paginated indexes (poems_by_letter_path, authors_by_letter_path)
    • The show actions 301-redirect the bare /poems/:id and /authors/:id URLs to their slugged equivalents so search engines index one canonical URL.
  • XML sitemap — SitemapController (/sitemap.xml) emits loc/lastmod/changefreq/priority for the home page, every letter index, and every poem/author record.
  • Scraping protection — config/initializers/throttles.rb (Rack::Attack) blocks known bots (Amazonbot, AhrefsBot, GPTBot, SemrushBot, Baiduspider, etc.) and throttles traffic per IP: general requests (300/5min), poem search (20/min), autocomplete (10/min), and author index (20/min).

New features since last documentation:

  • Improved lazy loading — replaced auto-scroll with manual "load more" buttons (ಇನ್ನಷ್ಟು…) that appear below the last row of cards instead of spilling to the right side.
    • Added click-based loading for poem lists, author lists, keyword lists, and search results
    • Each listing now shows a clear "ಇನ್ನಷ್ಟು ಕೀರ್ತನೆಗಳಿವೆ" message + button that loads the next page when clicked
  • Fixed search result highlighting — search terms are now properly highlighted in poem results using the SearchHighlight plugin
  • Fixed poem text formatting — pipes (|, ||) in poem text now display with proper spacing and line breaks (| <br />)
  • Fixed letter filter navigation — alphabet sidebar links now work correctly across all pages (poems, authors, keywords, search)
  • Fixed author page layout — author cards now wrap properly to next lines instead of overflowing
  • Code cleanup — removed unused remote: true JS AJAX calls from letter filter links
  • Updated CSS — style fixes for keyword pills, author cards, and lazy loader positioning

Stack

  • Ruby 2.4.6 (via RVM wrapper /usr/local/rvm/wrappers/ruby-2.4.6/ruby)
  • Rails 4.2.11.3
  • MySQL (mysql2 gem 0.3.21)
  • Passenger (via nginx, production only)
  • Bootstrap 3, jQuery

Deployment

The app runs in production under Passenger. The current release is at /home/daasa/rails_apps/concord/prod/current (symlink to releases/20160710190206).

Precompiling assets

BUNDLE_DISABLE_SHARED_GEMS=1 /usr/local/rvm/wrappers/ruby-2.4.6/ruby -S bundle exec rake assets:precompile

Restarting

touch /home/daasa/rails_apps/concord/prod/current/tmp/restart.txt

Bundle install

BUNDLE_DISABLE_SHARED_GEMS=1 /usr/local/rvm/wrappers/ruby-2.4.6/ruby -S bundle install

Data model

  • poems — 13,949 records. Fields: id, book_id, author_id, name (unused), poem_text, original_id (unique reference number). No book references currently populated.
  • authors — 163 records. Fields: id, name, pen_name, birth_place, sex, spouse, time_period, poems_found, information (multi-line key: value pairs, see Author#parsed_information), original_id.
  • books — empty. Reserved for volume/publisher metadata.
  • key_words — indexed word lexicon with poem/author occurrence counts.
  • concords — concordance letter-count data for poems and authors.
  • search_histories — logs search queries.

Author information parsing

The Author#parsed_information method splits the information field by newlines into key-value pairs using : as delimiter. These are displayed on the author show page (/authors/:id).

Key views

Route View Description
/ Homes#index Landing page
/poems Poems#index Poem list with letter concordance sidebar
/poems?start_letter=ಅ Poems#index Filtered by starting letter
/poems/:start_letter Poems#index Letter-paginated index (poems_by_letter_path)
/poems/:id/:slug Poems#show SEO slugged poem page (poem_with_slug_path)
/poems/search?poem=... Poems#search Search results with letter sidebar + stats
/authors Authors#index Author list with letter concordance
/authors/:start_letter Authors#index Letter-paginated index (authors_by_letter_path)
/authors/:id Authors#show Author metadata + their poems
/authors/:id/:slug Authors#show SEO slugged author page (author_with_slug_path)
/key_words KeyWords#index Alphabetical keyword index
/key_words?start_letter=ಕ KeyWords#index Keywords by starting letter
/sitemap.xml Sitemap#index XML sitemap for crawlers

Recent changes

  • Fixed author name data (trimmed leading spaces / trailing newlines)
  • Added hypothes.is annotation script to layout
  • Added keyword pill styling with colored counts
  • Added letter filter sidebar and stats to search results page
  • Added AuthorsController#show with parsed author info display
  • Made author names clickable links to author pages across poem cards
  • Updated CSS: removed Bootstrap blue link color from poem cards, added author-info-pair styling
  • Improved lazy loading with manual "load more" buttons
  • Fixed search result highlighting with SearchHighlight plugin
  • Fixed poem text formatting with proper pipe spacing and line breaks

About

Dasa Sanchaya | ದಾಸ ಸಂಚಯ

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages