Skip to content
View SpareCarry's full-sized avatar

Block or report SpareCarry

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
sparecarry/README.md
# SpareCarry A peer-to-peer delivery platform connecting travelers with people who need items delivered. ## Features ### Core Features - **Post Requests**: Request items to be delivered with detailed specifications - **Post Trips**: Travelers can offer spare capacity on their trips - **Smart Matching**: Automatic matching based on route, dates, and capacity - **Escrow Payments**: Secure payments held in escrow until delivery confirmation - **Real-time Chat**: In-app messaging between requesters and travelers - **Delivery Tracking**: GPS + photo proof for deliveries - **Rating System**: Rate both parties after delivery ### Premium Features - **SpareCarry Pro Subscription**: $6.99/month or $59/year - 0% platform fees (vs 12-18%) - Priority in feed - Blue check verification badge ### Advanced Features - **Dynamic Platform Fees**: 12-18% based on method + user history - Volume discounts (up to 3% off) - Rating-based discounts (up to 1% off) - **Insurance Upsell**: Allianz Travel Insurance integration (placeholder) - **Referral Program**: $50 credit each way after first completed delivery - **Group Buys**: Multiple requesters can join the same trip - **Internationalization**: Spanish + French translations (next-intl) - **Mobile Apps**: iOS/Android via Capacitor ## Tech Stack - **Framework**: Next.js 15 (App Router) - **Language**: TypeScript - **Styling**: Tailwind CSS - **UI Components**: shadcn/ui - **Database**: Supabase (PostgreSQL) - **Authentication**: Supabase Auth (Magic Link, Google, Apple) - **Payments**: Stripe (Connect, Identity, Subscriptions) - **Email**: Resend - **Internationalization**: next-intl - **Mobile**: Capacitor - **Forms**: React Hook Form + Zod ## Setup 1. **Install dependencies**: ```bash npm install ``` 2. **Create `.env.local`** – builds now validate required secrets before compiling. The table below lists everything that must be present for staging/production (use test keys locally): | Variable | Scope | Description | | ------------------------------------ | ------ | ------------------------------------------------------------------------------ | | `NEXT_PUBLIC_APP_URL` | Client | Canonical site URL (e.g., `https://sparecarry.com`) | | `NEXT_PUBLIC_APP_ENV` | Client | `development`, `staging`, or `production` (used for feature flags & telemetry) | | `NEXT_PUBLIC_SUPABASE_URL` | Client | Supabase project URL | | `NEXT_PUBLIC_SUPABASE_ANON_KEY` | Client | Supabase anon key | | `SUPABASE_SERVICE_ROLE_KEY` | Server | Supabase service role key for webhooks/cron | | `NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY` | Client | Stripe publishable key (`pk_test_` / `pk_live_`) | | `STRIPE_SECRET_KEY` | Server | Stripe secret key (`sk_test_` / `sk_live_`) | | `STRIPE_WEBHOOK_SECRET` | Server | Stripe webhook signing secret (`whsec_...`) | | `STRIPE_SUPPORTER_PRICE_ID` | Server | Price ID for the supporter checkout (`price_...`) | | `STRIPE_MONTHLY_PRICE_ID` | Server | Subscription monthly price ID | | `STRIPE_YEARLY_PRICE_ID` | Server | Subscription yearly price ID | | `RESEND_API_KEY` | Server | Resend API key for transactional mail (`re_...`) | | `NOTIFICATIONS_EMAIL_FROM` | Server | Default sender, e.g., `SpareCarry ` | | `NEXT_PUBLIC_GA_MEASUREMENT_ID` | Client | Google Analytics tag (`G-XXXXXXX`) | | `NEXT_PUBLIC_META_PIXEL_ID` | Client | Meta/Facebook pixel ID | | `NEXT_PUBLIC_UNLEASH_URL` | Client | Unleash API URL | | `NEXT_PUBLIC_UNLEASH_CLIENT_KEY` | Client | Unleash client token | | `CRON_SECRET` | Server | Bearer token required by `/api/payments/auto-release` | **Optional but recommended** | Variable | Purpose | | -------------------------------------- | --------------------------------------------------------------- | | `NEXT_PUBLIC_SUPPORT_EMAIL` | Mailto fallback in onboarding + chat (`support@sparecarry.com`) | | `NEXT_PUBLIC_GOOGLE_MAPS_API_KEY` | Google Maps autocomplete for forms | | `NEXT_PUBLIC_ENABLE_PHONE_AUTH` | `"false"` disables Supabase SMS during onboarding | | `NEXT_PUBLIC_ENABLE_STRIPE_IDENTITY` | `"false"` disables Stripe Identity in onboarding | | `EXPO_ACCESS_TOKEN` / `FCM_SERVER_KEY` | Push notifications (Expo / Firebase) | > Builds run `scripts/runtime-env.js` automatically. Set `SKIP_ENV_VALIDATION=true` only when intentionally bypassing the checks (not recommended). 3. **Set up Supabase**: - Run `supabase/schema.sql` in your Supabase SQL editor - Run `supabase/storage-setup.sql` for storage buckets - Run `supabase/seed-meetup-locations.sql` for meetup locations 4. **Set up Stripe**: - Create products and prices for subscriptions - Configure webhook endpoint: `/api/webhooks/stripe` - See `docs/STRIPE_SUBSCRIPTION_SETUP.md` 5. **Run development server**: ```bash npm run dev ``` ## Mobile App Build 1. **Build Next.js app**: ```bash npm run build ``` 2. **Sync with Capacitor**: ```bash npm run capacitor:sync ``` 3. **Open in native IDE**: ```bash npm run capacitor:ios # Opens Xcode npm run capacitor:android # Opens Android Studio ``` ## Project Structure ``` ├── app/ # Next.js app router pages │ ├── [locale]/ # Internationalized routes │ ├── api/ # API routes │ ├── auth/ # Authentication pages │ ├── home/ # Main app pages │ └── subscription/ # Subscription pages ├── components/ # React components │ ├── ui/ # shadcn/ui components │ ├── feed/ # Feed components │ ├── chat/ # Chat components │ ├── forms/ # Form components │ └── ... ├── lib/ # Utility libraries │ ├── supabase/ # Supabase clients │ ├── stripe/ # Stripe clients │ ├── pricing/ # Pricing logic │ ├── insurance/ # Insurance integration │ └── referrals/ # Referral system ├── messages/ # Translation files (next-intl) ├── supabase/ # Database schemas and migrations └── docs/ # Documentation ``` ## Escrow Auto-Release Cron Escrowed payments release automatically 24 hours after a traveler marks an item delivered. Deploy a secure cron job (e.g., Vercel Cron) to call: ``` POST https:///api/payments/auto-release Authorization: Bearer $CRON_SECRET ``` Set `CRON_SECRET` in every environment (local, staging, production) and reuse the same value inside your cron platform. Requests without this header are rejected. ## Documentation - `docs/STRIPE_SUBSCRIPTION_SETUP.md` - Stripe subscription setup - `docs/AFFILIATE_SETUP.md` - Affiliate links setup - `docs/FEATURES.md` - Feature documentation ## License Private - All rights reserved # sparecarry

Popular repositories Loading

  1. sparecarry sparecarry Public

    SpareCarry – traveler & sailor courier app

    TypeScript

  2. vosk-flutter vosk-flutter Public

    Forked from alphacep/vosk-flutter

    Dart