Platform Modernization and E-Book Reading Portal
A proposal to rebuild dnapublications.in on an owned API, PostgreSQL and Redis platform — unifying every marketplace order, computing royalties as an auditable system, and migrating existing Firebase data — delivered alongside a new DRM-protected e-book reading portal integrated into the same website.
Where the platform stands today
The current site is a working business, not a prototype — 69 storefront routes, a 33-page admin console and a full author portal. This assessment is the basis for the scope that follows: what to keep untouched, what to re-architect, and what has to be built new.
| Component | Status | Basis |
|---|---|---|
| Razorpay checkoutPayments, order confirmation, transaction records | Keep as-is | Fully wired and working. Carries forward unchanged into both the storefront and the e-book Vault. |
| Zoho Books invoicingGST invoicing, contacts, place-of-supply mapping | Keep, connect | Active and well-maintained. Becomes a downstream service of the new unified order hub rather than a rebuild. |
| Shiprocket shipping | Keep, connect | Existing integration retained and connected to the same order hub. |
| Firestore as database of recordBooks, orders, authors, royalty data | Re-architect | A document store standing in for what should be relational, auditable financial records — spans 67 frontend and 20 backend files. |
| Royalty calculationroyalty-utils.ts and related admin/author pages | Re-architect | Real business logic exists, but with no relational store behind it every statement is a client-side calculation, not a traceable record. |
| Amazon / Flipkart orders | Build integration | Mentioned only as marketing copy today — no API integration exists. Orders from these channels are outside the platform's view entirely. |
| Kids' book sales | Consolidate | Exists as a separate section today; not yet part of a unified order hub or royalty engine. |
| E-book reading & DRM | Build new | PDF-viewer libraries are installed but unused — there is no reading experience, licensing or DRM of any kind today. |
Website & Backend Platform Modernization
Replace Firebase with an owned API backed by PostgreSQL for everything that must reconcile — orders, royalties, inventory — and Redis, already in use for background jobs today, extended into a full caching and session layer.
Backend API & application server
- Dedicated REST API (Node.js/Express) as the single source of truth, replacing direct Firestore reads/writes from the frontend
- Authentication and authorization for admin, author and customer roles
- API-level input validation, rate limiting and structured error handling
- Separate staging and production environments
PostgreSQL database design
- Relational schema covering titles, editions, authors, customers, orders, order line items, royalty ledger entries and the kids' book catalogue
- Referential integrity between orders, royalties and inventory — no more disconnected documents
- Indexed queries for reporting: sales by title, by channel, by author, by date range
- Automated daily backups
Redis caching & session layer
- Extends the existing Redis/BullMQ install (currently job-queue only) into a full caching and session layer
- Cached catalogue and pricing reads to reduce database load under traffic
- Session management for logged-in customers, authors and admins
Unified marketplace order hub
- API integration with Amazon (Seller Central / SP-API) and Flipkart (Seller API) to pull order data automatically
- Orders from Amazon, Flipkart and the direct website normalized into one order table
- Existing Zoho Books and Shiprocket integrations connected to the same hub instead of running as isolated add-ons
- One admin view for total units sold, by title, across every channel
Royalty calculation engine
- Royalty logic moved from client-side utility functions into a server-side, database-backed engine
- Every sale from any channel posts a traceable line item to the author's royalty ledger
- Configurable royalty rates per title, author, edition and channel
- Auditable statements an author can be shown, with full traceability back to individual orders
Kids' book sales portal
- Existing kids' books section folded into the same catalogue, order hub and royalty engine as adult titles
- One admin view, one royalty calculation, one inventory count across both product lines
Firebase → PostgreSQL data migration
- Scripted, verified migration of existing books, orders, authors and historical royalty records
- Data validation and reconciliation pass before cutover
- Old Firebase data retained as a rollback copy until the new platform is confirmed stable in production
Admin & author portal updates
- Existing 33-page admin console and author portal retained visually — the data layer underneath is what changes
- Updated views wherever the order hub or royalty engine changes what's shown: combined marketplace order list, royalty ledger detail, kids' book reporting
Quality assurance & testing
- Functional testing of checkout, order sync, royalty calculations and admin workflows
- Migration verification against the live Firestore dataset before go-live
- Staging sign-off prior to production deployment
E-Book Reading Portal — "The Vault"
A reader buys a book and opens it inside a protected, web-based reader on the same account they checked out with — no file is ever downloadable. This is entirely new capability: no reader, licensing or DRM exists on the platform today.
Reading experience
- Web-based reader — no separate app, works inside the browser on the customer's existing account
- Responsive layout for desktop, tablet and mobile browsers
- Table of contents, chapter navigation, and page or continuous-scroll reading modes
- Reading preferences: font size and light / sepia / dark reading themes
- Bookmarking and automatic "continue reading" position sync across sessions
Content protection & DRM
- Per-account licensing — a purchased book is tied to the buyer's account, never a downloadable file
- Content encrypted at rest (AES-256) and served only through short-lived, signed delivery URLs — the underlying file is never exposed to the browser
- Device and session binding, with a limit on concurrent active reading sessions per account
- Screenshot and screen-recording deterrents, implemented to the same standard used by Kindle Cloud Reader and Kobo
- Dynamic per-reader watermark — buyer name, email or order ID rendered subtly into each page
- Right-click, text selection, printing and direct download disabled inside the reader
Purchase & access flow
- Checkout reuses the existing Razorpay integration — no new payment gateway to configure or reconcile
- Instant unlock: a purchased title appears in the reader immediately after payment is confirmed
- Admin can revoke or reissue access — for example on a refund or support case
Reading dashboard — "My Library"
- A "My Library" area added to the existing website and account navigation — not a separate app or login
- Shows purchased titles, reading progress, and purchase/order history
- Same visual design as the rest of the modernized platform
Admin & content management
- Upload pipeline to convert a submitted manuscript into the Vault's protected reading format
- Title, pricing and availability management from the admin console
- Per-customer access log with manual revoke/reissue controls
- Sales and readership analytics — titles sold, active readers, completion rates
Browser & device support
- Desktop: Chrome, Edge, Firefox, Safari (current and prior major version)
- Mobile / tablet: iOS Safari, Android Chrome
Both phases start together
The website platform goes live first, since it carries the business today. The Vault follows once it has been proven in testing alongside it.
Two independent phases, priced separately
Each phase is scoped, delivered and invoiced on its own — approve one, both, or stage them if preferred.
Website & Backend Platform
| Owned API + PostgreSQL + Redis platformReplaces Firebase as the system of record | Included |
| Unified marketplace order hubAmazon, Flipkart, Zoho Books, Shiprocket | Included |
| Royalty calculation engine | Included |
| Firestore → PostgreSQL data migration | Included |
| Kids' book sales portal integration | Included |
| Admin & author portal updates, QA | Included |
E-Book Reading Portal — The Vault
| Web-based protected reader & reading preferences | Included |
| DRM: encryption, signed delivery, device/session binding | Included |
| Screenshot/screen-recording deterrents & watermarking | Included |
| Razorpay-integrated purchase & instant unlock | Included |
| "My Library" reading dashboard, integrated into the website | Included |
| Admin content pipeline, access controls & analytics | Included |
Proposed payment schedule
Applied independently to each phase — Part A and Part B are invoiced on their own milestones.
| Milestone | Share | Part A (₹50,000) | Part B (₹50,000) |
|---|---|---|---|
| Kickoff & requirements sign-off | 40% | ₹ 20,000 | ₹ 20,000 |
| Testing / UAT sign-off | 30% | ₹ 15,000 | ₹ 15,000 |
| Go-live | 30% | ₹ 15,000 | ₹ 15,000 |
This schedule is a starting point for discussion, not fixed — happy to adjust the split or timing.
Assumptions & exclusions
- DNA Publications supplies final book content, cover art and marketing copy; manuscript formatting/proofreading is not included
- Amazon and Flipkart seller accounts and API credentials are provided or applied for by DNA Publications; provider fees are billed separately by the marketplace (see Chapter 05)
- Hosting/server infrastructure costs are separate from this development quote
- Existing Razorpay and Zoho Books accounts remain owned by DNA Publications and are reused as-is
- Native iOS/Android apps are out of scope for both phases in this proposal
- A 30-day post-launch warranty period is included per phase for defect fixes; ongoing maintenance beyond that is a separate arrangement