๐ 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.
๐ Table of Contents
- Overview
- Live Demo & Repository
- Features
- Tech Stack
- Project Structure
- Getting Started
- Environment Variables
- API Reference
- Design System
- Deployment
- Feature Roadmap
- Contributing
๐ 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:
| Stat | Value |
|---|---|
| Total Files | 100+ |
| Lines of Code | 10,000+ |
| UI Components | 40+ pre-built |
| Pages | 5 |
| Documentation Files | 9 |
| TypeScript Coverage | Strict mode |
๐ Live Demo & Repository
| Link | |
|---|---|
| GitHub | github.com/DHAMI-HARSH/kb |
| Branch | master |
| Languages | TypeScript 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
| Breakpoint | Layout |
|---|---|
Mobile < 768px | Full-width, touch-optimized, bottom drawer chatbot |
Tablet 768โ1024px | 2-column article grid, optimized modals |
Desktop > 1024px | Full-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
| Layer | Technology | Version |
|---|---|---|
| Framework | Next.js (App Router) | 16.0 |
| UI Library | React | 19.2 |
| Language | TypeScript | 5+ |
| Styling | Tailwind CSS | 4.1 |
| Auth | Firebase Auth | 12.5 |
| Component Primitives | Radix UI + shadcn/ui | Latest |
| Form Handling | React Hook Form + Zod | 7.60 |
| Animations | CSS 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
- Node.js 18+ (or Bun)
- A Firebase project โ free tier at firebase.google.com
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
| Variable | Required | Description |
|---|---|---|
NEXT_PUBLIC_FIREBASE_API_KEY | โ Yes | Firebase API key |
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN | โ Yes | Firebase auth domain |
NEXT_PUBLIC_FIREBASE_PROJECT_ID | โ Yes | Firebase project ID |
NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET | โ Yes | Firebase storage bucket |
NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID | โ Yes | Messaging sender ID |
NEXT_PUBLIC_FIREBASE_APP_ID | โ Yes | Firebase app ID |
NEXT_PUBLIC_API_URL | โ Optional | Backend API base URL |
๐ API Reference
All endpoints are mock stubs ready for your backend integration:
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET | /api/articles | Fetch paginated article list | No |
GET | /api/articles/:id | Fetch single article by ID | No |
POST | /api/chat | Send chatbot message, receive AI response | No |
POST | /api/auth/login | User login | No |
POST | /api/auth/register | User registration | No |
Replace the base URL via NEXT_PUBLIC_API_URL in your .env.local.
๐จ Design System
Color Palette
| Token | Hex | Usage |
|---|---|---|
| Deep Space | #0a0e27 | Page background |
| Purple Accent | #7f5af0 | CTAs, highlights, glows |
| Foreground | #f0f0f0 | Headings and body text |
| Neutral | #94a3b8 | Secondary text |
Typography
| Role | Font |
|---|---|
| Headings & UI | Geist Sans |
| Code blocks | Geist 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
| Feature | Status |
|---|---|
| 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:
- Create
app/your-page/page.tsx - Add a component in
app/components/pages/if needed - Use
'use client'for interactive components
Adding a new component:
- Create your file in
app/components/ - Add scoped styles in
app/styles/if required - 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>