A modern, collaborative streaming companion application built with React, TypeScript, and Vite. Watch your favorite content together with synchronized playback, real-time features, and an intuitive user experience.
- Overview
- Features
- Tech Stack
- Project Architecture
- Installation
- Development
- Build & Deployment
- Project Structure
- Configuration Files
- Contributing
- Roadmap & Future Enhancements
- License
WatchAlong is a collaborative media synchronization platform designed to bring people together for a shared viewing experience. Whether it's movies, shows, or live streams, WatchAlong ensures seamless synchronization across all participants with real-time updates, interactive features, and a modern, responsive UI.
- β‘ Lightning-fast development with Vite
- π¨ Beautiful UI powered by Tailwind CSS & shadcn/ui
- π± Fully responsive design for all devices
- π Real-time synchronization capabilities
- π‘οΈ Type-safe development with TypeScript
- π Production-ready with best practices
- Modern React-based UI framework
- TypeScript for type safety
- Responsive design system
- Component-driven architecture
- Hot Module Replacement (HMR) for fast development
- User authentication & authorization
- Room/Session management
- Synchronized media playback
- Real-time chat integration
- User presence indicators
- Watch history tracking
- Playlist creation & sharing
- Dark mode support
- Mobile app version
- Premium features & subscriptions
| Technology | Version | Purpose |
|---|---|---|
| React | Latest | UI framework |
| TypeScript | 5.x | Type-safe JavaScript |
| Vite | 5.x | Ultra-fast build tool |
| Tailwind CSS | 3.x | Utility-first CSS framework |
| shadcn/ui | Latest | Component library |
| PostCSS | Latest | CSS processing |
| ESLint | Latest | Code quality & linting |
| Tool | Purpose |
|---|---|
| Bun | Fast JavaScript runtime & package manager |
| npm | Package manager (fallback) |
| TypeScript Compiler | Type checking |
| Vite Dev Server | Local development & HMR |
- Tailwind CSS with custom theme extensions
- PostCSS for advanced CSS processing
- CSS Modules ready (via Tailwind)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β WatchAlong App β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββ β
β β Pages β β Components β β Hooks β β
β β β β β β β β
β β - Home β β - Header β β - useSyncβ β
β β - Room β β - Player β β - useRoomβ β
β β - Profile β β - Chat β β - useMen β β
β β - Settings β β - Controls β β - Custom β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββ β
β β β β β
β ββββββββββββββββββΌβββββββββββββββββ β
β β β
β βββββββββββββΌβββββββββββββββ β
β β App.tsx (Root) β β
β β (State Management) β β
β βββββββββββββ¬βββββββββββββββ β
β β β
β βββββββββββββΌβββββββββββββββ β
β β Utilities (lib/) β β
β β - API helpers β β
β β - Constants β β
β β - Validators β β
β β - Formatters β β
β βββββββββββββ¬βββββββββββββββ β
β β β
β βββββββββββββΌβββββββββββββββ β
β β Styling (Tailwind) β β
β β - Global styles β β
β β - Theme colors β β
β β - Responsive breakpointsβ β
β ββββββββββββββββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Component-Driven: Modular, reusable components
- Separation of Concerns: Pages, components, hooks, utilities
- Type Safety: Full TypeScript coverage
- DRY (Don't Repeat Yourself): Utilities & hooks for shared logic
- Responsive First: Mobile-first design approach
- Performance: Code splitting, lazy loading ready
WatchAlong/
βββ src/
β βββ pages/ # Page-level components
β β βββ HomePage.tsx # Landing/home page
β β βββ RoomPage.tsx # Watch room
β β βββ ProfilePage.tsx # User profile
β β βββ SettingsPage.tsx # Settings
β β
β βββ components/ # Reusable components
β β βββ common/ # Shared components
β β β βββ Header.tsx
β β β βββ Footer.tsx
β β β βββ Navigation.tsx
β β β
β β βββ player/ # Media player components
β β β βββ MediaPlayer.tsx
β β β βββ Controls.tsx
β β β βββ ProgressBar.tsx
β β β
β β βββ room/ # Room-specific components
β β β βββ RoomHeader.tsx
β β β βββ RoomControls.tsx
β β β βββ UserList.tsx
β β β
β β βββ chat/ # Chat components
β β βββ ChatBox.tsx
β β βββ MessageList.tsx
β β βββ MessageInput.tsx
β β
β βββ hooks/ # Custom React hooks
β β βββ useSync.ts # Synchronization logic
β β βββ useRoom.ts # Room management
β β βββ useAuth.ts # Authentication
β β βββ usePlayer.ts # Media player control
β β βββ useTheme.ts # Theme management
β β
β βββ lib/ # Utility functions & helpers
β β βββ api.ts # API client
β β βββ constants.ts # App constants
β β βββ validators.ts # Input validation
β β βοΏ½οΏ½οΏ½β formatters.ts # Data formatting
β β βββ storage.ts # Local storage helpers
β β
β βββ App.tsx # Root component
β βββ App.css # App-level styles
β βββ main.tsx # Entry point
β βββ index.css # Global styles
β βββ vite-env.d.ts # Vite environment types
β
βββ public/ # Static assets
β βββ favicon.ico
β βββ images/
β βββ fonts/
β
βββ Configuration Files
β βββ package.json # Dependencies & scripts
β βββ tailwind.config.ts # Tailwind CSS theme
β βββ tsconfig.json # TypeScript base config
β βββ tsconfig.app.json # App TypeScript config
β βββ tsconfig.node.json # Build tools TS config
β βββ vite.config.ts # Vite build config
β βββ components.json # shadcn/ui config
β βββ postcss.config.js # PostCSS pipeline
β βββ eslint.config.js # ESLint rules
β
βββ .gitignore # Git ignore rules
βββ index.html # HTML entry point
βββ package-lock.json # npm lock file
βββ bun.lockb # Bun lock file
βββ README.md # This file
Defines project dependencies, scripts, and metadata.
{
"name": "watchalong",
"version": "0.1.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"preview": "vite preview",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
"dependencies": {
"react": "^18.x",
"react-dom": "^18.x"
},
"devDependencies": {
"@types/react": "^18.x",
"typescript": "^5.x",
"tailwindcss": "^3.x",
"vite": "^5.x"
}
}Configures Vite for development and production builds with React plugin support.
Extended Tailwind theme with custom colors, spacing, typography, and animations for WatchAlong branding.
TypeScript configuration for strict type checking and ES modules.
Code quality rules for consistent coding standards across the project.
- Node.js 18.x or higher
- Bun 1.x (recommended) OR npm 9.x+
- Git
git clone https://github.com/Aditya24Kashyap/WatchAlong.git
cd WatchAlongUsing Bun (Recommended - Faster)
bun installUsing npm (Alternative)
npm installnpm run lintnpm run devThe application will be available at http://localhost:5173
- π₯ Hot Module Replacement (HMR): Changes reflect instantly
- π Fast Refresh: Preserves component state
- π Source Maps: Easy debugging
Run ESLint
npm run lintFix Linting Issues
npm run lint:fixType Check
npx tsc --noEmit# Create a new component in src/components/
touch src/components/MyComponent.tsximport { FC } from 'react';
interface MyComponentProps {
title: string;
onClick?: () => void;
}
const MyComponent: FC<MyComponentProps> = ({ title, onClick }) => {
return (
<div className="p-4 bg-white rounded-lg shadow">
<h2 className="text-xl font-bold">{title}</h2>
<button onClick={onClick} className="mt-4 px-4 py-2 bg-blue-500 text-white rounded">
Click me
</button>
</div>
);
};
export default MyComponent;import MyComponent from '@/components/MyComponent';
export default function App() {
return <MyComponent title="Hello World" />;
}touch src/hooks/useMyHook.tsimport { useState, useCallback } from 'react';
export const useMyHook = (initialValue: string) => {
const [value, setValue] = useState(initialValue);
const reset = useCallback(() => {
setValue(initialValue);
}, [initialValue]);
return { value, setValue, reset };
};npm run buildOutput will be in the dist/ directory.
- TypeScript compilation & type checking
- Vite builds optimized bundles
- CSS is minified & tree-shaken
- JavaScript is minified & code-split
npm run preview# Install Vercel CLI
npm i -g vercel
# Deploy
vercel- Connect your GitHub repository
- Set build command:
npm run build - Set publish directory:
dist
FROM node:18-alpine
WORKDIR /app
COPY package.json bun.lockb ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 5173
CMD ["npm", "run", "preview"]npm run build
# Upload dist/ folder to your hosting provider- react: UI library
- react-dom: React rendering engine
- tailwindcss: Utility-first CSS
- postcss: CSS processing
- shadcn/ui: Pre-built components
- typescript: Type safety
- vite: Build tool
- eslint: Code quality
- @types/react: TypeScript definitions
{
"react-router-dom": "^6.x", // Routing
"zustand": "^4.x", // State management
"axios": "^1.x", // HTTP client
"socket.io-client": "^4.x", // Real-time communication
"date-fns": "^2.x", // Date utilities
"zod": "^3.x" // Schema validation
}// Colors
<div className="bg-blue-500 text-white">
// Spacing
<div className="p-4 m-2 mt-8">
// Layout
<div className="flex justify-center items-center">
// Responsive
<div className="text-sm md:text-base lg:text-lg">
// Dark Mode
<div className="dark:bg-gray-800 dark:text-white">Edit tailwind.config.ts to customize:
- Color palette
- Typography
- Spacing scale
- Breakpoints
- Animations
Create a .env.local file in the root directory:
# API Configuration
VITE_API_URL=http://localhost:3000
VITE_API_TIMEOUT=10000
# Feature Flags
VITE_ENABLE_ANALYTICS=true
VITE_ENABLE_NOTIFICATIONS=true
# Third-party Services
VITE_SOCKET_IO_URL=http://localhost:3001Access in your code:
const apiUrl = import.meta.env.VITE_API_URL;npm install --save-dev @testing-library/react @testing-library/jest-dom vitestimport { render, screen } from '@testing-library/react';
import MyComponent from '@/components/MyComponent';
describe('MyComponent', () => {
it('renders with title', () => {
render(<MyComponent title="Test" />);
expect(screen.getByText('Test')).toBeInTheDocument();
});
});npm run test- React Developer Tools (Chrome Extension)
- Redux DevTools (if using Redux)
- Network tab for API debugging
{
"recommendations": [
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode",
"bradlc.vscode-tailwindcss",
"dsznajder.es7-react-js-snippets",
"wix.vscode-import-cost"
]
}- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit changes:
git commit -m 'Add amazing feature' - Push to branch:
git push origin feature/amazing-feature - Open a Pull Request
- Follow the existing code style
- Add tests for new features
- Update documentation
- Keep commits atomic and descriptive
- Reference issues in commit messages
- TypeScript: Strict mode enabled
- Formatting: Use Prettier
- Linting: Pass ESLint
- Comments: JSDoc for public APIs
- Testing: Minimum 80% coverage goal
This project is licensed under the MIT License - see the LICENSE file for details.
- Weekly: Check for security updates
- Monthly: Update dependencies
- Quarterly: Review architecture
- Annually: Plan new features
- Monitor Core Web Vitals
- Track error rates
- Analyze user behavior
- Optimize bundle size
- β Star the repository
- π¦ Follow on Twitter
- πΌ Connect on LinkedIn
| Metric | Value |
|---|---|
| Language | TypeScript (97.4%) |
| Repository Size | 376 KB |
| Last Updated | Recently |
| Node Version | 18.x+ |
| Package Manager | Bun/npm |
# Development
npm run dev # Start dev server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Check code quality
npm run lint:fix # Fix linting issues
# Type Checking
npx tsc --noEmit # Type check without emitting
npx tsc --watch # Watch mode
# Dependencies
npm outdated # Check for updates
npm audit # Security audit
npm update # Update dependencies