facilguide
v1.0.0
Published
Guide catalog and utilities for Facil Guide - simple tech guides for seniors
Maintainers
Readme
facilguide
Guide catalog and utilities for Facil Guide, a site that provides simple tech guides for seniors.
Includes guide catalog data, category taxonomy, multilingual URL routing, readability scoring, and accessibility helpers designed for senior-friendly content.
Installation
npm install facilguideUsage
Guide Catalog
const facil = require("facilguide");
// Browse all guides
facil.GUIDES.forEach(g => console.log(g.slug, g.difficulty));
// Find a specific guide
const guide = facil.findGuide("how-to-make-a-video-call");
// => { slug: "how-to-make-a-video-call", category: "communication", difficulty: "beginner", languages: ["en", "es", "fr", "pt", "it"], steps: 8 }
// Filter by category
const smartphoneGuides = facil.guidesByCategory("smartphones");
// => 7 guides
// Filter by language
const spanishGuides = facil.guidesByLanguage("es");
// => 18 guides available in Spanish
// Filter by difficulty
const beginnerGuides = facil.guidesByDifficulty("beginner");
// => 16 beginner guidesCategories
// All 10 categories
facil.CATEGORIES.forEach(c => console.log(c.slug, c.icon));
// Get localized label
facil.categoryLabel("smartphones", "es"); // "Telefonos"
facil.categoryLabel("security", "fr"); // "Securite en Ligne"
// Difficulty labels
facil.difficultyLabel("beginner", "it"); // "Principiante"Language Support
// 5 supported languages
facil.LANGUAGE_CODES; // ["en", "es", "fr", "pt", "it"]
// Check language support
facil.isLanguageSupported("es"); // true
facil.isLanguageSupported("de"); // false
// Language info
facil.getLanguage("fr");
// => { code: "fr", name: "French", nativeName: "Francais", dir: "ltr" }
// Detect language from URL path
facil.detectLanguage("/es/guides/video-call"); // "es"
facil.detectLanguage("/guides/video-call"); // "en"
// Build localized paths
facil.localizedPath("/guides/video-call", "es"); // "/es/guides/video-call"
facil.localizedPath("/guides/video-call", "en"); // "/guides/video-call"
// Generate hreflang links for SEO
facil.hreflangLinks("/guides/video-call", ["en", "es", "fr"], "https://facil.guide");
// => [
// { lang: "en", href: "https://facil.guide/guides/video-call" },
// { lang: "es", href: "https://facil.guide/es/guides/video-call" },
// { lang: "fr", href: "https://facil.guide/fr/guides/video-call" },
// { lang: "x-default", href: "https://facil.guide/guides/video-call" }
// ]Readability and Accessibility
// Flesch reading ease score (aim for 70+ for seniors)
facil.readingEase("The cat sat on the mat."); // high score (easy)
// Full readability check
facil.checkReadability("Your comprehensive text here...", 70);
// => { pass: true, score: 78, recommendation: "Text is accessible for seniors." }
// Estimate guide completion time (senior-adjusted)
facil.estimateCompletionTime(500, 8); // 500 words, 8 steps
// => 20 minutes (4 min reading at 150 WPM + 16 min for steps)Data
10 Categories
Smartphones, Tablets, Computers, Internet, Social Media, Smart Home, Health Tech, Online Safety, Entertainment, Communication.
20 Sample Guides
Covering video calls, iPhone setup, WhatsApp, email, passwords, Netflix, Google Maps, WiFi, Alexa, fitness trackers, photo management, scam recognition, Zoom, Android setup, Facebook, printing, Siri, copy/paste, photo backup, and telehealth.
5 Languages
English, Spanish, French, Portuguese, Italian.
API Reference
Data Constants
LANGUAGES- Supported language definitions.LANGUAGE_CODES- Array of language codes.CATEGORIES- All guide categories with multilingual labels.GUIDES- Sample guide catalog.DIFFICULTY_LEVELS- Difficulty definitions with multilingual labels.
Language
isLanguageSupported(code)- Check if a language is supported.getLanguage(code)- Get language metadata.detectLanguage(path)- Extract language from URL path.localizedPath(path, lang?)- Build a localized URL path.hreflangLinks(basePath, languages, baseUrl?)- Generate hreflang link objects.
Catalog
findGuide(slug)- Find a guide by slug.findCategory(slug)- Find a category by slug.guidesByCategory(slug)- Filter guides by category.guidesByLanguage(lang)- Filter guides by available language.guidesByDifficulty(difficulty)- Filter guides by difficulty.categoryLabel(slug, lang?)- Get localized category label.difficultyLabel(difficulty, lang?)- Get localized difficulty label.
Readability
readingEase(text)- Flesch reading ease score (0 to 100).checkReadability(text, threshold?)- Check if text meets readability target.estimateCompletionTime(wordCount, steps, minutesPerStep?)- Estimate guide completion time for seniors.
TypeScript
Type definitions are included.
import { findGuide, Guide, Category, HreflangLink } from "facilguide";Links
License
MIT. See LICENSE for details.
