Skip to content

be-jojo/knowledge-base-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Knowledge Base Application

A pixel-accurate React UI for a Knowledge Base application built with React and Tailwind CSS.

πŸ“ Project Structure

knowledge-base-app/
β”œβ”€β”€ public/
β”‚   └── index.html
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ Button.jsx              # Reusable button component
β”‚   β”‚   β”œβ”€β”€ Header.jsx              # Header with branding
β”‚   β”‚   β”œβ”€β”€ Sidebar.jsx             # Sidebar navigation
β”‚   β”‚   β”œβ”€β”€ KnowledgeCard.jsx       # Knowledge base card component
β”‚   β”‚   └── CreateNewModal.jsx      # Create new article modal
β”‚   β”œβ”€β”€ layout/
β”‚   β”‚   └── MainLayout.jsx          # Main layout wrapper
β”‚   β”œβ”€β”€ pages/
β”‚   β”‚   └── Home.jsx                # Home page with all articles
β”‚   β”œβ”€β”€ App.jsx                     # Main App component
β”‚   β”œβ”€β”€ index.jsx                   # React DOM entry point
β”‚   └── index.css                   # Global styles & Tailwind imports
β”œβ”€β”€ package.json                    # Dependencies
β”œβ”€β”€ tailwind.config.js              # Tailwind configuration
β”œβ”€β”€ postcss.config.js               # PostCSS configuration
└── README.md                       # This file

🎨 Design Features

  • Primary Color: #4F46E5 (Indigo)
  • Secondary Color: #1E1B4B (Dark Navy)
  • Pixel-accurate UI replicated from Figma design
  • Responsive Layout: Works on desktop and tablet screens
  • Component-based Architecture: Reusable, clean components

πŸš€ Features

βœ… Home Screen

  • Header with branding and user profile
  • Sidebar navigation with menu items
  • Knowledge base cards grid layout
  • Responsive design

βœ… Create New Modal

  • Opens on "Create New" button click
  • Dimmed overlay background
  • Centered modal with close button
  • Form with title, category, and description fields
  • Submit and cancel actions

βœ… User Interaction

  • "Create New" button opens/closes modal
  • Responsive hover states
  • Smooth transitions and animations

πŸ“¦ Prerequisites

Before running the application, ensure you have:

  • Node.js (v14 or higher)
  • npm or yarn package manager

πŸ› οΈ Installation & Setup

1. Navigate to the project directory

cd Project Assignments/knowledge-base-app

2. Install dependencies

npm install

This will install:

  • React 18
  • Tailwind CSS 3
  • PostCSS and Autoprefixer

3. Start the development server

npm start

The application will open at http://localhost:3000

πŸ’» Development Commands

# Start development server
npm start

# Build for production
npm build

# Run tests
npm test

🎯 User Interactions

Main Screen

  1. Sidebar Navigation - Click on menu items (currently static)
  2. Create New Button - Click to open modal
  3. Knowledge Cards - Display articles in responsive grid
  4. Close Button (βœ•) - Available in modal header

Modal Interaction

  • Click "Create New" button β†’ Modal opens with overlay
  • Fill in form fields (Title, Category, Description)
  • Click "Cancel" β†’ Modal closes
  • Click "Create Article" β†’ Modal closes (form submission)
  • Click overlay β†’ Modal closes (backdrop click)

πŸ“± Responsive Breakpoints

  • Mobile: Base styles (< 768px)
  • Tablet: md breakpoint (768px - 1024px)
  • Desktop: lg breakpoint (1024px+)

🎨 Color Scheme

Name Color Usage
Primary #4F46E5 Buttons, active states, accents
Secondary #1E1B4B Sidebar background
Gray-50 #F9FAFB Main background
Gray-200 #E5E7EB Borders
White #FFFFFF Cards, modals

πŸ“ Component Details

Header

  • Logo with KB badge
  • Title
  • Search and notification icons
  • User profile avatar

Sidebar

  • Create New button (primary action)
  • Navigation menu items
  • Version info and footer

Knowledge Cards

  • Title and description
  • Category badge
  • Publication date
  • Read time estimate
  • Hover effects

Button Component

Variants: primary, secondary, ghost Sizes: sm, md, lg

Modal

  • Header with title and close button
  • Form inputs (text, select, textarea)
  • Footer with action buttons
  • Overlay backdrop

πŸ”§ Customization

Change Primary Color

Edit tailwind.config.js:

colors: {
  primary: "#YOUR_COLOR_HERE",
}

Modify Sidebar Menu Items

Edit src/components/Sidebar.jsx:

const menuItems = [
  { icon: 'πŸ“š', label: 'Custom Item', active: false },
  // ...
];

Add More Knowledge Cards

Edit src/pages/Home.jsx and update the knowledgeArticles array

πŸ“š Technologies Used

  • React 18 - UI library
  • Tailwind CSS 3 - Utility-first CSS framework
  • PostCSS - CSS processing
  • React Scripts - Build tooling

πŸ“„ Notes

  • This is a frontend-only implementation
  • No backend API integration (as per requirements)
  • No authentication system
  • No database
  • Focus on UI/UX and component structure

🀝 Contributing

Feel free to customize and extend the components as needed.

πŸ“ž Support

For issues or questions about the application, refer to the component files in the src/ directory.


Created: 2026
Status: Complete - Ready for production deployment

Releases

No releases published

Packages

 
 
 

Contributors