A modern social photo sharing and event management application with AI-powered face recognition, built with React and Firebase.
- Create & Organize Events: Plan gatherings with date, location, and description
- Member Management: Invite friends and manage event participants
- Event Statistics: Track photo uploads, member activity, and event engagement
- Real-time Updates: See live changes as members interact with events
- Bulk Photo Upload: Upload multiple photos simultaneously with drag-and-drop
- AI-Powered Face Recognition: Automatically identify and tag people in photos using face-api.js
- Face Profile Management: Train the system to recognize you and your friends
- Photo Gallery: Beautiful grid and masonry layouts for browsing event photos
- Download Options: Download individual photos or entire event albums as ZIP files
- Photo Filtering: Find your photos instantly with AI face matching
- Friend System: Connect with friends and manage relationships
- User Presence: See who's online in real-time
- Event Invitations: Send and receive event invites
- User Profiles: Customizable profiles with bio, location, and profile pictures
- Dark/Light Mode: Seamless theme switching with system preference detection
- Responsive Design: Optimized for desktop, tablet, and mobile devices
- Accessibility: WCAG-compliant with keyboard navigation and screen reader support
- Smooth Animations: Page transitions and interactive UI elements
- Performance Optimized: Lazy loading, code splitting, and efficient rendering
- Email Verification: Secure account verification system
- Password Reset: Safe password recovery flow
- Protected Routes: Authentication-required pages and resources
- Firestore Security Rules: Server-side data access control
- Turnstile CAPTCHA: Bot protection for authentication
- Free Tier: Basic features for casual users
- Pro Plan: Enhanced limits via Stripe integration
- Usage Tracking: Monitor photo uploads and storage consumption
- Plan Enforcement: Automatic limit enforcement based on subscription tier
- Framework: React 19 with Hooks
- Build Tool: Vite 6
- Routing: React Router DOM 7
- Styling: Tailwind CSS 3 with custom theme
- UI Components:
- Radix UI primitives
- Material-UI components
- Custom component library
- Lucide & Phosphor icons
- Backend: Firebase (Firestore, Storage, Functions, Hosting)
- Authentication: Firebase Auth with custom email verification
- Database: Cloud Firestore with real-time sync
- Storage: Firebase Cloud Storage for photos
- Functions: Node.js 20 serverless functions
- Email: Nodemailer with custom HTML templates
- Payments: Stripe integration for subscriptions
- Face Detection: face-api.js (SSD MobileNetV1)
- Face Recognition: 128D face descriptors with Euclidean distance matching
- Face Landmarks: 68-point facial landmark detection
- Age/Gender: Optional demographic analysis
- Expression Detection: Emotion recognition capabilities
- Testing: Jest with React Testing Library
- Linting: ESLint with React plugins
- Version Control: Git with conventional commits
- Package Manager: npm with workspaces
- CI/CD: Firebase Hosting with GitHub integration
Groupify/
βββ client/ # Frontend React application
β βββ public/ # Static assets
β β βββ models/ # Face recognition ML models
β β βββ groupifyLogo.png # App logo
β βββ src/
β β βββ auth-area/ # Authentication module
β β β βββ components/ # Auth UI components
β β β βββ contexts/ # AuthContext provider
β β β βββ hooks/ # useAuth, useAuthValidation
β β β βββ pages/ # SignIn, SignUp, ForgotPassword, etc.
β β β βββ services/ # authService API
β β βββ dashboard-area/ # Main application area
β β β βββ components/ # Dashboard UI components
β β β βββ features/
β β β β βββ events/ # Event management
β β β β β βββ ViewEvent/ # Event detail page
β β β β β βββ features/
β β β β β β βββ faceRecognition/ # Face detection & matching
β β β β β β βββ gallery/ # Photo grid/masonry
β β β β β β βββ header/ # Event header
β β β β β β βββ members/ # Member management
β β β β β β βββ statistics/ # Event stats
β β β β βββ friends/ # Friend system
β β β β βββ photos/ # Personal photo library
β β β β βββ profile/ # User profile
β β β β βββ settings/ # App settings
β β β βββ hooks/ # Dashboard-specific hooks
β β β βββ pages/ # Dashboard page components
β β βββ public-area/ # Landing and public pages
β β β βββ components/ # Public UI components
β β β βββ pages/ # Landing, About, Contact, etc.
β β β βββ services/ # Public API services
β β βββ shared/ # Shared resources
β β β βββ components/ # Reusable UI components
β β β β βββ accessibility/ # A11y providers
β β β β βββ routing/ # Route controllers
β β β β βββ ui/ # UI primitives
β β β βββ constants/ # App constants
β β β βββ contexts/ # Global contexts (Theme, Friends, Events)
β β β βββ hooks/ # Shared hooks
β β β βββ services/ # Firebase services
β β β β βββ firebase/ # Firebase SDK wrappers
β β β β βββ presence/ # User presence system
β β β βββ utils/ # Utility functions
β β βββ styles/ # Global styles
β β β βββ base/ # Reset & base styles
β β β βββ components/ # Component styles
β β β βββ themes/ # Theme definitions
β β β βββ utilities/ # CSS utilities
β β βββ tests/ # Test suites
β β β βββ __mocks__/ # Test mocks
β β β βββ api/ # API tests
β β β βββ components/ # Component tests
β β β βββ database/ # Firestore query tests
β β βββ App.jsx # Root component
β β βββ main.jsx # App entry point
β βββ index.html # HTML template
β βββ vite.config.js # Vite configuration
β βββ tailwind.config.js # Tailwind configuration
β βββ jest.config.js # Jest configuration
β βββ package.json # Frontend dependencies
βββ functions/ # Firebase Cloud Functions
β βββ email-templates/ # HTML email templates
β β βββ contactus.html # Contact form template
β β βββ resetpassword.html # Password reset template
β β βββ verification.html # Email verification template
β β βββ welcome.html # Welcome email template
β βββ index.js # Functions entry point
β βββ openweather-proxy.js # Weather API proxy
β βββ package.json # Functions dependencies
βββ docs/ # Documentation
β βββ firebaseCollection.txt # Firestore schema
β βββ gitCommands.txt # Git workflow guide
β βββ projectStructure.txt # Project structure
βββ firebase.json # Firebase configuration
βββ firestore.rules # Firestore security rules
βββ firestore.indexes.json # Firestore indexes
βββ storage.rules # Storage security rules
βββ package.json # Root workspace config
- Node.js: v18.x or v20.x (LTS recommended)
- npm: v9.x or higher
- Firebase CLI: Latest version
- Git: For version control
-
Clone the repository
git clone https://github.com/groupify-team/Groupify.git cd Groupify -
Install all dependencies
npm run install-all # Or install individually: # npm install # Root dependencies # cd client && npm install # Frontend dependencies # cd functions && npm install # Functions dependencies
-
Firebase Setup
Create a Firebase project at console.firebase.google.com
Enable the following services:
- Authentication (Email/Password)
- Cloud Firestore
- Cloud Storage
- Cloud Functions
- Hosting
-
Environment Configuration
Create
client/src/shared/services/firebase/config.js:import { initializeApp } from 'firebase/app'; import { getAuth } from 'firebase/auth'; import { getFirestore } from 'firebase/firestore'; import { getStorage } from 'firebase/storage'; import { getFunctions } from 'firebase/functions'; const firebaseConfig = { apiKey: "your-api-key", authDomain: "your-project.firebaseapp.com", projectId: "your-project-id", storageBucket: "your-project.appspot.com", messagingSenderId: "your-sender-id", appId: "your-app-id" }; const app = initializeApp(firebaseConfig); export const auth = getAuth(app); export const db = getFirestore(app); export const storage = getStorage(app); export const functions = getFunctions(app);
-
Configure Function Secrets
Set up required secrets for Cloud Functions:
firebase functions:secrets:set EMAIL_USER firebase functions:secrets:set EMAIL_PASSWORD firebase functions:secrets:set STRIPE_SECRET_KEY firebase functions:secrets:set STRIPE_WEBHOOK_SECRET firebase functions:secrets:set OPENWEATHER_API_KEY
-
Start the development server
npm run dev # Runs: Vite dev server + OpenWeather proxy # Frontend: http://localhost:5173 # Weather Proxy: http://localhost:3001
-
Run Firebase emulators (optional)
firebase emulators:start
-
Run tests
cd client npm test # Run all tests npm run test:watch # Watch mode npm run test:coverage # With coverage report
-
Build the client
npm run build # Output: client/dist/ -
Deploy to Firebase
# Deploy everything npm run deploy # Or deploy individually: npm run deploy:hosting # Frontend only npm run deploy:functions # Functions only npm run deploy:firestore # Rules only npm run deploy:storage # Storage rules only
{
uid: string, // Firebase Auth UID
email: string,
displayName: string,
photoURL: string,
profilePicture: string,
bio: string,
location: string,
birthdate: timestamp,
gender: string,
friends: array, // Array of friend UIDs
events: array, // Array of event IDs
photoCount: number,
emailVerified: boolean,
createdAt: timestamp,
updatedAt: timestamp,
joinedAt: timestamp
}{
id: string,
name: string,
description: string,
location: string,
startDate: timestamp,
endDate: timestamp,
createdBy: string, // User UID
admins: array, // Admin UIDs
members: array, // Member UIDs
photoCount: number,
planAtCreation: string, // 'free' | 'pro'
planLimits: object,
createdAt: timestamp,
updatedAt: timestamp
}{
eventId: string,
uploadedBy: string, // User UID
fileName: string,
originalName: string,
filePath: string,
downloadURL: string,
type: string, // MIME type
size: number, // Bytes
planAtUpload: string,
facesDetected: number,
facesProcessed: boolean,
faceMatches: array, // Array of matched user UIDs
uploadedAt: timestamp,
lastModified: timestamp
}{
userId: string,
images: array, // Training image URLs
method: string, // 'face-api' | 'mediapipe'
engine: string,
metadata: object,
createdAt: timestamp,
updatedAt: timestamp
}{
from: string, // Sender UID
to: string, // Recipient UID
status: string, // 'pending' | 'accepted' | 'rejected'
createdAt: timestamp
}{
eventId: string,
inviterUid: string,
inviteeUid: string,
status: string, // 'pending' | 'accepted' | 'declined'
createdAt: timestamp
}Key features in client/vite.config.js:
- Path aliases (
@/,@auth/,@shared/, etc.) - React plugin with Fast Refresh
- Optimized chunking strategy
- Development server on port 5173
Custom theme extends in client/tailwind.config.js:
- Custom color palette
- Extended spacing scale
- Custom animations
- Dark mode support via class strategy
Services configured in firebase.json:
- Hosting: SPA rewrites, custom headers
- Functions: Node.js 20 runtime
- Firestore: Security rules and indexes
- Storage: Access control rules
- Emulators: Storage on port 9199
client/src/tests/
βββ setup.js # Test environment setup
βββ __mocks__/ # Mock implementations
β βββ firebase.js
βββ api/ # API integration tests
β βββ userServices.test.js
βββ components/ # Component unit tests
β βββ EventCard.test.js
βββ database/ # Firestore query tests
βββ firestoreQueries.test.js
cd client
# All tests
npm test
# Specific test file
npm test EventCard
# Watch mode
npm run test:watch
# Coverage report
npm run test:coverage
# Pricing enforcement tests
npm run test:pricing- Provider:
ThemeContextwith system preference detection - Storage: LocalStorage persistence
- Toggle: Smooth transitions between light/dark modes
- Variables: CSS custom properties for dynamic theming
Edit client/tailwind.config.js to customize:
- Colors and gradients
- Typography scale
- Spacing and sizing
- Border radius
- Shadow depths
- Animation timings
- User signs up with email/password
- Verification code sent via email
- User verifies code to activate account
- Password reset with secure token flow
- Turnstile CAPTCHA for bot protection
- User data readable only by owner or friends
- Events readable by members only
- Photos accessible only to event members
- Admin-only operations protected
- Rate limiting on sensitive operations
- Users can upload to their own folders
- Event photos restricted to event members
- File size and type validation
- Authenticated access required
- Mobile: < 640px
- Tablet: 640px - 1024px
- Desktop: > 1024px
- Touch-optimized interactions
- Swipe gestures on photo galleries
- Responsive navigation patterns
- Optimized image loading
- Code Splitting: Route-based lazy loading
- Image Optimization: Lazy loading with react-lazy-load-image-component
- Memoization: React.memo and useMemo for expensive computations
- Virtual Scrolling: Efficient rendering of large photo lists
- Bundle Analysis: Optimized chunk sizes
- Firestore Indexes: Optimized query performance
- Pagination: Cursor-based pagination for large collections
- Caching: Strategic use of Firebase cache
- Batch Operations: Grouped writes for efficiency
- Model Loading: Progressive model loading
- Worker Threads: Face detection in Web Workers
- Descriptor Caching: Store computed face descriptors
- Threshold Tuning: Optimized matching thresholds
npm run dev # Start client dev server
npm run build # Build client for production
npm run start # Preview production build
npm run install-all # Install all workspace dependencies
npm run deploy # Deploy everything to Firebase
npm run deploy:hosting # Deploy only hosting
npm run deploy:functions # Deploy only functions
npm run deploy:firestore # Deploy only Firestore rules
npm run deploy:storage # Deploy only Storage rules
npm run serve # Serve with Firebase locallynpm run dev # Vite dev server + weather proxy
npm run build # Production build
npm run preview # Preview production build
npm run lint # Run ESLint
npm test # Run Jest tests
npm run test:watch # Jest watch mode
npm run test:coverage # Generate coverage report
npm run test:pricing # Test pricing enforcementnpm run serve # Serve functions locally
npm run deploy # Deploy functions to Firebase
npm run logs # View function logs
npm run shell # Functions shell for testing- 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
- Follow ESLint configuration
- Use Prettier for formatting
- Write meaningful commit messages
- Add tests for new features
- Update documentation
feat: Add new feature
fix: Bug fix
docs: Documentation changes
style: Code style changes
refactor: Code refactoring
test: Add or update tests
chore: Maintenance tasks
This project is proprietary and confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.
- React Team: For the amazing React framework
- Firebase: For the comprehensive backend platform
- Tailwind Labs: For Tailwind CSS
- Vite Team: For the blazing-fast build tool
- face-api.js: For face recognition capabilities
- Radix UI: For accessible component primitives
- React Router: Client-side routing
- React Hot Toast: Elegant notifications
- Lucide Icons: Beautiful icon set
- date-fns: Date manipulation
- JSZip: ZIP file generation
- Stripe: Payment processing
For support, email support@groupify.com or visit our Help Center.
- Website: https://groupify-77202.web.app
- Repository: https://github.com/groupify-team/Groupify
- Documentation: https://docs.groupify.com
- Issue Tracker: https://github.com/groupify-team/Groupify/issues
Made with β€οΈ by the Groupify Team