Skip to content

vnmrsharma/ReCDFyi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ’Ώ ReCd(fyi) - Virtual CD Burning Platform

Relive the Y2K era of CD burning and sharing with modern technology

TypeScript React Firebase License

🌐 Live Demo: https://recd-fyi.vercel.app/

What is ReCd?

ReCd is a nostalgic virtual CD burning and sharing platform that recreates the experience of the early 2000s. Create virtual CDs (20 MB each), upload media files with retro burning animations, and share them with friends just like the good old days.

✨ Key Features

  • πŸ’Ώ Virtual CD Burning - Create CDs with authentic Y2K burning animations
  • πŸ€– AI-Powered Metadata - Smart tagging using Google Gemini 2.0 Flash
  • πŸ“§ Easy Sharing - Share via email or links (30-day expiration)
  • 🌐 Public Marketplace - Browse and discover CDs from other creators
  • 🎨 Y2K Aesthetic - Authentic Windows 98/XP retro design
  • πŸ”’ Privacy-First - Private by default, public by choice
  • ⚑ Serverless - Fast, reliable Firebase backend

Quick Start

Prerequisites

  • Node.js 18+ and npm 9+
  • Firebase account (free tier works)
  • Google Gemini API key (optional, for AI features)

Installation

  1. Clone and install

    git clone https://github.com/vnmrsharma/ReCDFyi.git
    cd ReCDFyi
    npm install
  2. Set up Firebase

  3. Configure environment

    cp .env.example .env.local

    Edit .env.local with your credentials:

    # Firebase (Required)
    VITE_FIREBASE_API_KEY=your_firebase_api_key
    VITE_FIREBASE_AUTH_DOMAIN=your-project.firebaseapp.com
    VITE_FIREBASE_PROJECT_ID=your-project-id
    VITE_FIREBASE_STORAGE_BUCKET=your-project.firebasestorage.app
    VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
    VITE_FIREBASE_APP_ID=your_app_id
    
    # EmailJS (Optional - for email sharing)
    VITE_EMAILJS_SERVICE_ID=your_service_id
    VITE_EMAILJS_TEMPLATE_ID=your_template_id
    VITE_EMAILJS_PUBLIC_KEY=your_public_key
    
    # Google Gemini AI (Optional - for smart metadata)
    VITE_GEMINI_API_KEY=your_gemini_api_key
  4. Deploy Firebase rules

    firebase login
    firebase deploy --only firestore:rules,storage:rules
  5. Start development

    npm run dev

    Open http://localhost:5173

πŸ€– AI Metadata Feature

ReCd uses Google Gemini 2.0 Flash to automatically generate smart metadata when CDs are made public:

How It Works

  1. Upload files with descriptive names (e.g., sunset_beach_2024.jpg)
  2. Toggle CD to public
  3. AI analyzes filenames and generates tags
  4. Metadata appears in retro Y2K style
  5. Enhanced search makes your CD discoverable

Setup Gemini API

  1. Get free API key: https://aistudio.google.com/app/apikey
  2. Add to .env.local: VITE_GEMINI_API_KEY=your_key
  3. Restart dev server

Free Tier: 1,500 requests/day (~150 CDs/day)
Cost: ~$0.0001 per CD (if you exceed free tier)

πŸ› οΈ Tech Stack

  • Frontend: React 19, TypeScript, Vite
  • Backend: Firebase (Auth, Firestore, Storage)
  • AI: Google Gemini 2.0 Flash
  • Email: EmailJS
  • Hosting: Vercel
  • Testing: Jest, React Testing Library, fast-check

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                     CLIENT (React + Vite)                    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚   Pages    β”‚  β”‚ Components β”‚  β”‚   Services Layer       β”‚ β”‚
β”‚  β”‚  (Routes)  β”‚β†’ β”‚   (UI)     β”‚β†’ β”‚ (Business Logic)       β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                             β”‚
                β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                β”‚            β”‚            β”‚
                β–Ό            β–Ό            β–Ό
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚ Firebase β”‚ β”‚  Gemini  β”‚ β”‚ EmailJS  β”‚
         β”‚          β”‚ β”‚   API    β”‚ β”‚   SMTP   β”‚
         β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
              β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚         β”‚         β”‚
    β–Ό         β–Ό         β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Auth  β”‚β”‚Firestoreβ”‚β”‚Storage β”‚
β”‚        β”‚β”‚Database β”‚β”‚ Bucket β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Data Flow

User Action β†’ React Component β†’ Service Layer β†’ Firebase/Gemini
                                                      ↓
User sees result ← React State Update ← Response β†β”€β”€β”€β”˜

AI Metadata Flow

Toggle CD Public β†’ Update Firestore β†’ Trigger AI Generation
                                              ↓
                                    Fetch Files Metadata
                                              ↓
                                    For Each File:
                                      - Build Prompt
                                      - Call Gemini API
                                      - Parse Response
                                      - Save to Firestore
                                              ↓
                                    Mark CD Complete
                                              ↓
                                    Display in Y2K UI

πŸ“ Project Structure

recd-platform/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/              # React components
β”‚   β”‚   β”œβ”€β”€ auth/               # Authentication components
β”‚   β”‚   β”‚   β”œβ”€β”€ LoginForm.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ SignUpForm.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ PasswordResetForm.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ UsernamePromptModal.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ AuthWindow.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ AnimatedBackground.tsx
β”‚   β”‚   β”‚   └── DecorativeElements.tsx
β”‚   β”‚   β”œβ”€β”€ cd/                 # CD management components
β”‚   β”‚   β”‚   β”œβ”€β”€ CDCard.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ CDCollection.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ CDDetailView.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ CreateCDModal.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ FileList.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ PublicToggle.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ PublicIndicator.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ PublicCDCard.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ AIMetadataDisplay.tsx      # AI metadata UI
β”‚   β”‚   β”‚   β”œβ”€β”€ MetadataGenerationModal.tsx # Progress modal
β”‚   β”‚   β”‚   β”œβ”€β”€ ViewAnalytics.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ AnalyticsStats.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ViewerList.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ MarketplaceFilters.tsx
β”‚   β”‚   β”‚   └── MarketplaceEmpty.tsx
β”‚   β”‚   β”œβ”€β”€ upload/             # File upload components
β”‚   β”‚   β”‚   β”œβ”€β”€ FileUploader.tsx
β”‚   β”‚   β”‚   └── BurningProgress.tsx
β”‚   β”‚   β”œβ”€β”€ share/              # Sharing components
β”‚   β”‚   β”‚   β”œβ”€β”€ ShareModal.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ShareButton.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ShareLinkDisplay.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ EmailShareForm.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ SharedCDView.tsx
β”‚   β”‚   β”‚   └── GuestPromptModal.tsx
β”‚   β”‚   β”œβ”€β”€ preview/            # Media preview components
β”‚   β”‚   β”‚   β”œβ”€β”€ FilePreviewModal.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ ImageViewer.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ AudioPlayer.tsx
β”‚   β”‚   β”‚   └── VideoPlayer.tsx
β”‚   β”‚   β”œβ”€β”€ ui/                 # Reusable UI components
β”‚   β”‚   β”‚   β”œβ”€β”€ RetroButton.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ RetroLayout.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ LoadingSpinner.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ EmptyState.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ DiscAnimation.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Toast.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ Footer.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ PageHeader.tsx
β”‚   β”‚   β”‚   β”œβ”€β”€ PageTransition.tsx
β”‚   β”‚   β”‚   └── ErrorBoundary.tsx
β”‚   β”‚   β”œβ”€β”€ routing/            # Route protection
β”‚   β”‚   β”‚   β”œβ”€β”€ ProtectedRoute.tsx
β”‚   β”‚   β”‚   └── PublicRoute.tsx
β”‚   β”‚   └── user/               # User profile components
β”‚   β”‚       └── ProfileSettings.tsx
β”‚   β”œβ”€β”€ services/               # Business logic & Firebase
β”‚   β”‚   β”œβ”€β”€ authService.ts      # Authentication
β”‚   β”‚   β”œβ”€β”€ cdService.ts        # CD CRUD operations
β”‚   β”‚   β”œβ”€β”€ fileService.ts      # File upload/download
β”‚   β”‚   β”œβ”€β”€ shareService.ts     # Share token management
β”‚   β”‚   β”œβ”€β”€ emailService.ts     # Email sending
β”‚   β”‚   β”œβ”€β”€ publicCDService.ts  # Public marketplace
β”‚   β”‚   β”œβ”€β”€ userService.ts      # User profiles
β”‚   β”‚   β”œβ”€β”€ analyticsService.ts # View tracking
β”‚   β”‚   β”œβ”€β”€ validationService.ts # Input validation
β”‚   β”‚   β”œβ”€β”€ aiService.ts        # Gemini AI integration
β”‚   β”‚   β”œβ”€β”€ cdMetadataService.ts # AI metadata orchestration
β”‚   β”‚   └── searchService.ts    # Enhanced search
β”‚   β”œβ”€β”€ hooks/                  # Custom React hooks
β”‚   β”‚   β”œβ”€β”€ useAuth.ts
β”‚   β”‚   β”œβ”€β”€ useToast.ts
β”‚   β”‚   β”œβ”€β”€ useMediaQuery.ts
β”‚   β”‚   β”œβ”€β”€ useReducedMotion.ts
β”‚   β”‚   └── useMetadataGeneration.ts # AI metadata hook
β”‚   β”œβ”€β”€ contexts/               # React Context providers
β”‚   β”‚   └── AuthContext.tsx
β”‚   β”œβ”€β”€ pages/                  # Route components
β”‚   β”‚   β”œβ”€β”€ LandingPage.tsx     # Public landing page
β”‚   β”‚   β”œβ”€β”€ AuthPage.tsx        # Login/signup
β”‚   β”‚   β”œβ”€β”€ CollectionPage.tsx  # User's CDs
β”‚   β”‚   β”œβ”€β”€ CDDetailPage.tsx    # CD details
β”‚   β”‚   β”œβ”€β”€ SharedCDPage.tsx    # Guest CD view
β”‚   β”‚   β”œβ”€β”€ MarketplacePage.tsx # Public CDs
β”‚   β”‚   β”œβ”€β”€ PublicCDViewPage.tsx # Public CD details
β”‚   β”‚   β”œβ”€β”€ CreatorProfilePage.tsx # Creator profile
β”‚   β”‚   β”œβ”€β”€ SettingsPage.tsx    # User settings
β”‚   β”‚   β”œβ”€β”€ AboutPage.tsx       # About us
β”‚   β”‚   β”œβ”€β”€ HelpPage.tsx        # Help & FAQ
β”‚   β”‚   β”œβ”€β”€ PrivacyPage.tsx     # Privacy policy
β”‚   β”‚   β”œβ”€β”€ TermsPage.tsx       # Terms of service
β”‚   β”‚   └── NotFoundPage.tsx    # 404 page
β”‚   β”œβ”€β”€ types/                  # TypeScript definitions
β”‚   β”‚   └── index.ts            # All type definitions
β”‚   β”œβ”€β”€ utils/                  # Utility functions
β”‚   β”‚   β”œβ”€β”€ constants.ts        # App constants
β”‚   β”‚   β”œβ”€β”€ errorHandling.ts    # Error utilities
β”‚   β”‚   β”œβ”€β”€ tokenGenerator.ts   # Token generation
β”‚   β”‚   β”œβ”€β”€ zipGenerator.ts     # ZIP file creation
β”‚   β”‚   └── linkHelpers.ts      # URL helpers
β”‚   β”œβ”€β”€ styles/                 # Global styles
β”‚   β”‚   └── index.css
β”‚   β”œβ”€β”€ config/                 # Configuration
β”‚   β”‚   └── firebase.ts         # Firebase config
β”‚   β”œβ”€β”€ App.tsx                 # Root component
β”‚   └── main.tsx                # Entry point
β”œβ”€β”€ docs/                       # Documentation
β”‚   β”œβ”€β”€ AI_METADATA_FEATURE.md
β”‚   β”œβ”€β”€ GEMINI_SETUP_GUIDE.md
β”‚   β”œβ”€β”€ AI_METADATA_MIGRATION.md
β”‚   β”œβ”€β”€ AI_METADATA_FLOW_DIAGRAM.md
β”‚   β”œβ”€β”€ AI_METADATA_UI_GUIDE.md
β”‚   β”œβ”€β”€ CORS_FIX_NOTE.md
β”‚   └── implementation-notes/
β”‚       └── AUTH_ACCESSIBILITY_IMPROVEMENTS.md
β”œβ”€β”€ tests/                      # Test files
β”‚   β”œβ”€β”€ unit/                   # Unit tests
β”‚   β”œβ”€β”€ property/               # Property-based tests
β”‚   └── integration/            # Integration tests
β”œβ”€β”€ public/                     # Static assets
β”‚   └── vite.svg
β”œβ”€β”€ .env.example                # Environment template
β”œβ”€β”€ .gitignore                  # Git ignore rules
β”œβ”€β”€ firebase.json               # Firebase config
β”œβ”€β”€ firestore.rules             # Firestore security
β”œβ”€β”€ firestore.indexes.json      # Firestore indexes
β”œβ”€β”€ storage.rules               # Storage security
β”œβ”€β”€ vite.config.ts              # Vite configuration
β”œβ”€β”€ tsconfig.json               # TypeScript config
β”œβ”€β”€ tsconfig.app.json           # App TypeScript config
β”œβ”€β”€ tsconfig.node.json          # Node TypeScript config
β”œβ”€β”€ jest.config.js              # Jest configuration
β”œβ”€β”€ eslint.config.js            # ESLint configuration
β”œβ”€β”€ package.json                # Dependencies
β”œβ”€β”€ package-lock.json           # Lock file
β”œβ”€β”€ vercel.json                 # Vercel deployment
└── README.md                   # This file

πŸ§ͺ Testing

# Run all tests
npm test

# Run with coverage
npm run test:coverage

# Run security rules tests
npm run test:security

🚒 Deployment

Deploy to Vercel

  1. Push code to GitHub
  2. Import project on vercel.com
  3. Add environment variables (same as .env.local)
  4. Deploy

Deploy Firebase Rules

firebase deploy --only firestore:rules,storage:rules

🀝 Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

πŸ“ License

MIT License - see LICENSE file

πŸ™ Acknowledgments

  • Built with Kiro AI
  • Powered by Firebase & Google Gemini
  • Inspired by the golden age of CD burning

Made with πŸ’Ώ and nostalgia

Start Burning CDs β†’

About

An effort for reliving CDs essence in digital era

Topics

Resources

License

Stars

Watchers

Forks

Languages