Skip to content

darshanpania/Jiffy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

101 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎬 JIFFY - GIF Messenger

Express yourself better with GIFs! A modern Android messaging app built with Kotlin, Jetpack Compose, Supabase, and a Node.js backend.

Android Kotlin Node.js Supabase Railway License


πŸ“± Overview

JIFFY is a next-generation GIF-powered messaging application that makes conversations more fun and expressive. Built with modern Android development practices and a scalable Node.js backend deployed on Railway.

✨ Key Features

  • πŸ” Secure Authentication - Google and Apple Sign-In via Supabase Auth
  • πŸ’¬ Real-Time Messaging - Instant message delivery using Supabase Realtime
  • 🎨 Dual GIF Sources - Search and share GIFs from both GIPHY and Tenor
  • πŸ‘₯ Group Chats - Create and manage group conversations (up to 100 members)
  • πŸ“± Social Sharing - Share GIFs directly to Facebook, Twitter, and Instagram
  • πŸ”” Push Notifications - Firebase Cloud Messaging for instant alerts
  • πŸ“Š Analytics - PostHog integration for user insights
  • 🌐 Offline Support - Queue messages when offline, sync when online
  • 🎯 Friend System - Discover, add, and manage friends
  • ⚑ High Performance - Built with Jetpack Compose and optimized backend

πŸ—οΈ Architecture

System Overview

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Android App        β”‚
β”‚   (Kotlin/Compose)   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
           β”‚
    β”Œβ”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”
    ↓             ↓
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Backend β”‚  β”‚   Supabase   β”‚
β”‚ Node.js β”‚  β”‚  (Direct)    β”‚
β”‚ Railway β”‚  β”‚  β€’ Realtime  β”‚
β”‚         β”‚  β”‚  β€’ Storage   β”‚
β”‚ β€’ APIs  β”‚  β”‚  β€’ Auth      β”‚
β”‚ β€’ FCM   β”‚  β”‚  β€’ Database  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Tech Stack

Frontend (Android)

  • Language: Kotlin 1.9.22
  • UI: Jetpack Compose + Material 3
  • Architecture: Clean Architecture (MVVM)
  • DI: Hilt
  • Local DB: Room
  • Image Loading: Coil (GIF support)
  • Min SDK: 24 | Target SDK: 34

Backend (Node.js)

  • Runtime: Node.js 18+
  • Framework: Express.js
  • Language: JavaScript (ES6+)
  • Logging: Winston
  • Caching: node-cache
  • Testing: Jest
  • Deployment: Railway (Docker)

Services & APIs

  • Database: Supabase PostgreSQL
  • Authentication: Supabase Auth (Google & Apple)
  • Real-time: Supabase Realtime
  • Storage: Supabase Storage
  • Push Notifications: Firebase Cloud Messaging (FCM ONLY)
  • Analytics: PostHog
  • GIF APIs: GIPHY SDK + Tenor API
  • Deployment: Railway

πŸ“‚ Project Structure

jiffy/
β”œβ”€β”€ app/                    # Android app
β”‚   β”œβ”€β”€ src/main/
β”‚   β”‚   β”œβ”€β”€ java/com/darshan/jiffy/
β”‚   β”‚   β”‚   β”œβ”€β”€ data/
β”‚   β”‚   β”‚   β”œβ”€β”€ domain/
β”‚   β”‚   β”‚   β”œβ”€β”€ presentation/
β”‚   β”‚   β”‚   └── di/
β”‚   β”‚   └── res/
β”‚   └── build.gradle.kts
β”‚
β”œβ”€β”€ backend/                # Node.js backend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ config/        # Configuration
β”‚   β”‚   β”œβ”€β”€ controllers/   # Request handlers
β”‚   β”‚   β”œβ”€β”€ middleware/    # Express middleware
β”‚   β”‚   β”œβ”€β”€ routes/        # API routes
β”‚   β”‚   β”œβ”€β”€ services/      # Business logic
β”‚   β”‚   β”œβ”€β”€ utils/         # Utilities
β”‚   β”‚   └── server.js      # Main server
β”‚   β”œβ”€β”€ tests/             # Backend tests
β”‚   β”œβ”€β”€ scripts/           # Deployment scripts
β”‚   β”œβ”€β”€ Dockerfile
β”‚   β”œβ”€β”€ railway.json
β”‚   β”œβ”€β”€ package.json
β”‚   └── README.md          # Backend docs
β”‚
β”œβ”€β”€ database/
β”‚   └── schema.sql         # Supabase PostgreSQL schema
β”‚
β”œβ”€β”€ .github/
β”‚   β”œβ”€β”€ workflows/
β”‚   β”‚   └── backend-ci.yml # Backend CI/CD
β”‚   └── ISSUE_TEMPLATE/
β”‚
β”œβ”€β”€ README.md              # This file
β”œβ”€β”€ TECH_STACK.md
β”œβ”€β”€ SETUP.md
β”œβ”€β”€ BACKEND_INTEGRATION.md
└── LICENSE

πŸš€ Getting Started

Prerequisites

For Android Development:

  • Android Studio Hedgehog (2023.1.1+)
  • JDK 17+
  • Android SDK (API 24-34)

For Backend Development:

  • Node.js 18+
  • npm 9+

Required Accounts:

  • Supabase account
  • Firebase account (FCM)
  • GIPHY developer account
  • Google Cloud (Tenor API)
  • PostHog account
  • Railway account

Quick Start

Android App

# Clone repository
git clone https://github.com/darshanpania/jiffy.git
cd jiffy

# Configure Android
cp local.properties.example local.properties
# Edit local.properties with API keys

# Build
./gradlew assembleDebug

Backend

# Navigate to backend
cd backend

# Install dependencies
npm install

# Configure environment
cp .env.example .env
# Edit .env with credentials

# Run development server
npm run dev

# Server starts at http://localhost:3000

Full Setup Guide

See SETUP.md for complete setup instructions.


πŸ”— Backend Integration

When to Use Backend vs Supabase Direct

Use Backend API:

  • 🎨 GIF search (GIPHY/Tenor) - caching + security
  • πŸ”” Push notifications (FCM) - token management
  • πŸ“Š Analytics aggregation (future)

Use Supabase Direct:

  • πŸ’¬ Real-time messaging - WebSocket efficiency
  • πŸ’Ύ Database CRUD - RLS security
  • πŸ“ File uploads - Direct to Storage
  • πŸ” Authentication - OAuth flows

See BACKEND_INTEGRATION.md for details.


πŸ“‘ API Endpoints

Backend provides RESTful API:

  • Auth: /api/auth/*
  • Users: /api/users/*
  • Chats: /api/chats/*
  • GIFs: /api/gifs/*
  • Notifications: /api/notifications/*

Full API documentation: backend/API.md


πŸ—„οΈ Database

Supabase PostgreSQL (12 Tables):

  1. profiles - User profiles
  2. friendships - Friend relationships
  3. friend_requests - Friend requests
  4. chat_rooms - Chat metadata
  5. chat_participants - Chat membership
  6. messages - All messages
  7. favorite_gifs - Saved GIFs
  8. user_devices - FCM tokens
  9. group_settings - Group config
  10. group_invites - Group invitations
  11. message_reads - Read receipts
  12. chat_notification_preferences - Notification settings

All protected by Row Level Security (RLS)

Schema: database/schema.sql


πŸš€ Deployment

Android App

  • Build: ./gradlew assembleRelease
  • Distribution: Google Play Store
  • Signing: Configure in app/build.gradle.kts

Backend

  • Platform: Railway
  • Method: Docker (Dockerfile)
  • Deploy: railway up or GitHub push
  • URL: https://your-app.railway.app

Deployment guide: backend/DEPLOYMENT.md


πŸ§ͺ Testing

Android Tests

# Unit tests
./gradlew test

# UI tests
./gradlew connectedAndroidTest

Backend Tests

cd backend

# Run tests
npm test

# With coverage
npm test -- --coverage

πŸ“š Documentation

For Developers

Backend Specific

Contributing


🎯 Roadmap

Phase 1: MVP Core (Weeks 1-8) βœ… Planned

  • Authentication (Google/Apple)
  • User profiles
  • Friend system
  • One-on-one chat
  • GIF integration (GIPHY + Tenor)

Phase 2: Enhanced Features (Weeks 9-12) βœ… Planned

  • Group chats (100 members)
  • Social media sharing
  • Read receipts
  • Enhanced notifications

Phase 3: Polish & Release (Weeks 13-16) βœ… Planned

  • Comprehensive testing
  • Load testing
  • Security audit
  • Beta testing
  • Production launch

Track progress: Issue #49 - Master Roadmap


πŸ” Security & Privacy

Security Features

  • βœ… Supabase Row Level Security (RLS)
  • βœ… JWT authentication
  • βœ… OAuth 2.0 (Google/Apple)
  • βœ… Encrypted token storage
  • βœ… ProGuard/R8 obfuscation
  • βœ… HTTPS only
  • βœ… Backend rate limiting

Privacy

  • βœ… GDPR compliant
  • βœ… No password storage (OAuth only)
  • βœ… PostHog privacy-focused
  • βœ… No message content in analytics
  • βœ… User data control

🀝 Contributing

We welcome contributions! See CONTRIBUTING.md.

# Fork and clone
git clone https://github.com/YOUR_USERNAME/jiffy.git

# Create feature branch
git checkout -b feature/amazing-feature

# Commit changes
git commit -m 'feat: add amazing feature'

# Push and create PR
git push origin feature/amazing-feature

πŸ“„ License

MIT License - see LICENSE


πŸ‘₯ Team

Project Lead: Darshan Pania
GitHub: @darshanpania
Email: dev@jiffy.app


πŸ™ Acknowledgments


πŸ“ž Support


🌟 Quick Links

Android

Backend

Project


Made with ❀️ using Kotlin, Node.js, and Supabase

Website β€’ Twitter β€’ Instagram

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors