How mbaharip/next-gdrive-index works
Project type and purpose
• This is a full-stack, monolithic Next.js 13 application (App Router) whose purpose is to provide a Google Drive directory index with file preview, download proxy, simple ACL (password protection), and an embedded configurator UI.
File structure
• Top-level: next.config.js, tsconfig.json, package.json, .env example, config files, public assets
• src/app: page.tsx, layout, loading/error handlers, nested routes, and app/api directory containing all serverless API endpoints
• src/actions: “server actions” modules (configuration.ts, files.ts, token.ts, etc.) that encapsulate calls to Google Drive
• src/components: React components grouped by concern (explorer UI, preview UI, layout, global, UI primitives, internal configurator pages)
• src/lib: utility functions and helpers (configurationHelper, previewHelper)
• Configuration: .env or downloaded .env with service-account credentials, encryption key parameters
README insights
• Uses Google Drive REST API under the hood
• Runs entirely in Next.js environment (SSR + serverless functions)
• Features: folder listing, file preview (image, video, audio, document, code, manga), direct download proxy, raw links, thumbnail generation, OG image generation