Overview
AI Studio currently does not have a dedicated test runner configured. Testing is performed through manual verification, linting, and TypeScript type checking.This is an evolving area. Contributions to add automated testing are welcome! See the Contributing Guide for how to propose improvements.
Quality Assurance Tools
ESLint
The project uses Next.js ESLint configuration for code quality:eslint.config.mjs:
- React Hooks rules
- Next.js best practices
- TypeScript type usage
- Accessibility guidelines
- Import/export patterns
TypeScript Type Checking
The project is fully typed with TypeScript 5:next.config.ts currently has:
Biome (Code Formatter)
The project includes Biome for fast linting and formatting:Manual Testing Guidelines
Testing Workflow
When making changes, follow this verification process:- Run ESLint:
pnpm lint - Build locally:
pnpm build - Test locally:
pnpm dev+ manual verification - Test with Trigger.dev:
pnpm trigger(in separate terminal) - Document verification steps: Include in PR description
Critical Paths to Test
Authentication Flow
- Visit
http://localhost:3000 - Click “Sign Up” and create account
- Verify email sending (check Resend dashboard)
- Sign in with credentials
- Test sign out
- Test password reset flow
lib/auth.ts- Better Auth configurationapp/api/auth/[...all]/route.ts- Auth endpoints
Project Creation & Management
- Navigate to
/dashboard - Click “New Project”
- Upload property images
- Select style template
- Verify project appears in dashboard grid
- Test table view toggle
- Open project details page
app/dashboard/page.tsx- Dashboard grid/table viewapp/dashboard/[id]/page.tsx- Project detail pagecomponents/projects/*- Project creation workflow
AI Image Processing
- Create project with images
- Apply AI style template
- Monitor Trigger.dev dashboard for job status
- Verify processed image appears
- Download result
- Check Supabase storage for uploaded files
trigger/process-image.ts- Image processing jobapp/api/edit-photo/route.ts- API endpointlib/style-templates.ts- Style template definitions
Video Generation
Manual Steps:- Create video project
- Upload multiple property images
- Configure transitions and music
- Trigger video generation
- Monitor Trigger.dev for:
video-orchestrator.ts- Main workflowgenerate-video-clip.ts- Individual clipsgenerate-transition-clip.ts- Transitionscompile-video.ts- Final assembly
- Verify final video download
trigger/video-orchestrator.tstrigger/generate-video-clip.tstrigger/generate-transition-clip.tstrigger/compile-video.ts
Team Workspaces
Manual Steps:- Create workspace in
/dashboard/settings/team - Invite team member via email
- Accept invitation (use different browser/incognito)
- Verify role-based permissions:
- Owner: Full access
- Admin: Manage members
- Member: View only
- Test workspace switching
app/dashboard/settings/team/page.tsxcomponents/settings/team-settings.tsx
Admin Panel
Manual Steps:- Sign in as admin user
- Navigate to
/admin - Verify user list loads
- Check workspace overview
- Test analytics dashboard
app/admin/users/page.tsxapp/admin/workspaces/page.tsxcomponents/admin/*
Database Testing
Verify database operations using Drizzle Studio:http://localhost:4983 for:
- Viewing all tables
- Inspecting data
- Running queries
- Verifying relationships
user- User accountsworkspace- Team workspacesproject- Photo/video projectssession- Auth sessionsaccount- OAuth accounts
Email Testing
Preview email templates locally:- Team invitation emails
- Welcome emails
- Password reset emails
emails/
Browser Testing
Test in multiple browsers:- Chrome/Edge: Primary target
- Firefox: Verify compatibility
- Safari: Test on macOS/iOS
- Mobile browsers: Responsive design
Responsive Testing
Verify layouts at:- Mobile: 375px (iPhone)
- Tablet: 768px (iPad)
- Desktop: 1920px (Full HD)
Performance Testing
Build Size
- Bundle size warnings
- Large page sizes
- Unused dependencies
Lighthouse
Run Chrome DevTools Lighthouse on:- Landing page
- Dashboard
- Project detail page
- Performance: >90
- Accessibility: >90
- Best Practices: >90
- SEO: >90
Environment Testing
Test in different environments:Development
.env.local with development API keys.
Production Build
Preview Deployment
Create PR to test on Vercel preview deployment:- Automatic preview URL
- Production-like environment
- Isolated from main deployment
Writing Verification Steps
When submitting PRs, include verification steps in the description:Example PR Template
- Create new video project
- Upload 3+ images
- Select “Luxury Estate” style
- Configure “Fade” transitions
- Generate video
- Verify transitions are smooth
- Download and play final video
Screenshots
[Add screenshots/screen recordings for UI changes]Database Changes
- Schema changes require migration
- Added new environment variables
Checklist
- Ran
pnpm lint - Tested locally
- Updated documentation (if needed)