Help people learn faster and more efficiently to reach their learning goal. LearnAnything's mission is to facilitate the consolidation of the world's knowledge sharing by creating a place where users can share their learning experiences and knowledge with others.
Why did we build LearnAnything? You might ask. Well, we want you to think of LearnAnything as more than just a learning path generator, but as an entry point for YOU to begin your learning journey on any topic that you could possibly imagine. Just as Mahatma Gandhi once said, "Live as if you were to die tomorrow. Learn as if you were to live forever."
- Backend
cd serveruv sync- Set
OPENAI_API_KEYin your shell or.env - Optional: set
CORS_ORIGINS=http://localhost:3000(comma-separated list supported) - Optional: set
CACHE_BACKEND=firestoreto enable learning path caching (default:noop— no caching) - Optional: set
SHARE_BACKEND=firestoreto enable immutable unlisted share links. Identical snapshots reuse the same content-addressed URL (default:noop— sharing disabled) - Start API:
uv run uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
- Frontend
cd clientnpm installnpm run dev- App runs at
http://localhost:3000
- API base URL config
client/.env.developmentdefaults toVITE_API_BASE_URL=http://localhost:8000- Local FE+BE flow should call
http://localhost:8000/v1/lp/{term}
- The browser never calls Cloud Run directly.
client/.env.productionsetsVITE_API_BASE_URL=/api(browser → Vercel serverless proxy inclient/api/). - In Vercel Project Settings, set
BACKEND_BASE_URL=https://<cloud-run-url>andBACKEND_API_KEY=<backend API_KEY>(server-only; the proxy addsX-API-Key). - See
DEPLOY.mdfor the full setup.
- Run from repo root:
docker compose up --build - Frontend served on
http://localhost:3000 - Backend served on
http://localhost:8000
- Cloud Build triggers deploy automatically when
server/**changes:dev→lp-backend-staging,main→lp-backend-prod(server/cloudbuild.yaml). SeeDEPLOY.mdfor env vars and rollback. - The container serves FastAPI with:
uvicorn app.main:app --host 0.0.0.0 --port $PORT
- Health check endpoint:
GET /health
The client includes per-route SEO optimizations so search engines and AI crawlers can discover and cite the site:
- Per-route
<head>tags — each page sets its own<title>,<meta description>, canonical URL, OpenGraph, and Twitter Card tags via a sharedSeocomponent (client/src/seo/Seo.jsx). Uses React 19 native<head>hoisting (no extra library). - JSON-LD structured data — Home page emits
WebSite,WebApplication, andOrganizationschemas (with aSearchAction). About page emitsAboutPage,Person,Organization, andBreadcrumbList. - Crawl files —
robots.txt(allows search + AI search bots, blocks training-only crawlers) andllms.txtare served fromclient/public/;sitemap.xmlis generated intodist/at build time from the indexable prerendered routes. - Pre-rendered SEO —
npm run buildruns a post-build script (client/scripts/prerender-seo.mjs) that writes static HTML with<title>, meta tags, JSON-LD and readable body content for/,/about,/topicsand the 24 reviewed/learn/*pages, plus noindex shells for/feedback,/learningpathand/share, so bots that don't execute JS still see the critical signals. - noindex on generator —
/learningpath?term=...is markednoindex,followto prevent infinite indexable URLs. - Site constants —
SITE_URL,SITE_NAME, etc. are centralized inclient/src/config/site.js(readsVITE_SITE_URLwith a prod fallback).
- GPT model output comparison tool
- OpenAI Best Practices for Prompt Engineering
- OpenAI documentation - model details
- OpenAI example prompts and use cases
- OpenAI Production Best Practice
- FE Utilities
- WebGradient Templates
- ShareGPT - Design reference
- Similar ideas
- Miscellaneous