Knowledge Bank

Archivedknowledge-bank-fh4l

A space-themed AI-powered knowledge management platform built with Next.js 16, React 19, and Firebase.

NextjsAI/MLAgentic AILangchainLangraphDBMS
Knowledge Bank

๐ŸŒŒ Knowledge Bank Engine

A space-themed, AI-powered knowledge management platform โ€” built with Next.js 16, React 19, Firebase Auth, and a deep-space glassmorphism aesthetic.

Next.js React TypeScript Tailwind CSS Firebase


๐Ÿ“‘ Table of Contents


๐Ÿš€ Overview

Knowledge Bank Engine is a production-ready frontend platform that brings together a rich article library, an AI-powered chatbot assistant, and Firebase-backed authentication โ€” all wrapped in a stunning deep-space visual theme.

The platform is backend-agnostic by design: all API endpoints are mock-ready stubs waiting for your own server. Swap in your backend URL, connect Firebase, and you're live.

At a glance:

StatValue
Total Files100+
Lines of Code10,000+
UI Components40+ pre-built
Pages5
Documentation Files9
TypeScript CoverageStrict mode

๐Ÿ”— Live Demo & Repository

Link
GitHubgithub.com/DHAMI-HARSH/kb
Branchmaster
LanguagesTypeScript 81.6% ยท CSS 14.8% ยท Other 3.6%

โœจ Features

๐ŸŽจ Visual & UI

  • Parallax Starfield โ€” animated deep-space background with smooth parallax scrolling
  • 3D Planet Model โ€” interactive planet visualization on the hero section
  • Glassmorphism Panels โ€” frosted glass cards with glow effects throughout the UI
  • Gradient Text & Neon Accents โ€” purple (#7f5af0) and cyan highlights on interactive elements
  • Smooth Transitions โ€” fade-in, slide-in, and hover animations across all pages

๐Ÿ“š Article Explorer

  • Responsive Grid Layout โ€” adapts from 1-column (mobile) to multi-column (desktop)
  • Real-time Search โ€” instant filtering across article title and description
  • Tag-based Filtering โ€” multi-select category tags with a clear-filters option
  • Infinite Scroll โ€” seamless pagination as you browse
  • Article Modal โ€” full content view with metadata, including authenticated-only PDF download

๐Ÿ’ฌ AI Chatbot

  • Slide-in Drawer โ€” smooth right-side animation, non-blocking UI
  • Source Attribution โ€” clickable references to specific articles behind each response
  • Suggested Follow-ups โ€” context-aware next questions
  • Conversation History โ€” persistent within session with auto-scroll

๐Ÿ” Authentication

  • Email / Password Sign-up & Sign-in
  • Google OAuth โ€” one-click social login via Firebase
  • Password Reset Flow โ€” email-based security code verification
  • Protected Routes โ€” download and premium features gated behind auth
  • User Profile Dropdown โ€” email display + sign-out in the navbar

๐Ÿ“ฑ Responsive Design

BreakpointLayout
Mobile < 768pxFull-width, touch-optimized, bottom drawer chatbot
Tablet 768โ€“1024px2-column article grid, optimized modals
Desktop > 1024pxFull-featured multi-column layout

Minimum touch target size: 48ร—48px across all interactive elements.

โšก Performance & Security

  • Next.js automatic code splitting and lazy loading
  • Firebase ID token verification for authenticated API calls
  • XSS prevention and CORS handling baked in
  • Core Web Vitals optimized โ€” zero CLS, fast FCP/LCP
  • Geist font optimization via Next.js font loader

๐Ÿ›  Tech Stack

LayerTechnologyVersion
FrameworkNext.js (App Router)16.0
UI LibraryReact19.2
LanguageTypeScript5+
StylingTailwind CSS4.1
AuthFirebase Auth12.5
Component PrimitivesRadix UI + shadcn/uiLatest
Form HandlingReact Hook Form + Zod7.60
AnimationsCSS Animations + Tailwindโ€”

๐Ÿ“ Project Structure

knowledge-bank-engine/
โ”‚
โ”œโ”€โ”€ ๐Ÿ“„ Documentation
โ”‚   โ”œโ”€โ”€ START_HERE.txt          โ† Entry point overview
โ”‚   โ”œโ”€โ”€ README.md               โ† Full reference docs
โ”‚   โ”œโ”€โ”€ QUICKSTART.md           โ† 5-minute setup guide
โ”‚   โ”œโ”€โ”€ INSTALLATION.md         โ† Detailed installation steps
โ”‚   โ”œโ”€โ”€ FEATURES.md             โ† Complete feature catalogue
โ”‚   โ”œโ”€โ”€ PROJECT_STRUCTURE.md    โ† Architecture walkthrough
โ”‚   โ”œโ”€โ”€ DEPLOYMENT.md           โ† Production deployment guide
โ”‚   โ”œโ”€โ”€ CONTRIBUTING.md         โ† Contribution guidelines
โ”‚   โ””โ”€โ”€ SETUP_CHECKLIST.md      โ† Verification checklist
โ”‚
โ”œโ”€โ”€ ๐Ÿš€ Application Code
โ”‚   โ””โ”€โ”€ app/
โ”‚       โ”œโ”€โ”€ layout.tsx           โ† Root layout with providers
โ”‚       โ”œโ”€โ”€ page.tsx             โ† Home / landing page
โ”‚       โ”œโ”€โ”€ globals.css          โ† Design tokens & global styles
โ”‚       โ”œโ”€โ”€ providers.tsx        โ† Firebase Auth context (Singleton)
โ”‚       โ”œโ”€โ”€ articles/page.tsx    โ† Article explorer page
โ”‚       โ”œโ”€โ”€ signin/page.tsx      โ† Sign-in page
โ”‚       โ”œโ”€โ”€ signup/page.tsx      โ† Sign-up page
โ”‚       โ”œโ”€โ”€ forgot-password/     โ† Password reset flow
โ”‚       โ”œโ”€โ”€ components/
โ”‚       โ”‚   โ”œโ”€โ”€ navbar.tsx       โ† Navigation bar
โ”‚       โ”‚   โ”œโ”€โ”€ chatbot-panel.tsxโ† AI chatbot drawer
โ”‚       โ”‚   โ”œโ”€โ”€ article-card.tsx โ† Article preview card
โ”‚       โ”‚   โ”œโ”€โ”€ starfield.tsx    โ† Animated starfield background
โ”‚       โ”‚   โ”œโ”€โ”€ planet-model.tsx โ† 3D planet component
โ”‚       โ”‚   โ”œโ”€โ”€ pages/           โ† Full page components
โ”‚       โ”‚   โ””โ”€โ”€ modals/          โ† Modal overlays
โ”‚       โ””โ”€โ”€ styles/
โ”‚           โ””โ”€โ”€ animations.css   โ† Shared animation utilities
โ”‚
โ”œโ”€โ”€ ๐Ÿงฉ Shared
โ”‚   โ”œโ”€โ”€ components/ui/           โ† shadcn/ui primitives
โ”‚   โ”œโ”€โ”€ hooks/                   โ† Custom React hooks
โ”‚   โ”œโ”€โ”€ lib/                     โ† Utility functions
โ”‚   โ””โ”€โ”€ public/                  โ† Static assets
โ”‚
โ””โ”€โ”€ โš™๏ธ Configuration
    โ”œโ”€โ”€ next.config.ts
    โ”œโ”€โ”€ tsconfig.json
    โ”œโ”€โ”€ postcss.config.mjs
    โ”œโ”€โ”€ eslint.config.mjs
    โ”œโ”€โ”€ components.json          โ† shadcn/ui config
    โ””โ”€โ”€ package.json

๐Ÿ Getting Started

Prerequisites

Quick Setup (3 steps)

# 1. Clone the repository
git clone https://github.com/DHAMI-HARSH/kb.git
cd kb

# 2. Install dependencies
npm install        # or: bun install / yarn install / pnpm install

# 3. Configure environment & run
cp .env.example .env.local
# โ†’ Add your Firebase credentials to .env.local
npm run dev

Visit http://localhost:3000 ๐Ÿš€

Automated Setup

chmod +x scripts/setup.sh
./scripts/setup.sh
# Follow the interactive prompts

Available Scripts

npm run dev      # Start development server (hot reload)
npm run build    # Build for production
npm start        # Start production server
npm run lint     # Run ESLint

๐Ÿ”‘ Environment Variables

Create a .env.local file in the root:

# Firebase โ€” Required
NEXT_PUBLIC_FIREBASE_API_KEY=your_api_key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN=your_auth_domain
NEXT_PUBLIC_FIREBASE_PROJECT_ID=your_project_id
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET=your_storage_bucket
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=your_messaging_sender_id
NEXT_PUBLIC_FIREBASE_APP_ID=your_app_id

# Backend API โ€” Optional (defaults to localhost:5000)
NEXT_PUBLIC_API_URL=http://localhost:5000

Where to get Firebase values:

Firebase Console โ†’ Project Settings โ†’ General โ†’ Your Apps โ†’ Web โ†’ firebaseConfig

VariableRequiredDescription
NEXT_PUBLIC_FIREBASE_API_KEYโœ… YesFirebase API key
NEXT_PUBLIC_FIREBASE_AUTH_DOMAINโœ… YesFirebase auth domain
NEXT_PUBLIC_FIREBASE_PROJECT_IDโœ… YesFirebase project ID
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKETโœ… YesFirebase storage bucket
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_IDโœ… YesMessaging sender ID
NEXT_PUBLIC_FIREBASE_APP_IDโœ… YesFirebase app ID
NEXT_PUBLIC_API_URLโŒ OptionalBackend API base URL

๐Ÿ”Œ API Reference

All endpoints are mock stubs ready for your backend integration:

MethodEndpointDescriptionAuth Required
GET/api/articlesFetch paginated article listNo
GET/api/articles/:idFetch single article by IDNo
POST/api/chatSend chatbot message, receive AI responseNo
POST/api/auth/loginUser loginNo
POST/api/auth/registerUser registrationNo

Replace the base URL via NEXT_PUBLIC_API_URL in your .env.local.


๐ŸŽจ Design System

Color Palette

TokenHexUsage
Deep Space#0a0e27Page background
Purple Accent#7f5af0CTAs, highlights, glows
Foreground#f0f0f0Headings and body text
Neutral#94a3b8Secondary text

Typography

RoleFont
Headings & UIGeist Sans
Code blocksGeist Mono

Visual Effects

  • Glassmorphism โ€” frosted translucent panels
  • Glow effects โ€” purple/cyan halos on hover and focus
  • Parallax โ€” multi-layer depth on the hero background
  • CSS animations โ€” fade-in on load, slide-in for drawers, shimmer on skeletons

๐Ÿšข Deployment

Vercel (Recommended)

npm install -g vercel
vercel
# Follow prompts โ€” add env vars in the Vercel dashboard

Other Platforms

npm run build
# Deploy the generated .next/ folder to your host

Set all environment variables from the Environment Variables section in your platform's settings panel.


๐Ÿ—บ Feature Roadmap

FeatureStatus
Landing page with parallax & 3D planetโœ… Done
Article explorer with search & filterโœ… Done
Firebase email & Google authenticationโœ… Done
AI chatbot with source attributionโœ… Done
PDF download (authenticated users)โœ… Done
Responsive mobile-first designโœ… Done
Backend API connection๐Ÿ”Œ Plug-in Ready
Database integration๐Ÿ”Œ Plug-in Ready
Advanced analytics dashboard๐Ÿ—“ Planned (Pro)
Team collaboration features๐Ÿ—“ Planned (Pro)
Custom integrations & webhooks๐Ÿ—“ Planned (Enterprise)

๐Ÿค Contributing

Contributions are welcome! Here's how to get started:

# Fork the repo, then:
git clone https://github.com/YOUR-USERNAME/kb.git
cd kb
npm install
git checkout -b feature/your-feature-name

Adding a new page:

  1. Create app/your-page/page.tsx
  2. Add a component in app/components/pages/ if needed
  3. Use 'use client' for interactive components

Adding a new component:

  1. Create your file in app/components/
  2. Add scoped styles in app/styles/ if required
  3. Export and import where needed

Submit a Pull Request against master when ready. All PRs welcome!


๐Ÿ“„ License

MIT License โ€” free to use as a template, starter, or foundation for your own projects.


<div align="center">

Built with โค๏ธ by DHAMI-HARSH ยท View on GitHub

</div>