Welcome to Three-Sided - a comprehensive flashcard system with dual frontend architecture and AI-powered learning.
Three-Sided operates with two complete systems that share the same Firebase backend:
| System | URL | Technology | Status | Use Case |
|---|---|---|---|---|
| Original | / |
Vanilla JS | β Production | Stable, proven |
| React | /new/ |
React + Vite | β Production | Modern, enhanced |
π Key Principle: 100% backwards compatibility - both systems work together seamlessly.
- Try the React version: Visit
/new/for modern UI and AI features - Use the original: Visit
/for the proven, stable interface - Mix and match: Create profiles/cards with either system
- π System Architecture: Read SYSTEM_ARCHITECTURE.md
- βοΈ React Development: Read src/README.md
- π§ Deploy:
firebase deploy
Complete technical documentation covering:
- Card creation systems (old vs React)
- Profile systems and compatibility
- Search & discovery mechanics
- Data flow diagrams
- Troubleshooting guides
βοΈ src/README.md
React-specific documentation:
- Component architecture
- Development guidelines
- Backwards compatibility rules
- Build and deployment
- π Google Authentication - Shared user accounts
- π Flashcard Creation - Mathematical content with LaTeX
- π Search & Discovery - Community flashcard browsing
- π€ User Profiles - Public profile pages with cards
- πΎ Same Backend - Shared Firebase collections
- π€ AI Integration - DeepSeek-powered hints and suggestions
- π¨ Modern UI - Responsive design with smooth animations
- β‘ Better Performance - Optimized loading and interactions
- π± Enhanced UX - Improved navigation and user flow
Both systems are fully compatible:
graph TD
A[User] --> B{Choose System}
B -->|Original /| C[Vanilla JS Interface]
B -->|React /new/| D[React Interface]
C --> E[Shared Firebase Backend]
D --> E
E --> F[Same Data & URLs]
F --> G[/card/slug URLs work]
F --> H[/profile/slug URLs work]
Examples:
- Create profile with original system β Cards work in React system β
- Create cards with React system β Visible on original profile page β
- Same URLs work:
/card/my-card-slugand/profile/my-usernameβ
π Firebase Collections
βββ π publicCards/ # Public flashcards (both systems)
βββ π profiles/ # User profiles (both systems)
βββ π userToSlug/ # Profile slug mapping (both systems)
βββ π flashcards/ # Private cards (original system)
βββ π cards/ # Private cards (React system)
βββ π userUpvotes/ # Upvote tracking (both systems)
βββ π automation*/ # Bot automation (admin only)
# React development
cd src
npm install
npm run dev
# Original system (no build needed)
firebase serve# Build React version
cd src && npm run build
# Deploy everything
firebase deploythree-sided/
βββ π SYSTEM_ARCHITECTURE.md # Complete system documentation
βββ π public/ # Original system + built React
β βββ π index.html # Original flashcard creation
β βββ π search.html # Original search system
β βββ π card/ # Shared card viewer
β βββ π profile/ # Shared profile pages
β βββ π new/ # Built React application
βββ π src/ # React source code
β βββ βοΈ README.md # React-specific docs
β βββ π components/ # React components
β βββ π services/ # Business logic
βββ π functions/ # Cloud Functions
βββ π firestore.rules # Database security
βββ βοΈ firebase.json # Hosting configuration
- New features must work with old system
- Old URLs must continue working
- Same data schema across systems
- Gradual migration, not replacement
- Original system: Stable foundation
- React system: Enhanced experience
- Users choose based on preference
- Both maintained and improved
- DeepSeek integration for smart suggestions
- Automated content generation
- Enhanced learning experience
- Fallback to manual when AI unavailable
- System overview: This file
- Technical details: SYSTEM_ARCHITECTURE.md
- React development: src/README.md
- Profile cards not showing: Check SYSTEM_ARCHITECTURE.md#troubleshooting
- Card URLs 404: Ensure document ID matches slug
- Permission errors: Check updated Firestore rules
// Check profile exists
const userSlug = await db.collection('userToSlug').doc(userId).get();
// Check cards by user
const userCards = await db.collection('publicCards').where('userId', '==', userId).get();
// Check card by slug
const card = await db.collection('publicCards').doc(slug).get();π― Mission: Provide the best flashcard learning experience through dual-system architecture with seamless compatibility and AI enhancement.
π Status: Production ready with both systems fully operational and compatible!