Skip to content

zenrsr/findify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

529 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Findify - AI-Powered Identity Verification Platform

Project Stability Next.js

Key Features

🔍 AI-Powered Search

  • AWS Rekognition integration for facial analysis
  • Image format conversion (WEBP/JPG → optimized JPG)
  • Image compression utilities in src/lib/imageCompression.ts

🌐 Multi-Platform Integration

  • Hinge profile fetching via src/servers/hinge/fetchProfiles.ts
  • Tinder profile structure defined in src/servers/tinder/tinderFetch.ts
  • Proxy server implementation in src/servers/proxy

🛡️ Security Features

  • Rate limiting implementation in src/servers/hinge/rateLimiter.ts
  • Error handling via src/servers/hinge/errorHandler.ts
  • Credit system management in src/contexts/CreditContext.tsx
  • Admin authentication with hardcoded credentials (admin/zenrsr)

🔐 Authentication Options

  • OAuth Providers: Google & GitHub (existing)
  • Email/Password: Traditional username/password authentication
  • Magic Links: Passwordless authentication via email
  • Cost: $0 for all authentication methods

Installation

git clone https://github.com/zenrsr/findify-gamma.git
cd findify-gamma
npm install

Configuration

Development Setup

  1. Create .env.local file:
# NextAuth Configuration
AUTH_SECRET=your_auth_secret_here_generate_with_openssl_rand_base64_32
AUTH_URL=http://localhost:3000
NEXTAUTH_URL=http://localhost:3000
GOOGLE_CLIENT_ID=your_google_oauth_client_id
GOOGLE_CLIENT_SECRET=your_google_oauth_client_secret
ID_GITHUB=your_github_oauth_app_id
SECRET_GITHUB=your_github_oauth_app_secret

# Email Server Configuration (Optional - for Magic Links)
EMAIL_SERVER_HOST=smtp.gmail.com
EMAIL_SERVER_PORT=587
EMAIL_SERVER_USER=your_email@gmail.com
EMAIL_SERVER_PASSWORD=your_app_password
EMAIL_FROM=noreply@yourdomain.com

# Database
DATABASE_URL=your_neon_database_url

# AWS Configuration
FINDIFY_AWS_REGION=your_aws_region
AWS_ACCESS_KEY_ID=your_key
AWS_SECRET_ACCESS_KEY=your_secret

Email Configuration for Magic Links

To enable magic link authentication, configure your email server:

Option 1: Gmail (Free)

EMAIL_SERVER_HOST=smtp.gmail.com
EMAIL_SERVER_PORT=587
EMAIL_SERVER_USER=your_email@gmail.com
EMAIL_SERVER_PASSWORD=your_app_password
EMAIL_FROM=noreply@yourdomain.com

Note: Use an App Password, not your regular Gmail password. Enable 2FA and generate an App Password in Google Account settings.

Option 2: SendGrid (Free tier: 100 emails/day)

EMAIL_SERVER_HOST=smtp.sendgrid.net
EMAIL_SERVER_PORT=587
EMAIL_SERVER_USER=apikey
EMAIL_SERVER_PASSWORD=your_sendgrid_api_key
EMAIL_FROM=noreply@yourdomain.com

Option 3: Resend (Free tier: 100 emails/day)

EMAIL_SERVER_HOST=smtp.resend.com
EMAIL_SERVER_PORT=587
EMAIL_SERVER_USER=resend
EMAIL_SERVER_PASSWORD=your_resend_api_key
EMAIL_FROM=noreply@yourdomain.com

Production Setup

For production deployment with OAuth authentication, see PRODUCTION_DEPLOYMENT.md.

Quick setup commands:

# Validate OAuth configuration
npm run oauth:validate

# Generate auth secret
npm run oauth:generate-secret

# Run database migrations
npm run db:migrate

Authentication Methods

1. OAuth Providers (Google & GitHub)

  • Cost: $0
  • User Experience: One-click sign-in
  • Setup: Requires OAuth app configuration

2. Email/Password Authentication

  • Cost: $0
  • User Experience: Traditional login
  • Security: Bcrypt hashing, secure password validation

3. Magic Link Authentication

  • Cost: $0 (just email sending costs)
  • User Experience: Enter email → receive link → click to login
  • Security: Very secure, no passwords to remember
  • Setup: Requires email server configuration

Database Migrations

After setting up, run the database migration to add the password field:

# Apply the new migration
npm run db:migrate

This adds support for email/password authentication alongside existing OAuth users.

Usage

Users can now choose from three authentication methods:

  1. OAuth: Continue with Google or GitHub
  2. Password: Sign in with email and password
  3. Magic Link: Receive a secure link via email

All methods provide the same user experience and access to the platform features.

Project Structure

├── src/
│   ├── app/               # Next.js routes
│   ├── components/        # UI components
│   │   ├── home/          # Core functionality
│   │   ├── landing/       # Marketing pages
│   │   └── ui/           # Shared UI components
│   ├── contexts/          # React contexts
│   ├── db/                # Database schema and connection
│   ├── hooks/             # Custom React hooks
│   ├── lib/               # Utilities and shared logic
│   └── servers/           # Platform integrations
│       ├── hinge/         # Hinge API implementation
│       ├── proxy/         # Proxy server
│       ├── tinder/        # Tinder API implementation
│       └── utils/         # Shared server utilities

API Integration

AWS Rekognition

  • Image resizing to 1080px longest edge
  • Color profile standardization (sRGB)
  • Face-aware compression in src/lib/imageCompression.ts

Platform APIs

  • Hinge API integration with session tracking in src/servers/hinge/state.ts
  • Tinder API implementation with profile fetching
  • Proxy server for secure API calls

Contributing

  1. Create feature branch:
git checkout -b feature/your-feature
  1. Commit changes:
git commit -m 'Add some feature'

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors