A Next.js application for monitoring topics across the web and receiving notifications about relevant events.
# Start the application (migrations run automatically!)
docker compose up -d
# Access the app
open http://localhost:3000That's it! Database migrations and seeding happen automatically on startup.
When you edit prisma/schema.prisma:
./migrate.sh your_migration_nameExample:
# Edit prisma/schema.prisma to add a field
./migrate.sh add_description_fieldSee QUICK_START.md for detailed workflows and MIGRATION_SETUP.md for technical details
- Node.js 18+
- PostgreSQL database running locally
-
Install dependencies
npm install
-
Setup database
npm run db:migrate npm run db:seed
-
Start development server
npm run dev
The application uses three main tables:
- Topics: User-defined monitoring topics (
id,title,prompt) - Events: Detected events for topics (
id,title,summary,event_url,topic_id) - Sources: Monitoring sources for topics (
id,source_url,type,topic_id)
GET /api/topics- List all topicsPOST /api/topics- Create new topicGET /api/events- Get all recent eventsGET /api/events/[topicId]- Get events for specific topic
# Database operations
npm run db:migrate # Run database migrations
npm run db:generate # Generate Prisma client
npm run db:seed # Seed database with sample data
npm run db:studio # Open Prisma Studio
# Application
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLint# Start development environment
docker compose up --build
# View logs
docker compose logs -f app
# Access app container
docker compose exec app sh
# Stop services
docker compose down