docs-portal
📌 Table of Contents
🔹 About This Project📂 Folder Structure⚙️ Installation & Setup🚀 Deployment Guide🔄 Contributing📜 License💬 Community & Support
🔹 About This Project
This project provides DevOps & Cloud learning resources in a structured way, allowing users to search and download documents quickly.
📂 Folder Structure
DOCS-PORTAL
├── app
│ ├── globals.css # Global styles (Tailwind base + custom CSS)
│ ├── layout.tsx # Root layout (sets up ThemeProvider, fonts, metadata)
│ └── page.tsx # Main homepage (renders Header, Search, Results)
├── components
│ ├── DocCard.tsx # Card component for displaying a document/resource
│ ├── explanation.tsx # Small explanation block about the portal
│ ├── Footer.tsx # Footer with copyright
│ ├── Header.tsx # Site header with logo, title, and description
│ ├── loading.tsx # Loading skeleton for lazy components/pages
│ ├── SearchResults.tsx # Displays filtered search results
│ ├── search.tsx # Search bar with animation and debounce
│ ├── ThemeToggle.tsx # Light/dark mode toggle button
│ └── ui # Reusable UI components
│ ├── button.tsx # Styled Button component
│ ├── input.tsx # Styled Input component
│ └── skeleton.tsx # Skeleton loader UI
├── data
│ └── files.json # List of all resource files with metadata (name, url, size)
├── lib
│ └── utils.ts # Helper utility functions (e.g., formatting file sizes)
├── providers
│ └── theme-provider.tsx # Wrapper around next-themes provider for light/dark mode
├── public
│ └── pdfs # Folder containing all uploaded PDF documents
├── CHANGELOG # Version history and updates
├── CODE_OF_CONDUCT.md # Contributor behavior guidelines
├── components.json # (Optional) Component metadata/config (if used)
├── CONTRIBUTING.md # Contribution instructions for developers
├── generateFilesList.js # Script to auto-generate `files.json` from PDFs
├── LICENSE # Open-source license for the project
├── next.config.ts # Next.js configuration file
├── next-env.d.ts # TypeScript environment settings for Next.js
├── package.json # Project metadata and dependencies
├── package-lock.json # Lock file for exact versions of installed packages
├── postcss.config.mjs # PostCSS config for TailwindCSS and plugins
├── README.md # Project documentation (you are updating this!)
├── tailwind.config.ts # TailwindCSS configuration
└── tsconfig.json # TypeScript compiler settings
-
index.js→ Displays the UI for document search & download. -
generateFilesList.js→ Auto-generatesfiles.jsonfor document listing. -
next.config.js→ Handles URL rewriting & caching.
⚙️ Installation & Setup
✅ Prerequisites
-
Node.js (
>=18.x) - Git
- Yarn or NPM
📥 Clone the Repository
git clone https://gitlab.com/NotHarshhaa/docs-portal.git
cd docs-portal
🔧 Install Dependencies
npm install
🔄 Generate Files List
node scripts/generateFilesList.js
🏃 Run Locally
npm run dev
🚀 Deployment Guide
🔹 Deploy via GitLab CI/CD
GitLab CI/CD automatically builds and deploys the site.
✅ Steps:
main branch
.gitlab-ci.yml to customize builds.
🔄 Contributing
We welcome contributions! Follow these steps to get started:
feature-branch)
📜 License
This project is licensed under the MIT License.
See the full license here.
💬 Community & Support