Turn your photos into epic Jurassic Park-style videos with dinosaurs entering the scene using the Higgsfield AI SDK.
- πΈ Image Upload: Support for file upload and mobile camera capture
- π¬ Motion Selection: Choose from various camera motions (zoom, pan, dolly, etc.)
- π¦ Jurassic Park Theme: Automatic prompt generation for dinosaur scenes
- π§ Zombie Apocalypse: Alternative zombie-themed video generator
- π Multiple Themes: Two immersive experiences (dinosaurs and zombies)
- π¨ Modern UI: Responsive design with dark mode support
- β Testing: Unit, integration, and e2e tests with Jest and Playwright
- π Type-Safe: Full TypeScript support
- β‘ Fast: Built with Next.js 15 and Turbopack
- Node.js 22.x or later
- pnpm 10.x or later
- Higgsfield AI API credentials (Get them here)
# Install dependencies
pnpm installCreate .env.local file in the project root:
HF_API_KEY=your_api_key_here
HF_SECRET=your_api_secret_here
β οΈ Important: Never commit your.envor.env.localfiles. They are already in.gitignore.
pnpm devOpen http://localhost:3000 to see the app.
pnpm dev- Start development server with Turbopackpnpm build- Build for productionpnpm start- Start production server
pnpm lint- Run ESLintpnpm format- Format code with Prettierpnpm format:check- Check code formattingpnpm typecheck- Run TypeScript type checking
pnpm test- Run unit and integration testspnpm test:watch- Run tests in watch modepnpm test:coverage- Run tests with coverage reportpnpm e2e- Run Playwright e2e testspnpm e2e:ui- Run e2e tests with UI mode
src/
βββ app/
β βββ api/
β β βββ generate/route.ts # Video generation endpoint
β β βββ motions/route.ts # Motion list endpoint
β βββ page.tsx # Main UI page
β βββ globals.css # Global styles
βββ components/
β βββ MotionSelector.tsx # Motion selection component
βββ lib/
β βββ env.ts # Environment validation
β βββ higgsfield.ts # Higgsfield client wrapper
βββ types/
βββ common.ts # Shared TypeScript types
e2e/
βββ home.spec.ts # End-to-end tests
- Upload Image: Select a photo from your device or take one with your camera
- Choose Motion (optional): Select a camera motion effect and adjust strength
- Generate: Click the generate button to create your video
- Download: Once complete, watch and download your Jurassic Park-style video
The app uses:
- Client-side: React for UI, FormData for file uploads
- API Routes: Next.js API routes handle image validation and Higgsfield API calls
- Server-only: Higgsfield credentials stay server-side for security
This project follows testing best practices:
- Unit Tests: Test individual functions and utilities
- Integration Tests: Test API routes with mocked dependencies
- E2E Tests: Test user flows with Playwright
- Pre-commit Hooks: Automatically lint and format before commits
- CI/CD: GitHub Actions runs all checks on push
Required:
HF_API_KEY- Your Higgsfield API keyHF_SECRET- Your Higgsfield API secret
These are validated at runtime using Zod schemas.
- Framework: Next.js 15 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- AI SDK: @higgsfield/client
- Validation: Zod
- Testing: Jest, Testing Library, Playwright
- Code Quality: ESLint, Prettier, Husky, lint-staged
- Built with Higgsfield AI
- Powered by Next.js
MIT