A modern, AI-powered Next.js directory template for creating beautiful resource collections and bookmarks. Perfect for creating your own curated list of resources, bookmarks, or link directories.
Built with modern web technologies and designed with a focus on user experience, this template provides everything you need to create a professional resource directory:
- Resource Management: Organize and share bookmarks with rich metadata
- AI Integration: Automatic content generation and smart categorization
- Newsletter: Built-in email subscription with Loops integration
- Beautiful UI: Responsive design with dark/light mode support
- Admin Dashboard: Powerful tools for content management
- Framework: Next.js 14+ with App Router and Server Actions
- Database: Turso (SQLite) with Drizzle ORM
- Styling: Tailwind CSS + shadcn/ui components
- AI: Anthropic Claude for content generation
- Search: Exa for semantic search capabilities
- Analytics: Built-in Vercel Analytics
- Smart Search: Search across titles, descriptions, categories, and tags
- Category Filtering: Browse resources by custom categories
- Tag System: Filter and organize bookmarks with custom tags
- Status Indicators: See favorite and archived bookmarks
- Responsive Design: Works beautifully on all devices
- Theme Support: Automatic dark/light mode
- Newsletter: Subscribe for weekly resource updates
- Secure Admin Panel: Password-protected admin interface
- Rich Content Editor: Full-featured bookmark management with organized form fields
- Tag Management: Add and manage tags for better organization
- Status Management: Mark bookmarks as favorite or archived
- AI Assistance: Automatic metadata extraction and content generation
- Dashboard: View statistics and manage content
- Category Management: Create and organize categories
- Clone the repository:
git clone https://github.com/theNahar/unusual-directory.git
cd directory- Install dependencies:
pnpm install- Set up your environment variables:
cp .env.example .envTURSO_DATABASE_URL: Your Turso SQLite database URLTURSO_AUTH_TOKEN: Authentication token for Turso database access
BOHO_PASSWORD: Password for accessing the/adminroutes- Must be at least 8 characters
- Used for admin dashboard authentication
BOHO_SECRET: Secret key for JWT token signing- Used for secure session management
ANTHROPIC_API_KEY: Anthropic API key for AI features- Required for content generation
- Get one at Anthropic Console
EXASEARCH_API_KEY: Exa API key for enhanced search capabilities- Powers the semantic search feature
- Get one at Exa
LOOPS_API_KEY: API key for email subscription functionality- Required for newsletter features
- Get one at Loops
NEXT_PUBLIC_SITE_URL: Your site's public URL- Format:
https://yourdomain.com - Used for generating OpenGraph images and links
- Format:
SCREENSHOT_API_URL: URL of your Docker screenshot API- Default:
https://shot.nahar.tv/shot - Used for automatic website screenshots
- Default:
SCREENSHOT_AUTH_TOKEN: Authentication token for screenshot API- Required for API access
- Set this to your
AUTH_TOKENfrom the screenshot API
- Initialize the database:
pnpm db:generate # Generate migrations
pnpm db:migrate # Run migrations
pnpm db:seed # Seed initial data (optional)- Start the development server:
pnpm devThe admin dashboard at /admin provides a powerful interface for managing your directory:
-
Add Single Bookmark
- Name: Enter the bookmark name (required)
- Description: Brief description of the bookmark
- Category: Select from existing categories or create new ones
- Tags: Add comma-separated tags for better organization
- Overview: Detailed overview or notes about the bookmark
- Image: Automatic screenshot generation or manual upload
- URL Field: Enter website URL for automatic screenshot via API
- Upload Field: Manually upload an image file
- Process Button: Generates screenshot from URL or processes upload
- URL: Website URL with AI-powered metadata extraction
- Status: Mark as favorite or archived
-
Bulk Import
- Paste multiple URLs for batch processing
- Automatic metadata extraction for all entries
- Review and edit before final import
-
Edit Bookmarks
- Update all metadata fields including tags and status
- Regenerate AI content
- Manage bookmark status (favorite/archived)
- View analytics and engagement
- Create custom categories with colors and icons
- Organize bookmarks into categories
- Edit category metadata
- View category statistics
- Add comma-separated tags to bookmarks
- Tags are displayed as badges on bookmark cards and detail pages
- Use tags for better organization and filtering
- Tags support free-form text input
The admin interface uses Next.js Server Actions for:
- Real-time updates
- Optimistic UI
- Error handling
- Progress tracking
Edit directory.config.ts to customize your site:
export const directory = {
baseUrl: "https://your-domain.com",
name: "Your Directory Name",
title: "Your Site Title",
description: "Your site description",
};-
Push to GitHub
git add . git commit -m "Initial commit" git push origin main
-
Connect to Vercel
- Go to vercel.com
- Sign up/Login with GitHub
- Click "New Project"
- Import your repository
- Configure environment variables
-
Set Environment Variables in Vercel
- Go to your project settings
- Navigate to "Environment Variables"
- Add all variables from your
.envfile:TURSO_DATABASE_URLTURSO_AUTH_TOKENBOHO_PASSWORDBOHO_SECRETANTHROPIC_API_KEYEXASEARCH_API_KEYLOOPS_API_KEYNEXT_PUBLIC_SITE_URL
-
Deploy
- Vercel will automatically build and deploy your app
- Your app will be available at
your-app-name.vercel.app
- Your app will be available at:
your-app-name.vercel.app - Update
NEXT_PUBLIC_SITE_URLin Vercel environment variables
- Your app is configured for:
https://dir.nahar.tv - Update
NEXT_PUBLIC_SITE_URLtohttps://dir.nahar.tv
- Purchase a domain (Namecheap, GoDaddy, etc.)
- Add domain in Vercel:
- Go to project settings β Domains
- Add your custom domain
- Follow DNS configuration instructions
- Update environment variables:
- Set
NEXT_PUBLIC_SITE_URLto your custom domain
- Set
-
Run Database Migrations
# In Vercel dashboard or via CLI vercel env pull .env.local npm run db:migrate -
Verify Setup
- Visit your deployed URL
- Test admin login at
/admin - Add some test bookmarks
- Verify all features work
- Vercel Analytics: Built-in performance monitoring
- Function Logs: View serverless function execution
- Database: Monitor Turso database usage
The project is optimized for Vercel deployment with:
- Edge runtime support
- Automatic SQLite database setup
- Built-in analytics
- Zero-config deployment
- Serverless functions optimization
Contributions are welcome! Please feel free to submit a Pull Request. Some areas we'd love help with:
- Additional bookmark import sources
- Enhanced AI features
- New UI components
- Documentation improvements
MIT License - feel free to use this template for your own projects!
For support:
- Open an issue in the GitHub repository
- Check out the documentation
- Join our community
Built with β€οΈ for the open source community, forked from 9d8.