POST /api/books/bookId/download
Authorization: Bearer <jwt>
Response (200)
"downloadUrl": "https://s3.amazonaws.com/bucket/zk-safar.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=..."
| ✔ | Item |
|---|------|
| ✔ | No direct linking to copyrighted PDFs without rights. |
| ✔ | All PDFs have rights_status metadata; default is UNAVAILABLE if unknown. |
| ✔ | DMCA takedown endpoint (POST /dmca) with required fields (complainant, infringing URL). |
| ✔ | Audit logs retained for 90 days (or as required by jurisdiction). |
| ✔ | Users can delete their request data (GDPR “right to be forgotten”). |
| ✔ | Rate limiting and signed URLs to prevent hotlinking. |
| ✔ | UI clearly labels each action (download vs. preview vs. request). |
POST /api/books/bookId/request
Content-Type: application/json
"name": "Aditi Sharma",
"email": "aditi@example.com",
"message": "I need this for academic research."
Response (202)
"message": "Your request has been received. We'll contact you shortly."
TABLE books (
id UUID PRIMARY KEY,
title TEXT NOT NULL,
author TEXT NOT NULL,
language TEXT,
isbn TEXT,
cover_url TEXT,
pdf_url TEXT, -- S3 key or external link
rights_status ENUM('FREE_PUBLIC_DOMAIN','LICENSED_DOWNLOAD','PREVIEW_ONLY','REQUEST_REQUIRED','UNAVAILABLE') NOT NULL,
preview_page_limit INT DEFAULT 10,
created_at TIMESTAMP,
updated_at TIMESTAMP
);
TABLE download_logs (
id UUID PRIMARY KEY,
user_id UUID,
book_id UUID,
timestamp TIMESTAMP,
ip_address INET,
source TEXT -- e.g., 'search', 'direct'
);
TABLE requests (
id UUID PRIMARY KEY,
user_name TEXT,
user_email TEXT,
book_id UUID,
message TEXT,
status ENUM('PENDING','APPROVED','DENIED') DEFAULT 'PENDING',
created_at TIMESTAMP,
reviewed_at TIMESTAMP,
reviewer_id UUID
);
Title: Zindagi Ka Safar (The Journey of Life) Author: Dr. Balraj Madhok Language: Hindi
Overview: Zindagi Ka Safar is the acclaimed autobiography of Dr. Balraj Madhok, a prominent Indian politician, thinker, and one of the founding members of the Bharatiya Jana Sangh (the predecessor to the Bharatiya Janata Party). zindagi ka safar balraj madhok pdf link
Unlike typical political memoirs that only list achievements, this book offers a candid and often critical look at the political landscape of India from the pre-independence era through the tumultuous decades following 1947. Madhok was known for his firm ideological stance and his "nationalist" perspective, which often put him at odds with the prevailing political establishments of his time.
Why You Should Read This Book:
| Sprint | Deliverable | |--------|-------------| | Sprint 1 | Search UI + basic backend search (Elasticsearch) – return placeholder results. | | Sprint 2 | PDF upload flow for admins, rights‑status tagging, storage of PDFs (S3). | | Sprint 3 | Download endpoint with signed URL + audit logging. | | Sprint 4 | Preview viewer (PDF.js) with page‑limit enforcement. | | Sprint 5 | Request‑access form + email notification system. | | Sprint 6 | Admin moderation dashboard, DMCA endpoint, rate‑limiting middleware. | | Sprint 7 | Analytics dashboard, performance testing, accessibility audit. | | Sprint 8 | Public beta, user feedback loop, bug‑fix & scaling optimizations. |
GET /api/books?query=zindagi%20ka%20safar
Accept: application/json
Response (200)
"results": [
"id": "c3f8e2a1-7b9d-4e2f-9f5a-2a1b6d9e0f3c",
"title": "Zindagi Ka Safar",
"author": "Balraj Madhok",
"coverUrl": "https://cdn.example.com/covers/zk-safar.jpg",
"rightsStatus": "FREE_PUBLIC_DOMAIN",
"actions": ["download"]
,
"id": "9d2b4c5e-1a3f-4d8a-9c6e-5f8b1a2c3d4e",
"title": "Zindagi Ka Safar",
"author": "Balraj Madhok",
"coverUrl": "https://cdn.example.com/covers/zk-safar-2.jpg",
"rightsStatus": "PREVIEW_ONLY",
"actions": ["preview"]
],
"total": 2,
"tookMs": 147