- TypeScript 96.4%
- CSS 2.7%
- Dockerfile 0.8%
| .forgejo/workflows | ||
| app | ||
| components | ||
| lib | ||
| prisma | ||
| public | ||
| scripts | ||
| .env.example | ||
| .gitignore | ||
| components.json | ||
| compose.prod.yml | ||
| docker-compose.yml | ||
| docker-entrypoint.sh | ||
| Dockerfile | ||
| next-env.d.ts | ||
| next.config.ts | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.mjs | ||
| prisma.config.ts | ||
| README.md | ||
| tsconfig.json | ||
| tsconfig.tsbuildinfo | ||
Smart Home Automations
Fullstack Next.js app for storing and searching smart home automations shown in YouTube videos.
Stack
- Next.js 16 (App Router, TypeScript)
- Prisma ORM 7
- PostgreSQL
- Tailwind CSS
- Server Actions
- Docker + Docker Compose
Setup
-
Copy the environment template:
cp .env.example .env -
Start everything:
docker compose up --build -
Open the app:
Database Migration
Initial migration is included in prisma/migrations.
The app container runs prisma migrate deploy on startup.
Seed Data
After the stack is up, seed sample records:
docker compose exec app npm run prisma:seed
YouTube Playlist Sync
The sync job pulls every video from a YouTube playlist, fetches its transcript, and stores it as a ProcessedVideo row. Automations are not extracted automatically while testing — instead, the admin UI offers a copy button so you can paste the prompt + transcript into your own ChatGPT account and add the resulting automations manually.
Set these variables in .env:
YOUTUBE_API_KEY=
YOUTUBE_PLAYLIST_ID=
Run the importer manually:
node scripts/syncPlaylist.ts
Run it through Docker Compose:
docker compose run --rm sync
Then open the admin area and head to Transcripts (/admin/transcripts) to copy the prompt + transcript into ChatGPT. Use Mark as processed to keep the queue clean once you have entered the resulting automations.