How premiumdealhubofficial-hue/-codelibrary works
CodeLibrary is a programming eBook storefront with guest checkout, payment verification, and protected digital delivery, plus an admin control panel. The main journey is browsing the catalog, creating and verifying a payment, then accessing a token-authorized download and invoice. Management capabilities include catalog and bundle administration, orders and revenue analytics, coupons, 2FA, audit logs, settings, support, and database backups. Source excerpts show server mounting and key database operations; some frontend-to-API and gateway interactions are documented but not directly shown, so those links are dashed.
Main entry points: index.js HTTP Server · schema.js SQLite Database · download.js Protected Downloads · admin.js Admin Management
Components 23
Storefront
- Storefront UI
public/js/app.js - Admin UI
public/js/admin.js - Catalog and Bundles
server/routes/books.js - Categories and Reviews
server/index.js - Contact Support
server/routes/contact.js
Commerce and Delivery
- Customer Accounts
server/routes/auth.js - Guest Checkout
server/routes/payment.js - Payment Verification
server/routes/payment.js - Orders and Invoices
server/routes/orders.js - Protected Downloads
server/routes/download.js - eBook Files
ebooks
Admin Operations
- Admin Management
server/routes/admin.js - Store Settings
server/routes/settings.js - Database Backups
server/utils/backup.js
Platform Services
- HTTP Server
server/index.js - Token Authentication
server/middleware/auth.js - SQLite Database
server/db/schema.js - Catalog Initialization
server/db/seed.js - Security Middleware
server/middleware/security.js - Rate Limits
server/middleware/rateLimiter.js
Other components
- Shopper
- Razorpay
- Google Drive
Connections 34
- Shopper → Storefront UI: browses and buys
README.md - Storefront UI → HTTP Server: requests APIs
- HTTP Server → Catalog and Bundles: mounts routes
server/index.js - HTTP Server → Customer Accounts: mounts routes
server/index.js - HTTP Server → Guest Checkout: mounts routes
server/index.js - HTTP Server → Orders and Invoices: mounts routes
server/index.js - HTTP Server → Protected Downloads: mounts routes
server/index.js - HTTP Server → Admin Management: mounts routes
server/index.js - HTTP Server → Store Settings: mounts routes
server/index.js - HTTP Server → Contact Support: mounts routes
server/index.js - HTTP Server → Categories and Reviews: serves queries
server/index.js - HTTP Server → Security Middleware: applies security
server/index.js - Customer Accounts → Token Authentication: uses authentication
server/routes/auth.js - Catalog and Bundles → SQLite Database: reads catalog
server/routes/books.js - Categories and Reviews → SQLite Database: reads reviews
server/index.js - Customer Accounts → SQLite Database: reads and writes
server/routes/auth.js - Guest Checkout → SQLite Database: creates orders
server/routes/payment.js - Guest Checkout → Razorpay: creates payment
README.md - Payment Verification → SQLite Database: verifies and updates
server/routes/payment.js - Payment Verification → Razorpay: verifies signature
README.md - Orders and Invoices → SQLite Database: reads order data
server/routes/orders.js - Orders and Invoices → Protected Downloads: delegates download
server/routes/orders.js - Protected Downloads → SQLite Database: checks access
server/routes/download.js - Protected Downloads → eBook Files: streams local files
server/routes/download.js - Protected Downloads → Google Drive: retrieves protected files
README.md - Admin UI → Admin Management: manages store
README.md - Admin Management → SQLite Database: manages records
server/routes/admin.js - Admin Management → Database Backups: creates backups
server/routes/admin.js - Admin Management → Token Authentication: checks admin access
server/routes/admin.js - Store Settings → SQLite Database: reads and writes
server/routes/settings.js - Contact Support → SQLite Database: stores messages
server/routes/contact.js - SQLite Database → Catalog Initialization: initializes catalog
server/db/schema.js - Database Backups → SQLite Database: backs up database
server/utils/backup.js - HTTP Server → Rate Limits: configures API limits
server/index.js