Next.js 15 application with TypeScript, featuring search functionality and Lottie animations.
- Search System: Full-text search with SSR support and live search
- Lottie Animations: Comprehensive animation system with inline and dynamic loading
- Modern Stack: Next.js 15, TypeScript, Tailwind CSS, shadcn/ui
- Performance: Optimized for Cloudflare deployment with OpenNext
├── src/
│ ├── components/
│ │ ├── lottie/ # Lottie animation system
│ │ ├── ui/ # shadcn/ui components
│ │ └── SearchResults.tsx
│ ├── pages/
│ │ ├── search.tsx # Search page with SSR
│ │ └── lottie-demo.tsx # Animation examples
│ ├── lib/
│ │ └── lottie-utils.ts # Animation utilities
│ └── hooks/
│ └── useLottie.ts # Animation control hook
├── public/
│ └── animations/ # Lottie JSON files
└── docs/ # Documentation
- Node.js 18+
- Bun (recommended) or npm/yarn
# Clone the repository
git clone <repository-url>
cd alcohol.argon
# Install dependencies
bun install
# Start development server
bun dev
# Type checking
bun run type-check
# Build for production
bun run build
This project includes a comprehensive Lottie animation system with both inline and dynamic loading capabilities.
Option 1: Immediate Usage (CSS/SVG Fallbacks)
import { LoadingLottie, SuccessLottie } from '@/components/lottie';
<LoadingLottie size={32} /> // Works immediately
<SuccessLottie size={48} /> // CSS spinner & SVG icons
Option 2: Inline Lottie Animations
import animationData from '/public/animations/loading.json';
import { InlineLottie } from '@/components/lottie';
<InlineLottie animationData={animationData} width={48} height={48} />
Option 3: Dynamic Loading
import { LottieAnimation } from '@/components/lottie';
<LottieAnimation animationName="loading" width={48} height={48} />
- Get Animations: Download from LottieFiles.com
- Add Files: Place JSON files in
/public/animations/
- Use Components: Import and use in your React components
InlineLottie
- Zero loading states, immediate displayLottieAnimation
- Hybrid component with fallback supportLoadingLottie
- Loading spinner presetSuccessLottie
- Success checkmark presetErrorLottie
- Error state presetEmptyStateLottie
- Empty state illustration preset
Visit /lottie-demo
to see:
- Live examples of all components
- Code snippets and usage patterns
- Setup instructions and best practices
- Performance guidelines
Full-featured search system with:
- Server-side rendering (SSR)
- Live search with debouncing
- URL query parameter synchronization
- Loading states and error handling
Visit /search
to try it out.
- ESLint + TypeScript for code quality
- Prettier for code formatting
- Pre-commit hooks for validation
- Bundle size monitoring
- Image optimization
- Animation file size guidelines (< 100KB)
- Optimized for Cloudflare with OpenNext
- SSR support for better SEO
- Static asset optimization
- LLM.MD - Technical architecture and decisions
- TODO.md - Project status and completed features
- public/animations/README.md - Complete Lottie setup guide
- Changelog.md - Version history
- Framework: Next.js 15 with App Router
- Language: TypeScript
- Styling: Tailwind CSS + shadcn/ui
- Animations: Lottie with lottie-react
- Deployment: Cloudflare with OpenNext
- Package Manager: Bun
- Build Tools: Next.js built-in tooling
- Check TODO.md for current tasks
- Follow the existing code patterns
- Add tests for new features
- Update documentation as needed
[Add your license information here]