Pdf Link: Zindagi Ka Safar Balraj Madhok
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
);
| Category | Requirement | |----------|-------------| | Performance | Search latency < 2 seconds for 95 % of queries. | | Scalability | Horizontal scaling of search service (e.g., Elasticsearch) and storage (object store). | | Security | All traffic over HTTPS. Signed URLs for downloads. Input sanitization for search queries. | | Privacy | Store only minimal PII (email for requests). Comply with GDPR/CCPA. | | Accessibility | WCAG 2.1 AA compliance for UI (screen‑reader friendly, focus order). | | Internationalization | UI and search support Hindi and English (Unicode). | | Monitoring | Metrics: search latency, download count, error rates, DMCA notices. Alerts on spikes. |
PDF Status Enum
Download Flow
Preview Flow
Request Flow
Admin Dashboard
Compliance & Legal
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=..."