Kitengeneza Kadi za Kujifunza

Create professional digital flashcards with AI assistance. Features spaced repetition, multiple study modes, multimedia support, and export to popular platforms like Anki and Quizlet.

Tengeneza Kadi Mpya

Weka maudhui mbele na nyuma kutengeneza kadi yako

Bofya hapa kuona muonekano wa kadi yako
Weka maudhui hapo juu kuona upande wa nyuma
πŸ”„
Kadi za Kujifunza
Kujifunza kwa kadi za kugeuza
🧠
Kurudia kwa Nafasi
Mapitio yaliyoboreshwa kisayansi
❓
Hali ya Jaribio
Maswali ya kuchagua
🎯
Mchezo wa Kulinganisha
Linganisha maneno na maana
Kadi Zangu
0 cards 0 studied today
πŸ“š No flashcards created yet. Go to "Create Cards" to get started!
0 Jumla ya Kadi
0 Study Streak (days)
0 Kadi Zilizofaulu
0% Kiwango cha Usahihi

πŸ“€ Export Your Flashcards

Export your flashcards to popular study platforms or download for offline use.

🎴
Anki
Muundo wa APKG
πŸ“š
Quizlet
Muundo wa CSV
πŸ“Š
Faili la CSV
Jedwali
πŸ’Ύ
JSON
Muundo wa hifadhi
πŸ–¨οΈ
Chapisha PDF
Kadi halisi
🌐
Shiriki Mtandaoni
Kiungo cha umma
Supports CSV, JSON, TXT, and APKG files from Anki, Quizlet, and other platforms

πŸ“š Planning Educational Travel or Study Abroad?

Boresha ujifunzaji wako na uzoefu wa kimataifa na safari za kielimu

✨ Smart Nation's Core Infrastructure: WIA Code ✨

DroneΒ·Robot delivery, autonomous driving, emergency rescue and more - Experience the future in 30 days, completely free for your nation!

Jifunze Zaidi Kuhusu Msimbo wa WIA

πŸ€– Chagua Msaidizi wako wa AI

πŸ’¬ ChatGPT
Most versatile β€’ Best for content generation
🧠 Claude
Best reasoning β€’ Perfect for study strategies
✨ Gemini BURE
Free daily limits β€’ Built-in chat
`); printWindow.document.close(); printWindow.print(); showNotification('Print preview opened', 'success'); } // Share online function shareOnline() { const shareData = { title: 'Kadi Zangu', text: `Check out my ${flashcards.length} flashcards created with WIA Code Flash Card Maker!`, url: window.location.href }; if (navigator.share) { navigator.share(shareData); } else { const text = `${shareData.text}\n\n${shareData.url}`; copyToClipboard(text); showNotification('Share link copied to clipboard!', 'success'); } } // Handle import function handleImport() { const file = document.getElementById('importFile').files[0]; if (!file) return; const reader = new FileReader(); reader.onload = function(e) { try { const content = e.target.result; let importedCards = []; if (file.name.endsWith('.json')) { importedCards = JSON.parse(content); } else if (file.name.endsWith('.csv')) { importedCards = parseCSV(content); } else if (file.name.endsWith('.txt')) { importedCards = parseTXT(content); } if (importedCards.length > 0) { flashcards = flashcards.concat(importedCards); saveData(); updateDeckDisplay(); updateStats(); showNotification(`Imported ${importedCards.length} flashcards!`, 'success'); } else { showNotification('No valid flashcards found in file', 'error'); } } catch (error) { showNotification('Error importing file: ' + error.message, 'error'); } }; reader.readAsText(file); } // Parse CSV import function parseCSV(content) { const lines = content.split('\n').filter(line => line.trim()); const cards = []; for (let i = 1; i < lines.length; i++) { // Skip header const parts = lines[i].split(','); if (parts.length >= 2) { cards.push({ id: Date.now().toString() + i, front: parts[0].replace(/"/g, '').trim(), back: parts[1].replace(/"/g, '').trim(), tags: parts[2] ? parts[2].replace(/"/g, '').split(';').map(t => t.trim()) : [], created: new Date().toISOString(), interval: 0, easiness: 2.5, repetitions: 0, nextReview: new Date().toISOString() }); } } return cards; } // Parse TXT import (tab-separated) function parseTXT(content) { const lines = content.split('\n').filter(line => line.trim()); const cards = []; lines.forEach((line, i) => { const parts = line.split('\t'); if (parts.length >= 2) { cards.push({ id: Date.now().toString() + i, front: parts[0].trim(), back: parts[1].trim(), tags: parts[2] ? parts[2].split(' ').filter(t => t.trim()) : [], created: new Date().toISOString(), interval: 0, easiness: 2.5, repetitions: 0, nextReview: new Date().toISOString() }); } }); return cards; } // ========== UTILITY FUNCTIONS ========== // Download file function downloadFile(content, filename, mimeType) { const blob = new Blob([content], { type: mimeType }); const url = URL.createObjectURL(blob); const link = document.createElement('a'); link.href = url; link.download = filename; document.body.appendChild(link); link.click(); document.body.removeChild(link); URL.revokeObjectURL(url); } // Save data to localStorage function saveData() { localStorage.setItem('flashcards', JSON.stringify(flashcards)); localStorage.setItem('studyStats', JSON.stringify(studyStats)); } // Copy to clipboard function copyToClipboard(text) { navigator.clipboard.writeText(text).then(() => { showNotification('Copied to clipboard!', 'success'); }).catch(() => { // Fallback for older browsers const textArea = document.createElement('textarea'); textArea.value = text; document.body.appendChild(textArea); textArea.select(); document.execCommand('copy'); document.body.removeChild(textArea); showNotification('Copied to clipboard!', 'success'); }); } // Show notification toast function showNotification(message, type = 'success') { const toast = document.createElement('div'); toast.className = `toast ${type}`; toast.textContent = message; document.body.appendChild(toast); setTimeout(() => { toast.remove(); }, 3000); return toast; } // Show OTA section function showOTA() { const otaContainer = document.getElementById('otaContainer'); if (otaContainer && (otaContainer.style.display === 'none' || !otaContainer.style.display)) { otaContainer.style.display = 'block'; setTimeout(() => { const otaHeader = document.querySelector('.ota-header h3'); if (otaHeader) { otaHeader.style.animation = 'pulse 1s ease-in-out'; } }, 100); } } // Analytics tracking function trackEvent(eventName, data = {}) { if (typeof gtag !== 'undefined') { gtag('event', eventName, { 'event_category': TOOL_CONFIG.category, 'event_label': TOOL_CONFIG.name, ...data }); } } // ========== AI ASSISTANT FUNCTIONS ========== // AI λͺ¨λ‹¬ μ—΄κΈ° function openAIModal() { const modal = document.getElementById('aiModal'); modal.classList.add('show'); if (aiModalState.apiKey && aiModalState.currentView === 'gemini') { showGeminiChat(); } else { showAISelector(); } updateAPIKeyStatus(); } // AI λͺ¨λ‹¬ λ‹«κΈ° function closeAIModal() { const modal = document.getElementById('aiModal'); modal.classList.remove('show'); setTimeout(() => { aiModalState.currentView = 'selector'; showAISelector(); }, 300); } // AI 선택 ν™”λ©΄ ν‘œμ‹œ function showAISelector() { document.getElementById('aiModalTitle').textContent = 'Chagua Msaidizi wako wa AI'; document.getElementById('aiSelector').style.display = 'flex'; document.getElementById('geminiChat').style.display = 'none'; document.getElementById('apiKeySetup').style.display = 'none'; aiModalState.currentView = 'selector'; } // Gemini μ±„νŒ… ν™”λ©΄ ν‘œμ‹œ function showGeminiChat() { document.getElementById('aiModalTitle').innerHTML = '✨ Gemini AI Assistant'; document.getElementById('aiSelector').style.display = 'none'; document.getElementById('geminiChat').style.display = 'flex'; document.getElementById('apiKeySetup').style.display = 'none'; aiModalState.currentView = 'gemini'; const chatMessages = document.getElementById('chatMessages'); if (!chatMessages.innerHTML.trim()) { addMessage('assistant', `Hello! I can help you with: β€’ Creating effective flashcard content β€’ Study techniques and memorization strategies β€’ Spaced repetition optimization β€’ Converting notes into flashcard format β€’ Memory improvement tips What would you like to know about flashcards or studying?`); } } // API ν‚€ μ„€μ • ν™”λ©΄ ν‘œμ‹œ function showAPIKeySetup() { document.getElementById('aiModalTitle').textContent = 'Setup Gemini API'; document.getElementById('aiSelector').style.display = 'none'; document.getElementById('geminiChat').style.display = 'none'; document.getElementById('apiKeySetup').style.display = 'block'; aiModalState.currentView = 'setup'; } // AI 선택 처리 function selectAI(aiType) { const cardCount = flashcards.length; switch(aiType) { case 'chatgpt': let chatContext = `I'm using a Flash Card Maker tool on WIA Code platform. `; if (cardCount > 0) { chatContext += `I have ${cardCount} flashcards created. `; } chatContext += `Can you help me with flashcard creation strategies, study techniques, or memory improvement methods?`; const chatUrl = `https://chat.openai.com/?q=${encodeURIComponent(chatContext)}`; window.open(chatUrl, '_blank'); closeAIModal(); trackEvent('ai_selection', { ai_type: 'chatgpt' }); break; case 'claude': let claudeContext = `I'm using a Flash Card Maker tool. `; if (cardCount > 0) { claudeContext += `I have ${cardCount} flashcards in my deck. `; } claudeContext += `Please help me with effective flashcard design, spaced repetition strategies, or study optimization techniques.`; const claudeUrl = `https://claude.ai/chat?q=${encodeURIComponent(claudeContext)}`; window.open(claudeUrl, '_blank'); closeAIModal(); trackEvent('ai_selection', { ai_type: 'claude' }); break; case 'gemini': if (!aiModalState.apiKey) { showAPIKeySetup(); } else { showGeminiChat(); } trackEvent('ai_selection', { ai_type: 'gemini' }); break; } } // API ν‚€ μ €μž₯ function saveGeminiApiKey() { const apiKey = document.getElementById('geminiApiKeyInput').value.trim(); if (apiKey) { localStorage.setItem('geminiApiKey', apiKey); aiModalState.apiKey = apiKey; showGeminiChat(); updateAPIKeyStatus(); } else { alert('Please enter a valid API key'); } } // API ν‚€ μƒνƒœ μ—…λ°μ΄νŠΈ function updateAPIKeyStatus() { const statusEl = document.getElementById('apiKeyStatus'); if (aiModalState.apiKey) { statusEl.innerHTML = 'Badilisha Ufunguo wa API'; } else { statusEl.textContent = 'No API key set'; } } // μ±„νŒ… λ©”μ‹œμ§€ μΆ”κ°€ function addMessage(type, content) { const chatMessages = document.getElementById('chatMessages'); const messageDiv = document.createElement('div'); messageDiv.className = `message ${type}`; if (type === 'user') { messageDiv.innerHTML = `You: ${content}`; } else { messageDiv.innerHTML = `✨ Gemini:
${content.replace(/\n/g, '
')}`; } chatMessages.appendChild(messageDiv); chatMessages.scrollTop = chatMessages.scrollHeight; } // Gemini에 λ©”μ‹œμ§€ 전솑 async function sendToGemini() { const input = document.getElementById('geminiInput'); const message = input.value.trim(); if (!message) return; addMessage('user', message); input.value = ''; const loadingMsg = document.createElement('div'); loadingMsg.className = 'message assistant'; loadingMsg.innerHTML = '✨ Gemini:
Thinking...'; loadingMsg.id = 'loading-message'; document.getElementById('chatMessages').appendChild(loadingMsg); try { let context = `Context: User is using a Flash Card Maker on WIA Code platform. `; if (flashcards.length > 0) { context += `Current deck has ${flashcards.length} flashcards. `; const recentCard = flashcards[flashcards.length - 1]; context += `Most recent card: "${recentCard.front}" -> "${recentCard.back}". `; } context += `User question: ${message}`; const response = await fetch(`https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=${aiModalState.apiKey}`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ contents: [{ parts: [{ text: context }] }], generationConfig: { temperature: 0.7, maxOutputTokens: 1000 } }) }); const data = await response.json(); document.getElementById('loading-message').remove(); if (data.candidates && data.candidates[0] && data.candidates[0].content) { const reply = data.candidates[0].content.parts[0].text; addMessage('assistant', reply); } else { addMessage('assistant', 'Sorry, I could not generate a response. Please try again.'); } } catch (error) { document.getElementById('loading-message')?.remove(); if (error.message.includes('API key')) { addMessage('error', 'Invalid API key. Please check your API key and try again.'); showAPIKeySetup(); } else { addMessage('error', 'Failed to connect to Gemini. Please check your internet connection and try again.'); } } } // ========== EVENT LISTENERS ========== document.addEventListener('DOMContentLoaded', function() { // Initialize updateStats(); updateDeckDisplay(); updatePreview(); // AI λ²„νŠΌ 이벀트 document.getElementById('aiBtn').addEventListener('click', openAIModal); // λͺ¨λ‹¬ μ™ΈλΆ€ ν΄λ¦­μ‹œ λ‹«κΈ° document.getElementById('aiModal').addEventListener('click', function(e) { if (e.target === this) { closeAIModal(); } }); // ν‚€λ³΄λ“œ 이벀트 document.addEventListener('keydown', function(e) { if (e.key === 'Enter') { const geminiInput = document.getElementById('geminiInput'); if (document.activeElement === geminiInput) { sendToGemini(); } } if (e.key === 'Escape') { closeAIModal(); } // Study mode keyboard shortcuts if (!document.getElementById('studyInterface').classList.contains('hidden')) { if (e.key === ' ') { e.preventDefault(); flipCard('studyCard'); } else if (e.key === 'ArrowRight' || e.key === 'Enter') { e.preventDefault(); nextCard(); } } }); // 초기 API ν‚€ μƒνƒœ μ—…λ°μ΄νŠΈ updateAPIKeyStatus(); updateCurrentYear(); updateToolCount(); }); // Track analytics events document.querySelectorAll('a[href*="wia"]').forEach(link => { link.addEventListener('click', function() { trackEvent('wia_link_click', { link: link.textContent }); }); }); // ========== DYNAMIC TOOL COUNT ========== async function updateToolCount() { try { const fallbackCount = 333; document.querySelectorAll('.dynamic-tools-count').forEach(el => { el.textContent = `${fallbackCount}+ free online tools in 206 languages. No signup, no fees, just tools that work.`; }); document.querySelectorAll('.dynamic-count').forEach(el => { const prefix = el.getAttribute('data-text') || ''; const suffix = el.getAttribute('data-suffix') || ''; const icon = el.textContent.split(' ')[0] || ''; el.textContent = `${icon} ${prefix} ${fallbackCount}+ ${suffix}`; }); } catch (error) { console.log('Tool count API not available'); } } function updateCurrentYear() { const currentYear = new Date().getFullYear(); document.querySelectorAll('.current-year').forEach(el => { el.textContent = currentYear; }); } // ========== ANALYTICS ========== window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-XXXXXXXXX'); trackEvent('page_view', { tool: TOOL_CONFIG.name, category: TOOL_CONFIG.category });