Skip to content

jaredamen/basecamp

Repository files navigation

Basecamp

Companion PWA for Climber. Study on the go with audio briefings and flashcards.

Basecamp is a mobile-first Progressive Web App designed to help you consume and review technical content generated by Climber. Whether you're commuting, taking a break, or studying offline, Basecamp makes it easy to review flashcards and listen to audio briefings on your mobile device.

✨ Features

πŸ“š Flashcard Decks

  • Interactive Review: Tap to flip cards, swipe to mark as "got it" or "review again"
  • Progress Tracking: Real-time tracking of completed vs. review-again cards
  • Smooth Animations: Native-feeling card flip and swipe animations
  • Session Management: Navigate freely between cards with previous/next controls

🎧 Audio Briefings

  • Flexible Playback: Supports both actual audio files and text-to-speech
  • Podcast-like Controls: Play/pause, skip forward/backward 15 seconds
  • Variable Speed: 1x, 1.25x, 1.5x, 2x playback rates
  • Script Reading: Toggle between player view and full script text

πŸ“± PWA Features

  • Installable: Add to home screen on iOS and Android
  • Offline-Ready: Works without internet connection after initial load
  • Mobile-First: Optimized for mobile devices with touch interactions
  • Dark Mode: Clean dark theme perfect for late-night studying

πŸ“‚ Data Import

  • JSON File Import: Load flashcard decks and audio briefings from Climber output
  • Sample Content: Ships with example content for immediate demo
  • Future-Ready: Architected to easily switch to API-based loading

πŸš€ Quick Start

Prerequisites

  • Node.js 20+ (recommended) or 18.20.8 (minimum)
  • npm or yarn

Installation

# Clone the repository
git clone https://github.com/YusefAmen/basecamp.git
cd basecamp

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

Install as PWA

iOS (Safari)

  1. Open Basecamp in Safari
  2. Tap the Share button (square with arrow up)
  3. Scroll down and tap "Add to Home Screen"
  4. Tap "Add" to confirm

Android (Chrome)

  1. Open Basecamp in Chrome
  2. Tap the menu (three dots)
  3. Tap "Add to Home Screen"
  4. Tap "Add" to confirm

πŸ“Š Data Format Reference

Basecamp consumes content generated by Climber in specific JSON formats. These formats serve as the contract between Climber and Basecamp.

Flashcard Deck Format

{
  "deck_id": "unique-identifier",
  "title": "Kubernetes Network Policies",
  "source": "https://kubernetes.io/docs/concepts/services-networking/network-policies/",
  "created_at": "2025-02-20T10:30:00Z",
  "cards": [
    {
      "id": "unique-card-id",
      "question": "What is the default network policy behavior in Kubernetes?",
      "answer": "By default, pods are non-isolated and accept traffic from any source."
    }
  ]
}

Audio Briefing Format

{
  "briefing_id": "unique-identifier", 
  "title": "Prometheus 2.50 Release Notes",
  "source": "https://github.com/prometheus/prometheus/releases/tag/v2.50.0",
  "created_at": "2025-02-20T10:30:00Z",
  "script": "Welcome to your briefing on Prometheus 2.50...",
  "audio_file": "prometheus-2.50-briefing.mp3"
}

Note: audio_file is optional. When not provided, Basecamp uses text-to-speech to read the script.

πŸ›  Development

Project Structure

basecamp/
β”œβ”€β”€ public/                     # Static assets and PWA files
β”‚   β”œβ”€β”€ manifest.webmanifest   # PWA manifest (auto-generated)
β”‚   β”œβ”€β”€ pwa-*.svg              # PWA icons
β”‚   └── sample-data/           # Sample content for demo
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ components/            # React components
β”‚   β”‚   β”œβ”€β”€ AudioPlayer.tsx    # Audio briefing player
β”‚   β”‚   β”œβ”€β”€ AudioFeed.tsx      # Audio briefings list
β”‚   β”‚   β”œβ”€β”€ FlashcardDeck.tsx  # Flashcard deck list
β”‚   β”‚   β”œβ”€β”€ FlashcardViewer.tsx# Card review interface
β”‚   β”‚   β”œβ”€β”€ BottomNav.tsx      # Tab navigation
β”‚   β”‚   └── FileImport.tsx     # JSON file import
β”‚   β”œβ”€β”€ hooks/                 # Custom React hooks
β”‚   β”‚   β”œβ”€β”€ useFlashcards.ts   # Flashcard state management
β”‚   β”‚   └── useAudioPlayer.ts  # Audio player state
β”‚   β”œβ”€β”€ types/                 # TypeScript interfaces
β”‚   β”‚   └── index.ts           # Data model definitions
β”‚   β”œβ”€β”€ data/                  # Data loading logic
β”‚   β”‚   └── loader.ts          # Local/API data loaders
β”‚   └── styles/                # Global CSS styles
β”‚       └── globals.css        # Tailwind + custom styles
β”œβ”€β”€ tests/                     # Test files
β”‚   β”œβ”€β”€ components/            # Component tests
β”‚   └── hooks/                 # Hook tests
└── dist/                      # Production build output

Key Technologies

  • React 19 with TypeScript for UI
  • Vite for fast development and building
  • Tailwind CSS for styling
  • Vite PWA Plugin for Progressive Web App features
  • Vitest + React Testing Library for testing

Available Scripts

npm run dev     # Start development server
npm run build   # Build for production  
npm run preview # Preview production build
npm run test    # Run tests
npm run lint    # Lint code with ESLint

Architecture Notes

  • Component-Based: Each screen is a self-contained component
  • Hook-Driven: Business logic separated into custom hooks
  • Type-Safe: Full TypeScript coverage with strict types
  • Mobile-First: Responsive design optimized for mobile devices
  • Offline-First: Service worker caches all assets and data

πŸ”„ Workflow with Climber

  1. Generate Content: Use Climber to analyze technical content and generate flashcards/briefings
  2. Export JSON: Climber outputs content in Basecamp-compatible JSON format
  3. Import to Basecamp: Use the file import feature to load content into Basecamp
  4. Study on the Go: Review flashcards and listen to briefings anywhere

πŸ§ͺ Testing

The project includes comprehensive tests for components and hooks:

# Run all tests
npm test

# Run tests in watch mode
npm run test:watch

# Run tests with coverage
npm run test:coverage

Test coverage includes:

  • βœ… Component rendering and interactions
  • βœ… Navigation between screens
  • βœ… File import functionality
  • βœ… Flashcard session management
  • βœ… Audio player state management

🚧 Future Enhancements

  • API Integration: Backend API for syncing content across devices
  • Spaced Repetition: Smart scheduling algorithm for optimal learning
  • Offline Sync: Sync data when connection is restored
  • Audio Generation: TTS integration for consistent audio quality
  • Analytics: Learning progress and performance insights

πŸ“ Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘¨β€πŸ’» Author

Built by Jared (Yusef) Amen

πŸ”— Related Projects

  • Climber: Knowledge digester that generates the content you consume in Basecamp

Generate content with Climber β†’ review it in Basecamp

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors