Skip to content

harshwardhan-kp/PolyLens

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

24 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ”ฎ 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

About

This Project is our submission for the event organised by the gdg club Ait Pune

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors