Development guide for Next Frames - a Next.js 15 slideshow management app with Supabase backend. Includes architecture patterns, dev commands, and server actions workflow.
This skill provides guidance when working with the Next Frames codebase - a Next.js 15 application with React 19 for image slideshow management using Supabase.
When working with this project, use these npm scripts:
Next Frames uses Next.js 15 App Router with React 19 and Supabase as the backend.
The application has three main routes:
1. `/login` - Supabase authentication page
2. `/dashboard` - Protected image management interface (requires authentication)
3. `/slideshow` - Public slideshow display with auto-refresh every 5 minutes
Located in `components/`:
All database operations use Next.js Server Actions located in `app/actions/`:
**Important:** Always use server actions for database operations. Never call Supabase directly from client components.
1. Images are stored in Supabase storage
2. Image URLs and metadata stored in Supabase database
3. Images have a `position` field for ordering
4. Server actions handle all CRUD operations
5. Context provides reactive state updates to UI
Before starting development, ensure `.env.local` contains:
```
NEXT_PUBLIC_SUPABASE_URL=<your-supabase-url>
NEXT_PUBLIC_SUPABASE_ANON_KEY=<your-anon-key>
```
When making changes:
1. **Authentication changes:** Update middleware.js or Supabase utilities in `utils/supabase/`
2. **New database operations:** Create new server action in `app/actions/`
3. **UI changes:** Update components in `components/`
4. **Route additions:** Add to `app/` directory following App Router conventions
5. **State management:** Extend `ImagesContext` as needed
1. Create new file in `app/actions/`
2. Mark with `'use server'` directive
3. Import Supabase server client from `utils/supabase/server.js`
4. Handle errors appropriately
5. Return data in consistent format
1. Add route to `app/` directory
2. Middleware automatically protects routes based on patterns in `middleware.js`
3. Use `createClient()` from server utils to access authenticated user
Before committing changes:
Leave a review
No reviews yet. Be the first to review this skill!
# Download SKILL.md from killerskills.ai/api/skills/next-frames-development-guide/raw