A modern, responsive, and customizable directory website boilerplate built with React, TypeScript, and Tailwind CSS. Perfect for creating searchable directories from structured data sources.
- π¨ Modern UI with Light/Dark mode support
- π± Fully responsive design (mobile-first approach)
- π Real-time search functionality
- π·οΈ Category-based filtering
- π― SEO-friendly structure
- π Fast performance
- π Customizable styling with Tailwind CSS
- π Easy data integration
- π Automatic logo generation for entries without logos
- π Consistent theming across components
- React 18
- TypeScript
- Tailwind CSS
- Vite
- React Router
- Lucide Icons
- Node.js 16.x or later
- npm or yarn
- Git
- Clone the repository:
git clone https://github.com/yourusername/directory-boilerplate.git cd directory-boilerplate
- Install dependencies:
npm install
yarn install
- Set up configuration files:
Create tailwind.config.js:
/** @type {import('tailwindcss').Config} / export default { content: [ "./index.html", "./src/**/.{js,ts,jsx,tsx}", ], darkMode: 'class', theme: { extend: {}, }, plugins: [], }
Create postcss.config.js:
export default { plugins: { tailwindcss: {}, autoprefixer: {}, }, }
Create tsconfig.json:
{ "compilerOptions": { "target": "ES2020", "useDefineForClassFields": true, "lib": ["ES2020", "DOM", "DOM.Iterable"], "module": "ESNext", "skipLibCheck": true, "moduleResolution": "bundler", "allowImportingTsExtensions": true, "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "react-jsx", "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, "noFallthroughCasesInSwitch": true }, "include": ["src"], "references": [{ "path": "./tsconfig.node.json" }] }
Create vite.config.ts:
import { defineConfig } from 'vite' import react from '@vitejs/plugin-react'
export default defineConfig({ plugins: [react()], })
- Create required directories:
mkdir -p src/{components,pages,data} mkdir -p public mkdir -p docs/assets/images
- Add the source files:
- Copy the provided components to src/components/
- Copy the pages to src/pages/
- Add your data to src/data/agents.ts
- Copy the SVG icon to public/tools.svg
- Add the CSS file to src/index.css
- Start the development server:
npm run dev
yarn dev
The application will be available at http://localhost:5173
- For production build:
npm run build
yarn build
The build output will be in the dist directory.
Convert your data source (CSV, JSON, Excel) into a markdown file format. Example structure:
- Name: Example Name
- Category: Example Category
- Description: Example Description
- Website: https://example.com
- Logo: https://example.com/logo.png
...
- Place your markdown file in the /src/data/ directory
- Use AI assistance to convert the markdown data into the required TypeScript format in src/data/agents.ts
Modify UI elements and styling according to your needs by editing the components in /src/components/.
βββ public/ β βββ tools.svg βββ src/ β βββ components/ β β βββ AgentCard.tsx β β βββ Header.tsx β β βββ CategoryFilter.tsx β βββ data/ β β βββ agents.ts β βββ pages/ β β βββ HomePage.tsx β β βββ AgentDetailPage.tsx β βββ index.css βββ package.json
- Modify tailwind.config.js for theme customization
- Edit src/index.css for global styles
- Component-specific styling can be found in respective component files
- Header.tsx: Navigation and search functionality
- AgentCard.tsx: Directory entry card layout
- CategoryFilter.tsx: Category filtering system
- HomePage.tsx: Main directory listing
- AgentDetailPage.tsx: Detailed view of entries
- Real-time search across all entry fields
- Debounced search for performance
- Highlights matching results
- Dynamic category generation from data
- Multiple category support per entry
- Filterable interface
- Mobile-first approach
- Adaptive layouts
- Touch-friendly interfaces
- System preference detection
- Manual toggle option
- Persistent preference storage
The boilerplate is optimized for:
- Fast initial load time
- Smooth animations
- Efficient data handling
- Minimal bundle size
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License
Copyright (c) 2024 [Dambrubaba]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For support, please open an issue in the GitHub repository.
- Icons by Lucide Icons (https://lucide.dev/)
- UI inspiration from various modern directory websites