Skip to content

Latest commit

 

History

History
250 lines (167 loc) · 8.52 KB

File metadata and controls

250 lines (167 loc) · 8.52 KB

🔮 PolyLens

See History Through Every Perspective

Next.js TypeScript Groq Vercel

License PRs Welcome Maintenance


A multi-perspective historical narrative platform that presents historical events through the lens of different countries, communities, religions, ideologies, and academic viewpoints — all side by side.

View Demo · Report Bug · Request Feature



✨ Features

🎭 Multi-Perspective Analysis

Get 5+ unique perspectives on any historical event — from different countries, communities, religions, and academic schools of thought.

🌓 Theme Support

Beautiful light and dark modes with system preference detection for comfortable viewing.

⚡ Real-time Streaming

Powered by Groq's ultra-fast inference delivering responses at ~500 tokens/second.

🎨 Modern UI/UX

Clean, ChatGPT-inspired interface with horizontal card carousel for easy comparison.

📱 Fully Responsive

Seamless experience across desktop, tablet, and mobile devices.

🔒 Source-Backed

Every perspective includes academic sources and bias acknowledgments for transparency.


🖼️ Screenshots

Light Theme Dark Theme
Light Theme Dark Theme

🛠️ Tech Stack

Core Technologies

Next.js React TypeScript CSS3

AI & APIs

Groq Vercel AI SDK

Deployment & Infrastructure

Vercel Git GitHub


🚀 Getting Started

Prerequisites

Installation

# Clone the repository
git clone https://github.com/harshwardhan-kp/PolyLens.git

# Navigate to project directory
cd PolyLens

# Install dependencies
npm install

# Create environment file
echo "GROQ_API_KEY=your_groq_api_key_here" > .env.local

# Start development server
npm run dev

Open http://localhost:3000 in your browser 🎉


📁 Project Structure

PolyLens/
├── 📂 app/
│   ├── 📂 api/
│   │   └── 📂 chat/
│   │       └── 📄 route.ts      # Groq API endpoint
│   ├── 📄 page.tsx              # Main chat interface
│   ├── 📄 page.module.css       # Component styles
│   ├── 📄 layout.tsx            # Root layout
│   └── 📄 globals.css           # Design system
├── 📂 lib/
│   └── 📄 prompts.ts            # AI prompts & types
├── 📄 .env.local                # Environment variables
├── 📄 package.json
└── 📄 README.md

🔮 Future Roadmap

Phase 2: Enhanced Data Layer

PostgreSQL Prisma Redis Firebase

Phase 3: Authentication & Users

NextAuth.js Google JWT

Phase 4: Infrastructure & Scale

Docker Kubernetes AWS Google Cloud

Phase 5: Advanced Features

OpenAI Elasticsearch GraphQL Stripe


Planned Features

Feature Description Status
💾 Save Conversations Persist chat history to database 🔜 Planned
👤 User Accounts Authentication with Google/GitHub 🔜 Planned
📊 Analytics Dashboard Track popular queries and perspectives 🔜 Planned
🌍 Multi-language Support for 10+ languages 🔜 Planned
📱 Mobile App Native iOS/Android with React Native 🔜 Planned
🎯 Custom Perspectives User-defined viewpoint categories 🔜 Planned
📚 Source Links Direct links to academic papers 🔜 Planned
🤖 Multiple LLMs Switch between GPT-4, Claude, Gemini 🔜 Planned

🤝 Contributing

Contributions are what make the open source community amazing! Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📄 License

Distributed under the MIT License. See LICENSE for more information.


👨‍💻 Author

Harshwardhan KP

GitHub LinkedIn Twitter



⭐ Star this repo if you find it useful!

Made with ❤️ for the GDG Community


Visitors