A comprehensive web application that demonstrates AI-aided software development, technical capabilities, and modern web development practices. Originally started as a toy project to test AI vibe coding capabilities, it has evolved into a full-featured application showcasing the complete software development lifecycle.
🌐 Live Demo: useless-app-nu.vercel.app
This project began as a simple toy application to test AI vibe coding capabilities, but has grown into a comprehensive demonstration of:
- AI-Aided Development: Complete software development lifecycle using AI vibe coding
- Technical Capabilities: Full-stack development with modern technologies
- Product Design: User experience design and feature planning
- Development Lifecycle: From concept to production deployment
- Tech Stack Integration: Frontend, backend, APIs, databases, and AI services
- Data Processing: Real-time data ingestion and AI-powered content generation
- Random Facts: Generate and rate useless facts with persistent voting
- Real-Time News Facts: AI-powered facts generated from latest news articles
- Smart Topic Selection: Choose from trending topics extracted via NER and TF-IDF
- Interactive Infographics: Data-driven visualizations (burger flipping science)
- Blog System: Simple markdown-based blog for updates
- Named Entity Recognition (NER): Extract topics from news using Google Gemini 2.0
- TF-IDF Scoring: Rank topic relevance and importance
- Intelligent Matching: Match user-selected topics with relevant articles
- Streaming AI Generation: Real-time fact generation with progress indicators
- Dark/Light Mode: Automatic theme switching with system preference detection
- Responsive Design: Mobile-first approach with Tailwind CSS
- Modern UI: Built with shadcn/ui components and Lucide icons
- Performance Optimized: Aggressive caching and efficient data loading
- Next.js 13 (App Router) with React 18
- TypeScript for type safety
- Tailwind CSS for styling
- shadcn/ui for components
- Chart.js for data visualization
- Next.js API Routes for serverless functions
- Turso (libSQL) for cloud database
- Zod for runtime validation
- Google Gemini 2.0 Flash Lite for NER
- RSS Parser for news ingestion
- TF-IDF Algorithm for topic scoring
- Vercel with automatic CI/CD
- Environment-based configuration
This project showcases the complete software development lifecycle using AI vibe coding:
- Feature ideation and user story mapping
- Technical architecture planning
- Database schema design
- API endpoint specification
- React component architecture
- State management and data flow
- Responsive design implementation
- User experience optimization
- API route implementation
- Database integration and queries
- Authentication and security
- Error handling and validation
- Prompt engineering for content generation
- Named Entity Recognition (NER) implementation
- Topic extraction and scoring algorithms
- Real-time AI content generation
- RSS feed ingestion and parsing
- News article processing
- Topic extraction and ranking
- Content generation workflows
- Unit and integration testing
- API endpoint testing
- User interface testing
- Performance optimization
- Environment configuration
- CI/CD pipeline setup
- Security implementation
- Production monitoring
This project demonstrates proficiency in various technical domains:
- Modern React patterns and hooks
- Next.js App Router and server components
- TypeScript for type safety
- Tailwind CSS for responsive design
- Component library integration (shadcn/ui)
- Next.js API routes and serverless functions
- RESTful API design and implementation
- Database integration and ORM patterns
- Authentication and authorization
- Error handling and validation
- SQL database design and optimization
- Cloud database integration (Turso)
- Data migration and seeding
- Query optimization and indexing
- Data validation and sanitization
- Large Language Model integration (Gemini)
- Prompt engineering and optimization
- Named Entity Recognition (NER)
- TF-IDF algorithm implementation
- Real-time AI content generation
- RSS feed parsing and ingestion
- Text processing and normalization
- Topic extraction and scoring
- Content aggregation and ranking
- Automated data pipelines
- Environment configuration management
- CI/CD pipeline setup
- Security best practices
- Performance monitoring
- Production deployment strategies
This project demonstrates the power of AI vibe coding throughout the entire development process:
- Planning: AI-assisted feature ideation and technical architecture
- Design: User experience design and interface prototyping
- Implementation: Code generation, debugging, and optimization
- Testing: Automated testing and quality assurance
- Deployment: CI/CD setup and production monitoring
- Rapid Prototyping: Quick iteration and feature development
- Code Quality: Consistent patterns and best practices
- Problem Solving: AI-assisted debugging and optimization
- Learning: Real-time education and skill development
- Productivity: Faster development cycles and reduced time-to-market
- Prompt Engineering: Optimized AI prompts for content generation
- Data Processing: Automated topic extraction and scoring
- Real-time Generation: Live AI content creation from news sources
- User Experience: Seamless integration of AI capabilities
- Node.js 22.x or later
- npm or yarn
- Turso database account
- Google Gemini API key
-
Clone the repository
git clone https://github.com/werther41/useless-app.git cd useless-facts-app -
Install dependencies
npm install
-
Environment Setup
Create a
.env.localfile:# Database TURSO_DATABASE_URL=libsql://your-database.turso.io TURSO_AUTH_TOKEN=your-turso-token # AI Services GOOGLE_API_KEY=your-gemini-api-key # Security (for admin features) ADMIN_SECRET=your-secure-admin-secret CRON_SECRET=your-cron-secret
-
Initialize Database
# Seed with initial data (requires admin authentication) curl -X POST "http://localhost:3000/api/seed" \ -H "Authorization: Bearer YOUR_ADMIN_SECRET"
-
Start Development Server
npm run dev
Visit http://localhost:3000
├── app/ # Next.js App Router
│ ├── api/ # API routes
│ │ ├── facts/ # Fact management endpoints
│ │ ├── topics/ # Topic extraction endpoints
│ │ └── cron/ # Scheduled tasks
│ ├── admin/ # Admin interfaces (protected)
│ ├── deep-dive/ # Infographic pages
│ └── blog/ # Blog system
├── components/ # React components
│ └── ui/ # shadcn/ui base components
├── lib/ # Utilities and business logic
├── types/ # TypeScript definitions
├── content/ # Markdown content
└── public/ # Static assets
| Variable | Description | Required |
|---|---|---|
TURSO_DATABASE_URL |
Turso database connection string | ✅ |
TURSO_AUTH_TOKEN |
Turso authentication token | ✅ |
GOOGLE_API_KEY |
Google Gemini API key for AI features | ✅ |
ADMIN_SECRET |
Secret for admin authentication | ✅ |
CRON_SECRET |
Secret for cron job endpoints | ✅ |
Admin features are protected by authentication. To access:
-
Admin Pages: Add
?admin_secret=YOUR_SECRETto URLs/admin/import?admin_secret=YOUR_SECRET/admin/topics?admin_secret=YOUR_SECRET
-
API Endpoints: Include
Authorization: Bearer YOUR_SECRETheadercurl -X POST "http://localhost:3000/api/seed" \ -H "Authorization: Bearer YOUR_ADMIN_SECRET"
| Endpoint | Method | Description |
|---|---|---|
/api/facts/random |
GET | Get a random fact |
/api/facts |
GET | Get facts with pagination |
/api/facts/{id}/rate |
POST | Rate a fact |
/api/topics |
GET | Get trending topics |
/api/facts/real-time |
POST | Generate AI fact from news |
| Endpoint | Method | Description |
|---|---|---|
/api/seed |
POST | Seed database |
/api/facts/import |
POST | Bulk import facts |
/api/test-db |
GET | Test database connection |
# Get a random fact
curl http://localhost:3000/api/facts/random
# Get trending topics
curl http://localhost:3000/api/topics?limit=10
# Generate AI fact with topics
curl -X POST http://localhost:3000/api/facts/real-time \
-H "Content-Type: application/json" \
-d '{"selectedTopics": ["AI", "Technology"]}'-
Connect Repository
- Link your GitHub repository to Vercel
- Enable automatic deployments
-
Environment Variables
- Add all required environment variables in Vercel dashboard
- Ensure
ADMIN_SECRETandCRON_SECRETare set
-
Database Setup
- Create a Turso database
- Add connection details to environment variables
# Build the application
npm run build
# Start production server
npm run start# Run all tests
./scripts/test-all.sh
# Test specific features
npx tsx scripts/test-topic-extraction.ts
# Lint and type check
npm run lint
npm run typecheck- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Next.js
- UI components from shadcn/ui
- Database powered by Turso
- AI features powered by Google Gemini
- Icons by Lucide
If you have questions or need help:
- Check the documentation
- Open an issue
- Review the API documentation
This project demonstrates the evolution from a simple toy application to a comprehensive showcase of:
- AI-Aided Development: Complete software lifecycle using AI vibe coding
- Technical Proficiency: Full-stack development with modern technologies
- Product Development: From concept to production deployment
- Learning & Growth: Continuous improvement and feature enhancement
- Real-World Application: Practical implementation of cutting-edge technologies
Note: This is a demonstration application showcasing AI-aided development capabilities. For production use, implement proper authentication, rate limiting, and security measures.