Skip to content

Heykcer/vibevilaa

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

31 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Vibe Villa 🎭

A mobile-first, anime avatar reality show platform where contestants communicate only through live chats, audiences watch and react in real time, and votes decide eliminations β€” all powered by a high-performance, scalable real-time architecture.


🎯 What is Vibe Villa?

Vibe Villa is a live, streaming reality show application where:

  • 🎭 Contestants hide behind anime avatars and communicate only through live chat
  • πŸ‘οΈ Audiences watch conversations live and react with emojis in real time
  • ⚑ Voting decides eliminations β€” results update instantly
  • πŸ“± Everything happens live, like a real-time stream on mobile

🎯 Main Goals

Goal Description
Real-Time Chat Contestants chat instantly via Socket.io
Massive Audience Supports thousands to millions of concurrent viewers
Fast Voting Live elimination votes without any delay
High Performance No lag during heavy traffic events
Secure Platform Safe login and protected user data
Mobile Optimized Smooth experience on mobile networks

πŸ“‹ Functional Requirements

Contestant Features

  • Login / Register
  • Create profile & select anime avatar
  • Join villa chat room
  • Send & receive messages in real time
  • Participate anonymously

Audience Features

  • Watch live chats
  • Send emoji reactions
  • Cast elimination votes
  • View contestant profiles
  • Receive live updates instantly

Admin Features

  • Monitor chat activity
  • Moderate toxic content
  • Manage contestants
  • Start / stop voting rounds
  • Remove abusive users
  • View analytics and reports

AI Moderation

  • Detect toxic messages
  • Filter spam content
  • Flag abusive behavior
  • Automatically mute harmful users

βš™οΈ Non-Functional Requirements

Requirement Description
Scalability Support millions of concurrent users
Availability App works 24/7 with no downtime
Low Latency Messages appear instantly (<100ms)
Security All user data encrypted and protected
Reliability No data loss during traffic spikes
Performance App stays smooth during live events
Fault Tolerance System recovers automatically from failures
Maintainability Modular, easy to update and improve
Mobile Optimization Low battery and low data usage

πŸ› οΈ Technology Stack

Layer Technology
Mobile App React Native + Expo
Backend API Express.js
Real-Time Communication Socket.io
Database PostgreSQL + Firebase
Cache & Fast Processing Redis
Authentication JWT
Hosting Kubernetes / Cloud
Monitoring Grafana + Prometheus

πŸ—οΈ System Architecture

                β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                β”‚ Mobile Users App β”‚
                β”‚ React Native App β”‚
                β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                         β”‚
              Internet / WebSocket
                         β”‚
         β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
         β”‚                                β”‚
         β–Ό                                β–Ό
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
 β”‚ Express API     β”‚          β”‚ Socket.io Server β”‚
 β”‚ Handles APIs    β”‚          β”‚ Handles Live Chatβ”‚
 β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜          β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚                             β”‚
          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                     β–Ό
             β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
             β”‚ Redis Server β”‚
             β”‚ Fast Memory  β”‚
             β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
                    β”‚
                    β–Ό
           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
           β”‚ PostgreSQL DB    β”‚
           β”‚ Permanent Storageβ”‚
           β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

⚑ Real-Time Chat Flow

Contestant Sends Message
        β”‚
        β–Ό
Socket.io Server Receives Message
        β”‚
        β–Ό
Message Validation (spam check, toxicity check)
        β”‚
        β–Ό
Redis Receives Message (ultra-fast broadcast)
        β”‚
        β–Ό
Audience Instantly Receives Message
        β”‚
        β–Ό
Background Worker Saves to PostgreSQL

πŸ—³οΈ Live Voting Flow

Audience Votes
      β”‚
      β–Ό
Redis Counter Updates Instantly
      β”‚
      β–Ό
Live Results Displayed on All Devices
      β”‚
      β–Ό
Every Few Seconds β†’ Data Saved to PostgreSQL

πŸ—„οΈ Database Design (Simplified)

Table Stores
Users username, password (hashed), avatar, role
Rooms villa room info, room status
Messages message text, sender, timestamp, room ID
Votes contestant votes, voting rounds
Reports flagged content, moderation logs

πŸ“± Mobile Optimization

  • FlashList for smooth live chat rendering (low memory, no lag)
  • iOS Keychain / Android Encrypted Storage for secure token storage
  • Auto-reconnect on network drop with missed message recovery
  • WebSocket heartbeats to maintain persistent connections

πŸ”’ Security Design

Feature Purpose
JWT Authentication Secure login
HTTPS / WSS Encrypted communication
Rate Limiting Prevent spam voting and chat flooding
AI Moderation Auto-remove abusive messages
Secure Storage Protect tokens on device
Input Validation Prevent injection attacks

πŸ“ˆ Scalability Design

The system scales horizontally without major redesign:

  • Add more API servers
  • Add more Socket.io servers behind a load balancer
  • Add more Redis nodes in cluster mode
  • PostgreSQL read replicas for analytics

πŸ”­ High Availability Strategy

Component Backup Strategy
API Servers Multiple replicas
Socket Servers Load balancing
Redis Cluster mode
PostgreSQL Replication
Cloud Auto recovery

πŸ“Š Monitoring & Analytics

Tools: Grafana + Prometheus

Monitors:

  • Active users and viewers
  • Live chat traffic
  • Server health
  • Voting activity
  • Error rates
  • App performance metrics

πŸš€ Quick Start

Prerequisites

Installation

# Clone the repository
git clone https://github.com/Biswahack20/vibevilaa.git
cd vibevilaa

# Install Frontend
cd frontend && npm install && cd ..

# Install Backend
cd backend && npm install && cd ..

Run Frontend

cd frontend
npm start
# Press 'a' for Android, 'i' for iOS, 'w' for Web

Run Backend

cd backend
npm start
# API available at http://localhost:3000

πŸ“‚ Project Structure

vibevilaa/
β”œβ”€β”€ frontend/        # React Native/Expo mobile app
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ app/     # Screens (index.jsx, _layout.jsx)
β”‚   β”‚   β”œβ”€β”€ hooks/   # useTheme, useColorScheme
β”‚   β”‚   └── constants/  # theme.js
β”‚   β”œβ”€β”€ assets/
β”‚   └── README.md
β”œβ”€β”€ backend/         # Node.js/Express REST API
β”‚   β”œβ”€β”€ src/
β”‚   └── README.md
└── README.md        # This file

🌟 Future Expansion

  • πŸŽ™οΈ Voice chat between contestants
  • πŸ€– AI-generated episode highlights
  • πŸ“Ή Live streaming video feeds
  • 🌐 Multi-language support
  • πŸ“Š Advanced audience analytics
  • 🎬 Recommendation engine for show discovery

🀝 Git Workflow (Contributors)

Always create feature branches β€” never commit directly to main.

# Create a feature branch
git checkout -b feature/your-feature-name

# Stage files individually (NOT git add .)
git add frontend/src/app/index.jsx

# Commit with conventional message format
git commit -m "feat: add live voting UI"

# Push and open pull request
git push origin feature/your-feature-name

Commit Message Format:

  • feat: β€” New feature
  • fix: β€” Bug fix
  • docs: β€” Documentation
  • style: β€” Formatting/styling
  • refactor: β€” Code refactoring

πŸ“„ License

MIT License β€” see LICENSE file for details.


🎭 Vibe Villa: Where anime avatars clash, alliances form, and only one survives the vote. πŸ”΄ LIVE

About

official monorepo for vivevilaa project . currently initialized with a clean workspace structure

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 68.5%
  • JavaScript 28.0%
  • CSS 3.2%
  • HTML 0.3%