CogniZap is an intelligent learning platform that generates flashcards and quizzes from trending topics, current events, and real-time data using AI.
- 🧠 AI-Powered Content Generation - Create flashcards and quizzes using advanced AI
- 📈 Real-Time Trending Topics - Stay updated with current events and trending subjects
- 🔬 Research Assistant - Multi-perspective analysis with academic and industry insights
- 📊 Live Data Learning - Real-time market data, weather, sports, and economic insights
- 🌍 Global Events Tracker - Worldwide events with educational context
- 🔬 Science Breakthrough Monitor - Latest research findings and discoveries
- 🏆 Learning Competitions - Competitive learning with leaderboards
- Node.js 18+ and npm
- Perplexity API key (for AI-powered content generation)
-
Clone the repository
git clone <repository-url> cd CogniZap
-
Install dependencies
npm install
-
Environment Configuration
Create a
.envfile in the project root:# Perplexity API Configuration PERPLEXITY_API_KEY=your_actual_api_key_here # Application Configuration PUBLIC_APP_NAME=CogniZap PUBLIC_APP_VERSION=1.0.0
Getting a Perplexity API Key:
- Visit Perplexity AI API
- Sign up for an account
- Generate an API key from your dashboard
- Replace
your_actual_api_key_herewith your actual key
-
Start the development server
npm run dev
-
Open your browser
Navigate to
http://localhost:5173
If you don't have a Perplexity API key yet, the application will automatically fall back to demo content for testing purposes.
npm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm run check- Run TypeScript checksnpm run lint- Lint codenpm run format- Format code with Prettier
- Frontend: SvelteKit with Svelte 5
- Styling: Tailwind CSS
- Language: TypeScript
- AI Integration: Perplexity Sonar API
- Icons: Lucide Svelte
- Deployment: Vercel (configured)
src/
├── lib/
│ ├── components/
│ │ ├── ui/ # Reusable UI components
│ │ └── ... # Feature-specific components
│ ├── stores/ # Svelte stores for state management
│ ├── types.ts # TypeScript type definitions
│ └── utils.ts # Utility functions
├── routes/
│ ├── api/ # API endpoints
│ ├── auth/ # Authentication pages
│ ├── dashboard/ # Dashboard and specialized tools
│ └── ... # Other pages
└── app.html # HTML template
- Upload PDFs or PowerPoint files for content extraction
- Generate flashcards or quiz questions
- Adjustable difficulty levels and content count
- Real-time fact-checking and source citations
- Trending Topics: Real-time trending content generation
- Research Assistant: Multi-perspective analysis
- Live Data Learning: Real-time data integration
- Global Events: Worldwide events tracking
- Science Tracker: Latest research findings
- Learning Competitions: Gamified learning experiences
- Simple email/password authentication
- Demo mode for testing
- Persistent user sessions
POST /api/generate- Generate flashcards or quiz contentPOST /api/upload- Handle file uploads (PDF/PowerPoint)GET /api/trending- Fetch trending topicsGET /api/global-events- Get global events dataGET /api/research-assistant- Research analysis endpoint- And more specialized endpoints for each tool
- 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.
If you encounter any issues or have questions:
- Check the demo mode works without API keys
- Verify your Perplexity API key is valid
- Ensure all dependencies are installed correctly
- Check the browser console for any error messages
For additional support, please open an issue in the repository.