A modern swipe-based trading platform where users can discover and trade items through an intuitive Tinder-style interface. Built with React, TypeScript, and Firebase.
- π Swipe Trading - Tinder-style interface for discovering items to trade
- π― Trade Anchors - Select your item and swipe through potential matches
- π¬ Real-time Messaging - Chat with trade partners after accepting offers
- π Trade Management - Track offers, history, and active conversations
- π Smart Notifications - Get notified of new offers and messages
- π Item Listings - Create and manage your tradeable items
- πΈ Image Gallery - Multiple photos with Cloudinary integration
- π·οΈ Categories & Conditions - Organize items by type and quality
- π Location-based - Find items near you with map integration
- π Item Analytics - View counts, favorites, and swipe interest
- π Secure Authentication - Firebase auth with profile management
- π¨ Dark/Light Themes - Toggle between themes with smooth transitions
- π± Fully Responsive - Optimized for mobile, tablet, and desktop
- β‘ Offline Support - Local caching for seamless experience
- π Smooth Animations - Card swipes, transitions, and micro-interactions
# Install dependencies
npm install
# Copy environment variables
cp .env.example .env
# Configure your environment variables:
# - Firebase config (auth, firestore, storage)
# - Cloudinary credentials
# - Google Maps API key
# Start development server
npm run devVisit http://localhost:5173 to see your app!
- React 19 - UI library with latest features
- TypeScript - Type-safe development
- Vite - Lightning-fast build tool
- Tailwind CSS 4 - Utility-first styling
- React Router - Client-side routing
- Firebase Auth - User authentication
- Firestore - Real-time database
- Firebase Storage - File storage
- Cloudinary - Image optimization and delivery
- Leaflet - Interactive maps
- Vitest - Unit and integration testing
- Testing Library - Component testing
- Fast-check - Property-based testing
circld/
βββ src/
β βββ components/ # Reusable UI components
β β βββ ui/ # Base UI components (Button, Card, etc.)
β β βββ SwipeInterface.tsx
β β βββ ConversationView.tsx
β β βββ ...
β βββ pages/ # Route pages
β β βββ SwipeTradingPage.tsx
β β βββ MessagesPage.tsx
β β βββ TradeOffers.tsx
β β βββ ...
β βββ services/ # Business logic
β β βββ itemPoolService.ts
β β βββ messagingService.ts
β β βββ tradeOfferService.ts
β β βββ ...
β βββ contexts/ # React contexts
β β βββ AuthContext.tsx
β β βββ ProfileContext.tsx
β β βββ ThemeContext.tsx
β βββ hooks/ # Custom React hooks
β βββ types/ # TypeScript definitions
β βββ utils/ # Helper functions
β βββ firebase.ts # Firebase configuration
βββ .kiro/
β βββ specs/ # Feature specifications
βββ firestore.rules # Firestore security rules
βββ storage.rules # Storage security rules
βββ vite.config.ts # Build configuration
- Create a Firebase project at Firebase Console
- Enable Email/Password authentication
- Create Firestore database
- Enable Firebase Storage
- Copy configuration to
.env:
VITE_FIREBASE_API_KEY=your_api_key
VITE_FIREBASE_AUTH_DOMAIN=your_auth_domain
VITE_FIREBASE_PROJECT_ID=your_project_id
VITE_FIREBASE_STORAGE_BUCKET=your_storage_bucket
VITE_FIREBASE_MESSAGING_SENDER_ID=your_sender_id
VITE_FIREBASE_APP_ID=your_app_id- Create account at Cloudinary
- Get your cloud name and upload preset
- Add to
.env:
VITE_CLOUDINARY_CLOUD_NAME=your_cloud_name
VITE_CLOUDINARY_UPLOAD_PRESET=your_upload_presetfirebase deploy --only firestore:rules
firebase deploy --only storage:rulesnpm run dev- Start development servernpm run build- Build for productionnpm run preview- Preview production buildnpm test- Run tests oncenpm run test:watch- Run tests in watch modenpm run lint- Lint TypeScript filesnpm run lint:fix- Auto-fix linting issuesnpm run audit:buttons- Audit button components in codebasenpm run migrate:buttons- Generate button migration suggestions
Users select a "trade anchor" (their item) and swipe through available items:
- Swipe Right - Express interest in trading
- Swipe Left - Pass on the item
- Filters - Distance, category, and condition filters
- Session Management - Persistent swipe sessions with history
When you swipe right:
- A trade offer is created and sent to the item owner
- Owner receives a notification
- Owner can accept or decline
- Accepted offers unlock messaging
Real-time chat for accepted trades:
- Conversation per accepted trade
- Message notifications
- Unread message badges
- Conversation history
- Participant validation
- Location-based search with map picker
- Category filtering
- Condition-based filtering
- Related items suggestions
- View tracking and analytics
- Firestore Security Rules - Row-level security for all data
- Storage Rules - Secure file uploads
- Environment Variables - Sensitive data protection
- Input Validation - Client and server-side validation
- Authentication Required - Protected routes and API calls
The project includes a comprehensive design system with reusable components:
- Button Component - 5 variants (primary, secondary, outline, ghost, danger) with loading states, icon support, and full accessibility
- LoadingSpinner - 9 stylish variants (default, dots, pulse, gradient, orbit, bars, flow, ripple, wave) with size options
- Card, Input, Select - Consistent form and layout components
- Modal, Toast, Alert - Feedback and notification components
- Dropdown, Checkbox, Pagination - Interactive UI elements
- Color Themes - Light and dark mode with smooth transitions
- Responsive Grid - Mobile-first design with touch-optimized interactions
- Loading States - Skeleton screens and animated spinners
- Error Handling - User-friendly error messages with recovery options
- Accessibility - WCAG 2.1 compliant with ARIA labels, keyboard navigation, and 48px minimum touch targets
- Animations - Smooth transitions using Framer Motion with reduced motion support
The project uses a comprehensive testing strategy:
- Unit Tests - Component and service testing
- Property-Based Tests - Correctness validation with fast-check
- Integration Tests - End-to-end user flows
- Test Coverage - Critical paths covered
Run tests with:
npm testThe project includes automated tools for maintaining UI consistency:
- Button Audit - Scans codebase to identify all button components and native elements
- Button Migration - Analyzes native buttons and provides automated migration suggestions with confidence levels
See scripts/README.md for detailed documentation.
Detailed component documentation is available in:
- src/components/README.md - Component usage guides
- scripts/README.md - Development tool documentation
Private and proprietary.
Built with β€οΈ by the Circl'd team