A modern, feature-rich video chat platform that brings people together across continents, cultures, and languages.
๐ Quick Start โข โจ Features โข ๐ Documentation โข ๐ ๏ธ API Reference
ConnectSphere is a next-generation video chat platform designed to connect people from around the world through secure, real-time video communication. Built with cutting-edge web technologies, it offers a comprehensive suite of features including smart matching, gamification, premium subscriptions, and robust safety controls.
Perfect for:
-
๐ค Making new friends across the globe
-
๐ฃ๏ธ Practicing foreign languages with native speakers
-
๐ Exploring different cultures and perspectives
-
๐ฎ Meeting people who share your interests
-
๐ Learning and cultural exchange
-
๐ฅ HD Video Chat - Real-time peer-to-peer video streaming
-
๐ฎ Smart Matching - Partner matching based on interests, language, and preferences
-
๐ No Login Required - Start chatting instantly without creating an account
-
๐ 100% Free - All features are completely free with no subscriptions or paywalls
-
๐ก๏ธ Safety First - Comprehensive moderation, reporting, and teen safety features
-
๐ Global Reach - Connect with users from around the world
-
โก Optimized - Adaptive bitrate streaming and connection quality monitoring
-
๐ Anonymous - Chat privately without revealing your identity
- Interest-Based Matching - Select up to 5 interests for better connections
- Language Preferences - Match with users who speak your languages
- Age Range Filter - Connect with users in your preferred age range (13+)
- Country Filtering - Match by country or go global
- Queue Statistics - Real-time queue status and estimated wait times
- Safe Mode - Match only with verified users
|
Interest-Based Matching
Language Preferences
|
Advanced Filtering
|
|
Statistics Dashboard
Achievement System Unlock 8 built-in achievements:
|
Leaderboard
More Achievements
|
|
5 Beautiful Themes
Advanced Settings
|
Keyboard Shortcuts
Connection Monitoring
|
| ๐ Free | ๐ Premium ($4.99/mo) | ๐ VIP ($9.99/mo) |
|---|---|---|
|
โ
Basic matching |
โ
All Free features |
โ
All Premium features |
Virtual Currency System
- ๐ฐ Earn coins through daily logins and achievements
- ๐ Purchase coin packages ($0.99 - $14.99)
- ๐ Spend on profile boosts (100 coins = 24hr boost)
- ๐ Buy virtual gifts for chat partners
- ๐ Complete transaction history
|
Enhanced Reporting 6 detailed report categories:
Features:
|
Teen Safety Mode (Ages 13+)
Additional Protection
|
- Adaptive Bitrate Streaming - Auto-adjusts video quality (240p-1080p) based on connection
- Connection Quality Monitoring - Real-time latency, bandwidth, packet loss, and jitter tracking
- Bandwidth Saver Mode - Reduce data usage by up to 60% (perfect for mobile)
- Network Diagnostics - Built-in speed tests and connection recommendations
- Device Optimization - Auto-detect and optimize for mobile/low-end devices
- Quality Presets - High (720p/1080p), Medium (480p), Low (240p)
Before you begin, ensure you have the following installed and configured:
- โ Node.js 18+ (includes npm)
- โ Modern Browser with WebRTC support (Chrome, Firefox, Edge, Safari)
- โ Camera & Microphone (for video chat)
-
๐ Google OAuth 2.0 Credentials - Get credentials
-
๐ Apple Developer Account - Sign in with Apple setup
-
Node.js 18+ (for both frontend and backend)
-
npm or yarn package manager
-
Camera and Microphone (for video chat functionality)
-
HTTPS (required for camera/microphone access in browsers)
-
Modern Browser with WebRTC support (Chrome, Firefox, Edge, Safari)
Note: You can use mock authentication for local development without OAuth credentials.
# Clone the repository
git clone <repository-url>
cd connectsphere
# Install frontend dependencies
npm install
# Install backend dependencies
cd server
npm install
cd ..Frontend - Create .env in project root:
VITE_API_URL=http://localhost:3001/api
VITE_WS_URL=http://localhost:3001
VITE_GOOGLE_CLIENT_ID=your_google_client_id
VITE_APPLE_CLIENT_ID=com.your.bundle.idBackend - Create server/.env:
PORT=3001
CLIENT_URL=http://localhost:3000
GOOGLE_CLIENT_ID=your_google_client_id_here
APPLE_CLIENT_ID=com.your.bundle.id
ALLOW_MOCK_AUTH=true # Set to false in production
DATABASE_PATH=./data/connectsphere.dbDevelopment Tip: Set
ALLOW_MOCK_AUTH=trueto bypass OAuth during development.
Option A: Two Terminal Windows
# Terminal 1 - Backend Server
cd server
npm run dev
# Server runs on http://localhost:3001
# Terminal 2 - Frontend (in new terminal)
npm run dev
# App runs on http://localhost:3000Option B: One-Command Start (requires concurrently)
npm install -g concurrently
concurrently "cd server && npm run dev" "npm run dev"- ๐ Frontend: http://localhost:3000
- ๐ง Backend API: http://localhost:3001/api
- ๐ Health Check: http://localhost:3001/api/health
For running on Android devices using Termux:
connectsphere/
โโโ components/ # React UI components
โ โโโ AchievementBadge.tsx
โ โโโ AdvancedSettingsPanel.tsx
โ โโโ AgeVerification.tsx
โ โโโ BandwidthSaverMode.tsx
โ โโโ ChatHistory.tsx
โ โโโ ChatInput.tsx
โ โโโ ChatScreen.tsx
โ โโโ ConnectionQualityIndicator.tsx
โ โโโ Controls.tsx
โ โโโ EnhancedReportModal.tsx
โ โโโ InterestSelector.tsx
โ โโโ KeyboardShortcutsPanel.tsx
โ โโโ LanguageSelector.tsx
โ โโโ LeaderboardPanel.tsx
โ โโโ LoginScreen.tsx
โ โโโ NetworkDiagnostics.tsx
โ โโโ QueueStatsDisplay.tsx
โ โโโ SettingsScreen.tsx
โ โโโ StatsPanel.tsx
โ โโโ TeenSafetyMode.tsx
โ โโโ ThemeSelector.tsx
โ โโโ Toast.tsx
โ โโโ VideoPlayer.tsx
โโโ services/ # Frontend services
โ โโโ api.ts # REST API client
โ โโโ connectionOptimization.ts
โ โโโ socketService.ts # WebSocket client
โ โโโ yoloService.ts # Gender detection service
โ โโโ yolo.worker.ts # Web Worker for ML
โโโ server/ # Backend server
โ โโโ database/
โ โ โโโ db.js # SQLite database & queries
โ โโโ middleware/
โ โ โโโ auth.js # Authentication middleware
โ โ โโโ teenSafety.js # Teen safety middleware
โ โโโ routes/
โ โ โโโ auth.js # Authentication endpoints
โ โ โโโ settings.js # User settings
โ โ โโโ stats.js # Statistics & leaderboard
โ โ โโโ users.js # User management
โ โโโ services/
โ โ โโโ appleAuth.js # Apple authentication
โ โ โโโ matching.js # Partner matching algorithm
โ โโโ socket/
โ โ โโโ socketHandler.js # WebSocket handlers
โ โโโ index.js # Express server entry point
โโโ App.tsx # Main React component
โโโ index.tsx # React DOM entry point
โโโ types.ts # TypeScript definitions
โโโ constants.ts # App constants
โโโ vite.config.ts # Vite configuration
```bash
# Install Node.js in Termux
pkg install nodejs
# Run the full stack
cd /workspace && npm install && cd server && npm install && cd .. && \
echo "PORT=3001" > server/.env && \
echo "CLIENT_URL=http://localhost:3000" >> server/.env && \
echo "ALLOW_MOCK_AUTH=true" >> server/.env && \
(cd server && npm start &) && sleep 3 && npm run dev
connectsphere/
โโโ ๐ฑ Frontend (React + TypeScript)
โ โโโ components/ # UI components
โ โโโ services/ # API & WebSocket services
โ โโโ types.ts # TypeScript definitions
โ โโโ constants.ts # App constants
โ โโโ App.tsx # Main app component
โ
โโโ ๐ง Backend (Node.js + Express)
โ โโโ server/
โ โ โโโ routes/ # API endpoints
โ โ โโโ services/ # Business logic
โ โ โโโ middleware/ # Auth & validation
โ โ โโโ socket/ # WebSocket handlers
โ โ โโโ database/ # SQLite database
โ โ โโโ index.js # Server entry point
โ
โโโ ๐ Documentation
โโโ README.md # This file
โโโ FEATURES_ADDED.md # Feature documentation
โโโ QUICK_START.md # Integration guide
โโโ TEEN_SAFETY.md # Safety features guide
components/
โโโ ๐ฏ Matching & Discovery
โ โโโ InterestSelector.tsx # Interest tag selection
โ โโโ LanguageSelector.tsx # Language preferences
โ โโโ QueueStatsDisplay.tsx # Queue statistics
โ
โโโ ๐ Gamification
โ โโโ StatsPanel.tsx # User statistics dashboard
โ โโโ AchievementBadge.tsx # Achievement display
โ โโโ LeaderboardPanel.tsx # Global leaderboard
โ
โโโ ๐จ User Experience
โ โโโ ThemeSelector.tsx # Theme switcher
โ โโโ AdvancedSettingsPanel.tsx # Advanced settings
โ โโโ KeyboardShortcutsPanel.tsx # Keyboard shortcuts
โ โโโ Toast.tsx # Toast notifications
โ
โโโ ๐ Premium
โ โโโ PremiumModal.tsx # Subscription management
โ
โโโ ๐ก๏ธ Security
โ โโโ EnhancedReportModal.tsx # User reporting
โ โโโ TeenSafetyMode.tsx # Teen safety features
โ โโโ AgeVerification.tsx # Age verification
โ
โโโ โก Performance
โ โโโ ConnectionQualityIndicator.tsx # Quality monitoring
โ โโโ BandwidthSaverMode.tsx # Data optimization
โ โโโ NetworkDiagnostics.tsx # Network testing
โ
โโโ ๐ฌ Chat
โโโ ChatScreen.tsx # Main chat interface
โโโ ChatInput.tsx # Message input
โโโ ChatHistory.tsx # Message history
โโโ VideoPlayer.tsx # Video display
โโโ Controls.tsx # Video controls
9 Core Tables:
users- User accounts and profilesuser_settings- Advanced preferencesuser_interests- Interest tagsuser_languages- Language preferencesuser_stats- Gamification statisticsachievements- Achievement definitionsuser_achievements- User progressratings- User ratings after chatstransactions- Premium purchases & coins
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
POST |
/api/auth/google |
Google OAuth authentication | No |
POST |
/api/auth/apple |
Sign in with Apple | No |
POST |
/api/auth/mock |
Mock authentication (dev only) | No |
POST |
/api/auth/logout |
Logout and invalidate session | Yes |
GET |
/api/auth/verify |
Verify session token | Yes |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/api/users/me |
Get current user profile | Yes |
PUT |
/api/users/me |
Update user profile | Yes |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/api/stats/me |
Get user statistics | Yes |
GET |
/api/stats/leaderboard |
Get global leaderboard (top 100) | Yes |
POST |
/api/stats/rate |
Rate a chat partner (1-5 stars) | Yes |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
POST |
/api/premium/upgrade |
Upgrade subscription tier | Yes |
POST |
/api/premium/coins/purchase |
Purchase coin package | Yes |
POST |
/api/premium/boost |
Activate profile boost (100 coins) | Yes |
POST |
/api/premium/username |
Set custom username | Yes (Premium) |
GET |
/api/premium/transactions |
Get transaction history | Yes |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/api/settings/me |
Get all user settings | Yes |
PUT |
/api/settings/advanced |
Update advanced settings | Yes |
PUT |
/api/settings/interests |
Update interest tags (max 5) | Yes |
PUT |
/api/settings/languages |
Update languages (max 3) | Yes |
// Authentication
socket.emit('authenticate', { token: 'jwt_token_here' });
// Matching Queue
socket.emit('join-queue', { interests, languages, ageRange, country });
socket.emit('leave-queue');
// Chat
socket.emit('send-message', { message: 'Hello!', recipientId: 'user_id' });
socket.emit('end-match');
socket.emit('report-user', { userId, category, description });
// WebRTC Signaling
socket.emit('offer', { offer, target: 'user_id' });
socket.emit('answer', { answer, target: 'user_id' });
socket.emit('ice-candidate', { candidate, target: 'user_id' });// Matching
socket.on('match-found', (partnerData) => { /* ... */ });
socket.on('match-ended', (reason) => { /* ... */ });
// Chat
socket.on('new-message', (message) => { /* ... */ });
socket.on('partner-typing', (isTyping) => { /* ... */ });
// WebRTC Signaling
socket.on('offer', (data) => { /* ... */ });
socket.on('answer', (data) => { /* ... */ });
socket.on('ice-candidate', (data) => { /* ... */ });
// System
socket.on('error', (error) => { /* ... */ });| Technology | Version | Purpose |
|---|---|---|
| React | 19.2.0 | UI framework with modern hooks |
| TypeScript | 5.8.2 | Type-safe development |
| Vite | 6.2.0 | Lightning-fast build tool & dev server |
| Socket.io Client | 4.5.4 | Real-time WebSocket communication |
| Lucide React | 0.552.0 | Beautiful, customizable icons |
| Tailwind CSS | - | Utility-first CSS framework |
| Technology | Purpose |
|---|---|
| Node.js 18+ | JavaScript runtime environment |
| Express | Fast, minimalist web framework |
| Socket.io | Real-time bidirectional event-based communication |
| SQLite (better-sqlite3) | Lightweight, serverless database |
| Google Auth Library | OAuth 2.0 authentication |
| JOSE | JWT handling for Apple Sign-In |
| Helmet | Security middleware for Express |
| Express Rate Limit | API rate limiting protection |
- WebSocket (Socket.io) - Real-time signaling and chat messages
- WebRTC - Peer-to-peer video/audio streaming (signaling layer complete)
- REST API - HTTP endpoints for data operations
- ๐ Complete Feature List - Detailed documentation of all 50+ features
- ๐ Quick Start Guide - Integration examples and usage patterns
- ๐ก๏ธ Teen Safety Guide - Age 13+ safety features and parental controls
- ๐ Integration Example - Code examples for developers
- ๐ Age 13+ Summary - Summary of teen safety features
Getting Started:
- Read this README to understand the architecture
- Check QUICK_START.md for integration examples
- Review FEATURES_ADDED.md for detailed feature documentation
- Explore the codebase starting with
App.tsx
Understanding the Flow:
- User authenticates via Google/Apple OAuth
- Socket connection established with JWT token
- User joins queue with preferences (interests, languages, age, country)
- Backend matching algorithm finds compatible partner
- WebRTC signaling establishes peer-to-peer video connection
- Users chat with text and video
- After chat, users can rate each other and unlock achievements
# API Configuration
VITE_API_URL=http://localhost:3001/api
VITE_WS_URL=http://localhost:3001
# Google OAuth
VITE_GOOGLE_CLIENT_ID=123456789.apps.googleusercontent.com
# Apple Sign In
VITE_APPLE_CLIENT_ID=com.yourcompany.connectsphere
VITE_APPLE_REDIRECT_URI=http://localhost:3000/auth/apple/callback
VITE_APPLE_SCOPE=name email # Optional: space-separated scopes# Server Configuration
PORT=3001
NODE_ENV=development # or 'production'
# CORS Configuration
CLIENT_URL=http://localhost:3000
# Optional: Multiple allowed origins (comma-separated)
CLIENT_URLS=http://localhost:3000,https://connectsphere.com
# Authentication
GOOGLE_CLIENT_ID=123456789.apps.googleusercontent.com
APPLE_CLIENT_ID=com.yourcompany.connectsphere
# Optional: Multiple Apple client IDs (comma-separated)
APPLE_CLIENT_IDS=com.yourcompany.connectsphere,com.yourcompany.connectsphere.web
# Development
ALLOW_MOCK_AUTH=false # Set to 'true' only for local testing without OAuth
# Database
DATABASE_PATH=./data/connectsphere.db # Relative or absolute pathRate Limiting (modify in server/index.js):
const limiter = rateLimit({
windowMs: 15 * 60 * 1000, // 15 minutes
max: 100, // Limit each IP to 100 requests per windowMs
});Session Configuration:
// JWT token expiration (default: 7 days)
const TOKEN_EXPIRATION = '7d';WebRTC Configuration (modify in frontend):
const iceServers = [
{ urls: 'stun:stun.l.google.com:19302' },
// Add TURN servers for production
];- โ๏ธ Helmet.js - Sets secure HTTP headers
- โ๏ธ Rate Limiting - Prevents API abuse (100 req/15min per IP)
- โ๏ธ JWT Authentication - Secure session tokens
- โ๏ธ CORS Protection - Configurable allowed origins
- โ๏ธ Input Validation - Server-side validation on all inputs
- โ๏ธ SQL Injection Protection - Parameterized queries only
- โ๏ธ XSS Protection - Content sanitization
- โ๏ธ HTTPS Ready - Designed for secure deployment
- โ๏ธ Teen Safety - Age-appropriate protections and time limits
Before deploying to production:
- Disable mock authentication (
ALLOW_MOCK_AUTH=false) - Configure proper CORS origins (no wildcards)
- Enable HTTPS/TLS (required for WebRTC)
- Set up TURN servers for NAT traversal
- Configure rate limiting thresholds appropriately
- Implement CSRF protection
- Set secure cookie flags (
httpOnly,secure,sameSite) - Add logging and monitoring (Winston, Sentry)
- Implement input sanitization everywhere
- Set up automated security scanning
- Configure database backups
- Review and update dependencies regularly
- Implement admin dashboard for moderation
- Set up payment processing securely (PCI compliance)
Problem: Camera or microphone not working
Solutions:
- โ Ensure you're using HTTPS (or localhost for development)
- โ Check browser permissions - grant camera/microphone access
- โ Verify devices aren't being used by another application
- โ Try a different browser (Chrome recommended)
- โ Check device drivers are up to date
- โ Test on https://www.webrtc-experiment.com/DetectRTC/
Problem: Socket connection failed / Cannot connect to server
Solutions:
- โ
Verify backend server is running (
http://localhost:3001/api/health) - โ
Check
VITE_WS_URLin frontend.envfile - โ Ensure firewall allows port 3001
- โ
Verify CORS configuration in
server/.env - โ Check browser console for specific error messages
- โ Try disabling VPN or proxy
Problem: Database connection/query failures
Solutions:
- โ
Ensure
server/data/directory exists (create if missing) - โ Check file permissions on database file
- โ Verify SQLite is properly installed
- โ
Try deleting database file to reset:
rm server/data/connectsphere.dbโ ๏ธ (data loss) - โ
Check database path in
server/.env
Problem: Build fails or dependencies won't install
Solutions:
- โ
Clear node_modules:
rm -rf node_modules package-lock.json && npm install - โ
Verify Node.js version:
node --version(must be 18+) - โ Check all environment variables are set correctly
- โ
Look for port conflicts:
lsof -i :3000orlsof -i :3001 - โ
Try cleaning Vite cache:
rm -rf node_modules/.vite - โ
Update npm:
npm install -g npm@latest
Problem: Login fails or auth errors
Solutions:
- โ Verify Google/Apple OAuth credentials are correct
- โ Check OAuth redirect URIs match your domain exactly
- โ
Ensure
ALLOW_MOCK_AUTH=trueis set for development without OAuth - โ Check browser console and network tab for detailed errors
- โ Verify JWT token is being sent in requests
- โ Clear browser cookies and local storage
Problem: Slow performance or high latency
Solutions:
- โ Enable Bandwidth Saver Mode
- โ Lower video quality in Connection Quality settings
- โ Run Network Diagnostics to test your connection
- โ Close unnecessary browser tabs and applications
- โ Check CPU usage - video processing is intensive
- โ Ensure adequate internet bandwidth (min 1 Mbps recommended)
-
Video Streaming
- Currently uses sample video files for demonstration
- WebRTC signaling layer is fully implemented
- Peer-to-peer video streaming needs final integration
- STUN/TURN servers required for production NAT traversal
-
Gender Detection
- Uses COCO-SSD object detection model as simulation
- Production deployment requires specialized gender detection ML model
- Current implementation is for demonstration purposes
-
Database
- SQLite used for development and small deployments
- Consider PostgreSQL or MySQL for high-scale production
- Current schema supports thousands of concurrent users
- Implement connection pooling for production
-
Payment Processing
- Premium subscriptions and coin purchases currently simulated
- Requires integration with Stripe, PayPal, or similar
- Webhooks needed for subscription management
- Set up production server (VPS, cloud instance, etc.)
- Configure HTTPS with valid SSL certificate (Let's Encrypt)
- Set up reverse proxy (Nginx, Apache)
- Configure firewall rules and security groups
- Set up CDN for static assets (CloudFlare, AWS CloudFront)
- Configure load balancing if needed
- Complete WebRTC peer-to-peer video implementation
- Configure STUN servers (free: Google STUN)
- Set up TURN servers for NAT traversal (coturn, Twilio)
- Test video quality across different networks
- Implement reconnection logic for dropped connections
- Migrate to PostgreSQL/MySQL for production
- Set up automated database backups (daily minimum)
- Configure database replication for high availability
- Implement database connection pooling
- Set up monitoring and alerting
- Integrate real gender detection model
- Set up ML model serving (TensorFlow Serving, ONNX Runtime)
- Implement model versioning and A/B testing
- Add content moderation AI (inappropriate content detection)
- Set up application logging (Winston, Pino)
- Configure error tracking (Sentry, Rollbar)
- Implement analytics (Google Analytics, Mixpanel)
- Set up uptime monitoring (UptimeRobot, Pingdom)
- Configure performance monitoring (New Relic, Datadog)
- Set up log aggregation (ELK stack, Splunk)
- Implement CSRF protection
- Add comprehensive input validation and sanitization
- Set up Web Application Firewall (WAF)
- Configure DDoS protection
- Implement session management best practices
- Add security headers (already using Helmet, review config)
- Set up vulnerability scanning
- Conduct security audit and penetration testing
- Integrate payment processor (Stripe, PayPal, Braintree)
- Implement subscription webhooks and management
- Add invoice generation and email delivery
- Ensure PCI DSS compliance for payment handling
- Implement refund and cancellation workflows
- Set up payment failure retry logic
- Implement admin dashboard for moderation
- Set up automated content filtering
- Create moderation queue and workflows
- Implement user appeal system
- Add automated ban/timeout system
- Create trust & safety team processes
- Add Terms of Service
- Add Privacy Policy
- Implement GDPR compliance (EU users)
- Add COPPA compliance (users under 13, if applicable)
- Implement user data export functionality
- Add account deletion functionality
- Set up abuse reporting to authorities system
- Optimize database queries with proper indexing
- Implement Redis for session storage and caching
- Set up database query caching
- Optimize frontend bundle size (code splitting)
- Implement lazy loading for images and components
- Set up browser caching headers
- Optimize video encoding and compression
We welcome contributions from the community! Here's how you can help make ConnectSphere better:
- ๐ Report Bugs - Open an issue with detailed reproduction steps
- โจ Suggest Features - Share your ideas for new features
- ๐ Improve Documentation - Help make our docs clearer
- ๐ง Submit Pull Requests - Fix bugs or add new features
- ๐ Translations - Help translate the app to other languages
- ๐จ Design - Contribute UI/UX improvements
-
Fork the Repository
git clone https://github.com/yourusername/connectsphere.git cd connectsphere -
Create a Feature Branch
git checkout -b feature/amazing-feature # or git checkout -b bugfix/fix-issue-123 -
Make Your Changes
- Follow existing code style and conventions
- Add TypeScript types for all new code
- Write clear, descriptive commit messages
- Add comments for complex logic
-
Test Your Changes
- Test locally with
npm run dev - Verify both frontend and backend work correctly
- Test on multiple browsers if UI changes
- Ensure no console errors or warnings
- Test locally with
-
Commit Your Changes
git add . git commit -m "Add amazing feature: description of what it does"
-
Push and Create Pull Request
git push origin feature/amazing-feature
Then open a Pull Request on GitHub with:
- Clear description of changes
- Screenshots/videos for UI changes
- Link to related issues
- Testing instructions
TypeScript Best Practices:
// โ
Good: Properly typed function
const calculateStats = (userId: string): UserStats => {
// Implementation
};
// โ Bad: Using 'any' type
const calculateStats = (userId: any): any => {
// Implementation
};React Best Practices:
- โ Use functional components with hooks
- โ Keep components small and focused (< 200 lines)
- โ Extract reusable logic into custom hooks
- โ Use meaningful component and variable names
- โ Implement proper error boundaries
- โ
Memoize expensive computations with
useMemo - โ
Use
useCallbackfor callback props
Component Structure:
// โ
Good structure
import React, { useState, useEffect } from 'react';
import { SomeType } from '../types';
interface MyComponentProps {
userId: string;
onClose: () => void;
}
export const MyComponent: React.FC<MyComponentProps> = ({ userId, onClose }) => {
// Hooks at the top
const [data, setData] = useState<SomeType | null>(null);
// Effects
useEffect(() => {
// Effect logic
}, [userId]);
// Event handlers
const handleClick = () => {
// Handler logic
};
// Render
return (
<div className="component-container">
{/* JSX */}
</div>
);
};Commit Message Format:
# Format: <type>: <description>
feat: Add user profile boost feature
fix: Resolve socket disconnection issue
docs: Update API documentation
style: Format code with prettier
refactor: Simplify matching algorithm
test: Add tests for rating system
chore: Update dependenciesWhen reporting bugs, please include:
- Description - Clear description of the bug
- Steps to Reproduce - Detailed steps to recreate the issue
- Expected Behavior - What should happen
- Actual Behavior - What actually happens
- Screenshots/Videos - Visual proof of the bug
- Environment - Browser, OS, Node.js version
- Console Errors - Any error messages from console
| Metric | Count |
|---|---|
| ๐ฆ Total Components | 25+ React components |
| ๐ API Endpoints | 20+ REST endpoints |
| ๐ WebSocket Events | 15+ real-time events |
| ๐๏ธ Database Tables | 9 normalized tables |
| ๐ฏ Features | 50+ user-facing features |
| ๐ Achievements | 8 built-in achievements |
| ๐จ Themes | 5 beautiful themes |
| ๐ Languages | 17+ language options |
| ๐ฎ Interests | 18+ interest categories |
| ๐ Subscription Tiers | 3 tiers (Free, Premium, VIP) |
This project is part of the ConnectSphere application. All rights reserved.
For licensing inquiries, please contact the project maintainers.
|
React |
TypeScript |
Node.js |
Socket.io |
- React Team - For the amazing UI framework
- Socket.io Team - For real-time communication
- Tailwind CSS - For the utility-first CSS framework
- Lucide Icons - For beautiful, consistent icons
- Vite Team - For lightning-fast development experience
- All Contributors - Thank you for making ConnectSphere better!
ConnectSphere was built to bring people together across geographical, cultural, and linguistic boundaries. We believe in the power of human connection and the potential of technology to make the world a smaller, more connected place.
Built with โค๏ธ using React, TypeScript, Node.js, and Socket.io
View Project โข Report Bug โข Request Feature
Last Updated: November 2025