TryCrib is an innovative real estate platform that allows potential home buyers to "try before they buy" by booking short-term stays in properties they're interested in purchasing. This addresses the anxiety of home buying by enabling buyers to experience living in a property before making an offer.
Buying a home is the most expensive transaction most people undertake, yet unlike other major purchases (like cars), you don't get to test-drive your potential new home. TryCrib changes this by allowing buyers to:
- Experience the property firsthand
- Test the neighborhood and commute
- Make informed decisions with confidence
- Reduce purchase anxiety
Pricing System Implementation:
- Tiered pricing structure based on property value
- Fixed pricing tiers: $500/night (under $500K), $750/night ($500K-$1M), $1250/night ($1M-$1.5M), $1500/night ($1.5M-$3M), $2000/night ($3M-$5M)
- "Contact Seller" pricing for properties over $5M
- Dynamic price calculation and display
- Integration with property listings and booking flow
System Optimization & Production Readiness:
- Cloudinary integration for image processing and optimization
- Advanced search and filtering capabilities
- Booking system implementation
- Payment processing integration
- Mobile responsiveness improvements
- Performance optimization for large datasets
User Verification System - Comprehensive identity verification for buyers and sellers (β COMPLETED):
- Role-specific verification requirements (pre-approval letters for buyers, property tax statements for sellers)
- Document upload system with drag-and-drop interface
- File deduplication and secure storage in Supabase
- Verification status tracking (pending, approved, rejected)
- Dashboard integration with verification banners
- Onboarding flow integration for both user types
- Mobile-responsive verification pages
- Skip verification option with persistent reminders
Enhanced Authentication System - Robust login and signup flow (β COMPLETED):
- Fixed CAPTCHA integration with Clerk
- Email verification with code input system
- Duplicate signup prevention and error handling
- Mobile navigation improvements
- Resend verification functionality
- User-friendly error messages and recovery flows
Enhanced Role System - A comprehensive admin management system:
- Superadmin role with elevated permissions
- User promotion/demotion functionality
- Role-based dashboard redirects
- Admin management interface with visual role indicators
Property Data Management System - Property feed import and claiming system (β COMPLETED):
- Property feed import system with JSON/CSV support
- Smart data mapping from external feeds to database schema
- Property claiming system for sellers to claim ownership
- Admin interface for managing imports and claims
- Enhanced property schema with rich data fields (JSONB)
- Import history tracking and error reporting
- Duplicate claim prevention and status tracking
- Large Dataset Testing - Successfully tested with 85 properties
- Dual Format Support - Handles both old and new data formats automatically
- Rich Property Data - 40+ images per property, detailed descriptions, structured addresses
Pagination & Performance System - High-performance property browsing:
- Client-side pagination for external browse page (12 properties per page)
- Server-side pagination for admin dashboard (6 properties per page)
- Search and filtering across all properties
- Lazy loading for optimal performance
- Dynamic homepage showing 3 most expensive properties
- Property detail pages with image carousels and rich descriptions
- π Browse Properties: Search and filter available properties on the market
- π‘ Book Stays: Reserve short-term stays to experience properties
- π Manage Bookings: View booking history and manage reservations
- β Leave Reviews: Provide feedback after stays
- π³ Secure Payments: Integrated Stripe payment processing
- π List Properties: Create detailed property listings for try-before-buy stays
- π° Set Pricing: Configure per-night rates and manage availability
- π Track Bookings: Monitor reservations and earnings
- π¬ Communicate: Message with potential buyers
- π Analytics: View booking performance
- β Property Verification: Review and approve property listings
- π₯ User Management: Manage user accounts and roles
- π Platform Analytics: Monitor bookings and platform performance
- π§ Content Moderation: Oversee reviews and communications
- π₯ Property Feed Import: Upload and process JSON/CSV property feeds
- π Bulk Operations: Process large datasets efficiently
- π Superadmin Features: Manage admin roles and permissions
- π Property Claims Management: Review and approve property ownership claims
- π Import History: Track all property feed imports and results
- π Admin Management: Promote/demote admin users
- π§ System Configuration: Advanced platform settings
- π Global Analytics: Platform-wide performance metrics
- π Role Change History: Track all user role changes and audit trail
- Frontend: Next.js 15, React 19, TypeScript
- Styling: Tailwind CSS with Radix UI components
- Backend: Next.js API routes
- Database: Supabase (PostgreSQL)
- Authentication: Clerk.dev with Google OAuth
- Payments: Stripe
- Images: Cloudinary (planned)
- Deployment: Vercel
The application uses a comprehensive PostgreSQL schema with the following key tables:
- profiles: User accounts with role-based access (buyer/seller/admin/superadmin)
- properties: Property listings with detailed information and rich data (JSONB)
- bookings: Short-term stay reservations
- reviews: Post-stay feedback system
- messages: Buyer-seller communication
- property_availability: Calendar system for blocked dates
- role_changes: User role change history and audit trail
- property_imports: Import history and tracking
- property_claims: Property ownership claims and verification
The properties table includes rich data fields:
- Core fields: address, price, bedrooms, bathrooms, square footage
- Feed data: MLS ID, listing date, days on market, property type
- Rich data: Property features, location details, building info (JSONB)
- Images: Cloudinary URLs with original feed references
- Ownership: Seller assignment and claiming system
- Node.js 18+
- pnpm (recommended) or npm
- Supabase account
- Clerk.dev account
- Stripe account
- Cloudinary account (for image processing)
-
Clone the repository
git clone <repository-url>cd trycrib -
Install dependencies
pnpm install
npm install
-
Set up environment variables
Create a
.env.localfile in the root directory and put these in it:NEXT_PUBLIC_SUPABASE_URL=your_supabase_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key SUPABASE_SERVICE_ROLE_KEY=your_supabase_service_role_key
NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=your_clerk_publishable_key CLERK_SECRET_KEY=your_clerk_secret_key
STRIPE_SECRET_KEY=your_stripe_secret_key NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=your_stripe_publishable_key STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret
CLOUDINARY_CLOUD_NAME=your_cloudinary_cloud_name CLOUDINARY_API_KEY=your_cloudinary_api_key CLOUDINARY_API_SECRET=your_cloudinary_api_secret
NEXT_PUBLIC_GA_ID=G-XXXXXXXXXX
NEXT_PUBLIC_DEV_SUPABASE_REDIRECT_URL=http://localhost:3000
-
Set up the database
ONLY DO THIS IF STARTED WITH AN EMPLTY POSTRESQL DB
Run the SQL scripts in the
scripts/directory in order:scripts/001_create_tables.sql scripts/002_enable_rls.sql scripts/003_create_profile_trigger.sql scripts/add-stripe-session-column.sql
-
Run the development server
pnpm devnpm run dev -
Open your browser
Navigate to http://localhost:3000
```bash
pnpm build
pnpm start ```
- Connect your repository to Vercel
- Set environment variables in Vercel dashboard
- Deploy - Vercel will automatically build and deploy
Ensure all environment variables are set in your deployment platform:
NEXT_PUBLIC_SUPABASE_URLNEXT_PUBLIC_SUPABASE_ANON_KEYSUPABASE_SERVICE_ROLE_KEYNEXT_PUBLIC_CLERK_PUBLISHABLE_KEYCLERK_SECRET_KEYSTRIPE_SECRET_KEYNEXT_PUBLIC_STRIPE_PUBLISHABLE_KEYSTRIPE_WEBHOOK_SECRETCLOUDINARY_CLOUD_NAMECLOUDINARY_API_KEYCLOUDINARY_API_SECRETNEXT_PUBLIC_GA_ID(optional - Google Analytics tracking ID)
``` trycrib/ βββ app/ # Next.js app router pages β βββ admin/ # Admin dashboard β βββ api/ # API routes β βββ auth/ # Authentication pages β βββ booking/ # Booking flow β βββ dashboard/ # User dashboards β βββ properties/ # Property listings βββ components/ # React components β βββ admin/ # Admin-specific components β βββ buyer/ # Buyer-specific components β βββ seller/ # Seller-specific components β βββ landing/ # Landing page components β βββ ui/ # Reusable UI components βββ lib/ # Utility libraries β βββ supabase/ # Supabase client configuration β βββ stripe.ts # Stripe configuration β βββ types.ts # TypeScript type definitions βββ scripts/ # Database migration scripts βββ public/ # Static assets ```
The app uses Clerk.dev authentication with four user roles:
- Buyer: Can browse and book properties
- Seller: Can list and manage properties, claim ownership of properties
- Admin: Can verify properties, manage users, and import property data
- Superadmin: Can manage admin roles and system configuration
Users are automatically redirected to role-appropriate dashboards after authentication, with an onboarding flow for new users to select their role.
- Stripe Checkout for secure payment processing
- Webhook handling for payment confirmation
- Fee structure: Platform fees, agent commissions, and seller payouts
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Built with β€οΈ using Next.js, Supabase, and Stripe