Skip to content

A modern, responsive web app for managing comic book collections with analytics, financial tracking, and mobile-friendly browsing. Self-host your own collection manager with React, TypeScript, and Tailwind CSS.

Notifications You must be signed in to change notification settings

banastas/comics.banast.as

Repository files navigation

Comic Book Collection Manager

Live Site Built with React TypeScript Tailwind CSS Vite

A modern, responsive web application for managing and tracking your comic book collection with advanced analytics, financial tracking, and comprehensive organization features. Built with React 18, TypeScript, and Tailwind CSS.

Live Demo: comics.banast.as

Perfect for comic collectors who want to:

  • πŸ“š Track their entire collection digitally
  • πŸ“Š Analyze collection value and performance
  • πŸ” Search and filter comics easily
  • πŸ“± Access their collection on any device
  • πŸ“ˆ Monitor financial gains/losses
  • 🏷️ Organize with custom tags and storage locations

πŸš€ Quick Start (Self-Hosting)

Get your own comic collection manager running in under 5 minutes:

# 1. Clone this repository
git clone https://github.com/yourusername/comics.banast.as.git
cd comics.banast.as

# 2. Install dependencies
npm install

# 3. Start the development server
npm run dev

# 4. Open your browser to http://localhost:5173

That's it! You now have your own personal comic collection manager running locally.

Table of Contents

Features

Collection Management

  • Comprehensive Comic Details: Track title, series, issue number, release date, grade, purchase price, current value, cover artist, storage location, tags, notes, and more
  • Cover Art Display: Visual representation of your collection with cover image support and graceful fallbacks
  • Condition Tracking: Distinguish between raw and slabbed comics with dedicated views
  • Signature Tracking: Record signed comics and who signed them
  • Variant & Graphic Novel Support: Track variant covers and graphic novels separately
  • Storage Organization: Virtual storage locations and box management

Advanced Analytics & Statistics

  • Dashboard Overview: Total comics, collection value, average grade, and performance metrics at a glance
  • Financial Tracking: Purchase vs current value comparison with gain/loss calculations
  • Performance Analytics: Biggest gainers/losers and value trends over time
  • Condition Breakdown: Raw vs slabbed comic statistics with clickable navigation
  • Series Analytics: Drill down into your collection by series with detailed breakdowns
  • Artist & Tag Views: Browse collections by cover artist or custom tags
  • Storage Analytics: Track comics by storage location with summary statistics

Navigation & Browsing

  • Smart Search: Find comics by title, series, notes, cover artist, and more
  • Flexible Views: Switch between grid and list layouts for optimal browsing
  • Advanced Sorting: Sort by title, series, issue, grade, value, date, and more
  • Interactive Detail Pages: Click any comic, series, tag, artist, or storage location for detailed views
  • Clickable Dashboard Cards: All statistics cards navigate to their respective detail pages
  • Series Navigation: Series boxes throughout the app are clickable for easy navigation

Responsive Design

  • Mobile-First: Optimized for all screen sizes from 320px to 4K displays
  • Touch-Friendly: Minimum 44px touch targets for mobile accessibility
  • Fluid Typography: Text scales appropriately across all devices
  • Cross-Platform: Works seamlessly on desktop, tablet, and mobile devices

Data Management

  • CSV Import: Built-in CSV to JSON converter for easy data import
  • File Upload Interface: Drag-and-drop file upload with validation
  • Data Export: Export your collection data for backup or migration
  • Validation: Comprehensive data validation with Zod schemas

Technology Stack

  • Frontend: React 18 + TypeScript
  • Build Tool: Vite with optimized code splitting
  • Styling: Tailwind CSS with custom responsive utilities
  • State Management: Zustand (modern) + Custom React hooks (legacy)
  • Icons: Lucide React
  • Validation: Zod schemas for data validation
  • Performance: Lazy loading, code splitting, responsive images

πŸ“‹ Prerequisites

Before you begin, make sure you have:

πŸ› οΈ Installation & Setup

Option 1: Development Mode (Recommended for personal use)

  1. Clone the repository:

    git clone https://github.com/yourusername/comics.banast.as.git
    cd comics.banast.as
  2. Install dependencies:

    npm install
  3. Start the development server:

    npm run dev
  4. Open your browser and go to http://localhost:5173

Option 2: Production Build (For hosting on a web server)

  1. Follow steps 1-2 above, then:

  2. Build for production:

    npm run build
  3. Preview the production build locally:

    npm run preview
  4. Deploy the dist folder to your web hosting service (Netlify, Vercel, GitHub Pages, etc.)

πŸ“š Adding Your Collection Data

The app comes with sample data, but you'll want to add your own comics. Here's how:

Method 1: Use the Built-in CSV Converter (Easiest)

  1. Prepare your data in a CSV file with these columns:

    title,seriesName,issueNumber,releaseDate,coverImageUrl,coverArtist,grade,purchasePrice,purchaseDate,currentValue,notes,signedBy,storageLocation,tags,isSlabbed,isVariant,isGraphicNovel
    
  2. Access the converter by clicking the file upload icon in the app header

  3. Upload your CSV and download the converted JSON file

  4. Replace src/data/comics.json with your new file

  5. Restart the development server to see your collection

Method 2: Manual JSON Editing (Advanced)

  1. Open src/data/comics.json in a text editor

  2. Replace the content with your comic data using this format:

    [
      {
        "id": "unique-id-1",
        "title": "The Amazing Spider-Man",
        "seriesName": "The Amazing Spider-Man",
        "issueNumber": 1,
        "releaseDate": "1963-03-01",
        "coverImageUrl": "https://example.com/cover.jpg",
        "coverArtist": "Steve Ditko",
        "grade": 4.0,
        "purchasePrice": 15000,
        "purchaseDate": "2024-01-15",
        "currentValue": 18500,
        "notes": "First appearance of Spider-Man",
        "signedBy": "",
        "storageLocation": "Box A-1",
        "tags": ["key issue", "first appearance", "marvel"],
        "isSlabbed": true,
        "isVariant": false,
        "isGraphicNovel": false,
        "createdAt": "2024-01-15T10:30:00Z",
        "updatedAt": "2024-01-15T10:30:00Z"
      }
    ]

Sample Data

If you want to see how the app works before adding your own data, the repository includes:

  • example-comic-collection.json - A sample collection with 15 comics
  • src/data/comics.json - The current active collection data

🎯 How to Use the App

Getting Started

  1. Open the app in your browser at http://localhost:5173
  2. Explore the Dashboard - See your collection statistics at a glance
  3. Browse your comics - Switch between grid and list views
  4. Search and filter - Use the search bar and sorting options
  5. Click anything - Comics, series, artists, tags, and storage locations are all clickable

Key Features You'll Love

πŸ“Š Dashboard Analytics

  • Total collection value and number of comics
  • Biggest gainers/losers in your collection
  • Condition breakdown (raw vs slabbed)
  • Series analytics - see which series you collect most

πŸ” Smart Search & Filtering

  • Search by title, series, artist, or notes
  • Filter by grade, value range, or tags
  • Sort by any field (title, value, date, etc.)
  • Quick filters for slabbed comics, variants, and graphic novels

πŸ“± Mobile-Friendly Design

  • Works on any device - phone, tablet, or desktop
  • Touch-friendly - optimized for mobile browsing
  • Responsive images - covers look great on any screen

🌐 Deploying to the Web

Want to share your collection online or access it from anywhere? Here are the easiest options:

Option 1: Netlify (Recommended - Free)

  1. Build your project: npm run build
  2. Go to netlify.com and sign up
  3. Drag and drop your dist folder to deploy
  4. Get a free URL like your-collection.netlify.app

Option 2: Vercel (Free)

  1. Connect your GitHub repo to vercel.com
  2. Vercel auto-deploys when you push changes
  3. Get a free URL like your-collection.vercel.app

Option 3: GitHub Pages (Free)

  1. Build your project: npm run build
  2. Push the dist folder to a gh-pages branch
  3. Enable GitHub Pages in your repo settings
  4. Get a free URL like yourusername.github.io/comics.banast.as

Option 4: Any Web Host

  • Upload the contents of the dist folder to any web hosting service
  • The app works as a static website - no server required!

Project Structure

src/
β”œβ”€β”€ components/              # React components
β”‚   β”œβ”€β”€ Dashboard.tsx        # Main statistics dashboard
β”‚   β”œβ”€β”€ ComicCard.tsx        # Grid view comic cards  
β”‚   β”œβ”€β”€ ComicDetail.tsx      # Individual comic detail page
β”‚   β”œβ”€β”€ ComicForm.tsx        # Add/edit comic form
β”‚   β”œβ”€β”€ SeriesDetail.tsx     # Series-specific views
β”‚   β”œβ”€β”€ CoverArtistDetail.tsx # Artist-specific views
β”‚   β”œβ”€β”€ TagDetail.tsx        # Tag-specific views
β”‚   β”œβ”€β”€ StorageLocationDetail.tsx # Storage views
β”‚   β”œβ”€β”€ lazyComponents.ts    # Centralized lazy loading
β”‚   β”œβ”€β”€ ErrorBoundary.tsx    # Error handling
β”‚   └── ResponsiveImage.tsx  # Optimized image component
β”œβ”€β”€ stores/
β”‚   └── comicStore.ts        # Zustand state management
β”œβ”€β”€ hooks/
β”‚   β”œβ”€β”€ useComics.ts         # Legacy data management
β”‚   β”œβ”€β”€ useComicFilters.ts   # Filtering and sorting
β”‚   └── usePerformance.ts    # Performance monitoring
β”œβ”€β”€ types/
β”‚   └── Comic.ts             # TypeScript interfaces
β”œβ”€β”€ utils/
β”‚   β”œβ”€β”€ storage.ts           # Storage utilities
β”‚   β”œβ”€β”€ performance.ts       # Performance utilities
β”‚   └── validation.ts        # Data validation
β”œβ”€β”€ data/
β”‚   └── comics.json          # Comic collection data
└── styles/
    └── responsive.css       # Additional responsive styles

Data Management

Data Storage

  • Primary Storage: src/data/comics.json - Main comic collection data
  • Format: JSON array of Comic objects
  • Schema: Defined in src/types/Comic.ts with Zod validation
  • Backup: Export functionality for data backup and migration

State Management Architecture

The project uses a hybrid approach during transition:

  1. Modern (Preferred): Zustand store in src/stores/comicStore.ts
  2. Legacy: React hooks in src/hooks/useComics.ts

Note: When making changes, prefer the Zustand store approach as it's the target architecture.

CSV Import Process

  1. Prepare CSV with required columns (see usage section)
  2. Access Converter via file icon in header
  3. Upload CSV file for validation and conversion
  4. Download JSON file with converted data
  5. Replace existing comics.json file

Development

Available Scripts

# Development
npm run dev          # Start development server with hot reload
npm run build        # Build for production
npm run preview      # Preview production build
npm run lint         # Lint code

# Additional development commands
npm run dev:debug    # Start with debugging enabled
npm run analyze      # Analyze bundle size

Code Organization

Component Architecture

  • Core Layout: App.tsx, Dashboard.tsx for main structure
  • Display Components: ComicCard.tsx, ComicListView.tsx for collection views
  • Detail Views: Lazy-loaded components for individual item details
  • Utility Components: ErrorBoundary.tsx, ResponsiveImage.tsx for shared functionality

State Flow

  1. Data Loading: JSON data loaded on app startup
  2. State Management: Zustand store manages centralized state
  3. Component Subscription: Components subscribe to specific store slices
  4. Filtering/Sorting: Handled by useComicFilters hook
  5. Performance: Monitored via usePerformance hook

Best Practices

  • Use TypeScript for all new components
  • Implement lazy loading for detail views
  • Follow mobile-first responsive design
  • Add error boundaries for component isolation
  • Use Zustand store for new state management
  • Implement proper loading states and fallbacks

Performance

Optimization Features

  • Code Splitting: Lazy-loaded detail pages reduce initial bundle size
  • Image Optimization: Responsive images with WebP support and fallbacks
  • Bundle Optimization: Separate chunks for vendors, utilities, and components
  • Performance Monitoring: Built-in utilities for tracking performance metrics
  • Memory Management: Efficient state management with Zustand

Performance Budgets

  • JavaScript Bundle: <250KB gzipped
  • CSS Bundle: <50KB gzipped
  • Images: WebP format with lazy loading
  • Fonts: Subset and preload critical fonts

Loading Performance

  • Lazy Loading: Detail views load on demand
  • Skeleton Screens: Smooth loading experience
  • Progressive Enhancement: Core functionality works without JavaScript
  • Error Boundaries: Graceful error handling

Browser Support

Desktop Browsers

  • Chrome 90+ βœ…
  • Firefox 88+ βœ…
  • Safari 14+ βœ…
  • Edge 90+ βœ…

Mobile Browsers

  • iOS Safari 14+ βœ…
  • Chrome Mobile 90+ βœ…
  • Samsung Internet 13+ βœ…
  • Firefox Mobile 88+ βœ…

Accessibility

  • WCAG AA Compliant: Proper contrast ratios and semantic HTML
  • Keyboard Navigation: Full keyboard accessibility
  • Screen Reader Support: ARIA labels and live regions
  • Touch Accessibility: Minimum 44x44px touch targets

Migration & Updates

State Management Migration

The project is transitioning from React hooks to Zustand:

  • Current: Mixed approach with both systems
  • Target: Full Zustand implementation
  • Migration: Gradual component-by-component migration

Data Model Evolution

  • Flexible Schema: Easy addition of new comic properties
  • Backward Compatibility: Maintains support for existing data
  • Validation: Comprehensive Zod schemas prevent data corruption

Known Limitations

  • Data Storage: Uses JSON file instead of database (easily upgradeable)
  • Single User: No authentication or multi-user support currently
  • Image Hosting: Cover images must be hosted externally
  • Manual Backup: No automated backup or sync features

Future Enhancements

Near Term

  • Complete Zustand Migration: Finish state management transition
  • Enhanced Testing: Comprehensive test suite implementation
  • PWA Features: Offline functionality and app installation
  • Advanced Filtering: More sophisticated search and filter options

Long Term

  • Database Integration: Migration to PostgreSQL/Supabase
  • User Authentication: Multi-user support with personal collections
  • Image Upload: Direct cover image upload and hosting
  • Mobile App: Native mobile application
  • Cloud Sync: Cross-device synchronization
  • Community Features: Collection sharing and social features

🚨 Troubleshooting

Common Issues

"npm install" fails

  • Make sure you have Node.js 18+ installed
  • Try clearing npm cache: npm cache clean --force
  • Delete node_modules and package-lock.json, then run npm install again

App won't start after adding your data

  • Check your JSON syntax - use a JSON validator
  • Make sure all required fields are present in each comic object
  • Restart the development server after changing data files

Images not loading

  • Use HTTPS URLs for cover images when possible
  • Check that image URLs are accessible from your browser
  • Consider using a free image hosting service like Imgur or Cloudinary

Build fails

  • Check for TypeScript errors: npm run lint
  • Make sure all imports are correct
  • Verify your data structure matches the expected format

Getting Help

  • Check the Issues for common problems
  • Create a new issue if you can't find a solution
  • Include error messages and steps to reproduce the problem

🀝 Contributing

We'd love your help making this app better! Here's how to contribute:

Quick Contributions

  • Report bugs - Found something broken? Let us know!
  • Suggest features - Have an idea? We'd love to hear it!
  • Improve documentation - Help others by improving this README

Code Contributions

  1. Fork the repository and clone it locally
  2. Create a feature branch: git checkout -b your-feature-name
  3. Make your changes and test them
  4. Submit a pull request with a clear description

What We're Looking For

  • Bug fixes and performance improvements
  • New features that help comic collectors
  • Better mobile experience and accessibility
  • Documentation improvements and examples

Code Guidelines

  • Use TypeScript for all new code
  • Follow the existing code style
  • Test your changes before submitting
  • Write clear commit messages

❓ Frequently Asked Questions

Is this app free to use?

Yes! This is completely free and open source. You can use it for personal or commercial purposes.

Do I need to know how to code?

Not at all! The app is designed to be user-friendly. You just need to:

  1. Install Node.js (one-time setup)
  2. Run a few commands
  3. Add your comic data

Can I use this without the internet?

Yes! Once you've built the app, it runs entirely in your browser. No internet connection needed after the initial setup.

How many comics can I track?

Unlimited! The app can handle collections of any size, from a few comics to thousands.

Is my data safe?

Your data stays on your computer unless you choose to deploy it online. The app uses local JSON files, so you have complete control.

Can I backup my collection?

Yes! Your data is stored in src/data/comics.json - just copy this file to backup your collection.

What if I want to add more features?

Great! This is open source, so you can modify it however you want. Or submit a feature request and we might add it!

πŸ“„ License

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

πŸ†˜ Support

Need help? Here's where to get it:

  • πŸ› Found a bug? Create an issue
  • πŸ’‘ Have a feature idea? Start a discussion
  • πŸ“– Need help with setup? Check the troubleshooting section above
  • πŸ’¬ Want to chat? Join our community discussions

πŸŽ‰ Ready to Get Started?

  1. Star this repository ⭐ to show your support
  2. Fork it to create your own copy
  3. Follow the Quick Start guide above
  4. Start tracking your collection!

Happy collecting! πŸ¦Έβ€β™‚οΈπŸ“š

About

A modern, responsive web app for managing comic book collections with analytics, financial tracking, and mobile-friendly browsing. Self-host your own collection manager with React, TypeScript, and Tailwind CSS.

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published