Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ScriptSync is a modern collaborative scriptwriting platform. Features real-time collaborative editing, version control, role-based access (Writer/Monitor), secure JWT authentication, and responsive design

Notifications You must be signed in to change notification settings

SohamAI99/ScriptSync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

13 Commits

Repository files navigation

ScriptSync πŸ“

A modern collaborative scriptwriting platform that enables writers, screenwriters, and creative teams to create, edit, and share scripts in real-time with multiple collaborators.

ScriptSync Banner

✨ Features

  • Real-time Collaboration - Multiple users can edit scripts simultaneously
  • Version Control - Track changes and manage script versions
  • Role-based Access - Writer and Monitor roles with different permissions
  • Script Sharing - Share scripts via secure links or direct invitations
  • Rich Editor - Professional script formatting with outline view
  • Responsive Design - Works seamlessly on desktop and mobile devices
  • Secure Authentication - JWT-based authentication with role management

πŸš€ Tech Stack

Frontend

  • React 18 - Modern React with concurrent features
  • Vite - Lightning-fast build tool and development server
  • Tailwind CSS - Utility-first CSS framework
  • Framer Motion - Smooth animations and interactions
  • Socket.IO Client - Real-time communication
  • Axios - HTTP client for API calls

Backend

  • Node.js & Express - RESTful API server
  • Socket.IO - Real-time collaboration features
  • MySQL - Relational database for data persistence
  • JWT - Secure authentication tokens
  • Bcrypt - Password hashing

πŸ“‹ Prerequisites

Before running this project, make sure you have:

  • Node.js (v18 or higher)
  • npm or yarn
  • MySQL (v8.0 or higher)
  • PHP (v8.x) - for database setup scripts

πŸ› οΈ Installation

1. Clone the repository

git clone https://github.com/yourusername/scriptsync.git
cd scriptsync

2. Install dependencies

Frontend:

cd scriptsync
npm install

Backend:

cd ../backend
npm install

3. Environment Setup

Create .env files in both directories:

Backend .env:

NODE_ENV=development
PORT=3001
FRONTEND_URL=http://localhost:4028
DB_HOST=localhost
DB_PORT=3307
DB_NAME=scriptsync
DB_USER=root
DB_PASSWORD=your_database_password
JWT_SECRET=your_jwt_secret_key_here
JWT_EXPIRES_IN=7d
JWT_REFRESH_SECRET=your_refresh_secret_key
JWT_REFRESH_EXPIRES_IN=30d
SOCKET_CORS_ORIGIN=http://localhost:4028

Frontend .env:

VITE_API_BASE_URL=http://localhost:3001/api
VITE_SOCKET_URL=http://localhost:3001

4. Database Setup

  1. Start MySQL server on port 3307
  2. Import the database schema:
    cd backend
    node setup-db-3307.js

Or use phpMyAdmin:

  • Import backend/database/scriptsync_schema.sql

🚦 Running the Application

Development Mode

Start Backend:

cd backend
npm run dev

Start Frontend:

cd scriptsync
npm start

The application will be available at:

  • Frontend: http://localhost:4028
  • Backend API: http://localhost:3001

Production Build

Build Frontend:

cd scriptsync
npm run build

Start Production Backend:

cd backend
npm start

πŸ“ Project Structure

scriptsync/
β”œβ”€β”€ backend/ # Node.js/Express backend
β”‚ β”œβ”€β”€ config/ # Database configuration
β”‚ β”œβ”€β”€ routes/ # API routes
β”‚ β”œβ”€β”€ middleware/ # Express middleware
β”‚ β”œβ”€β”€ socket/ # Socket.IO handlers
β”‚ └── database/ # Database schemas and migrations
β”œβ”€β”€ scriptsync/ # React frontend
β”‚ β”œβ”€β”€ src/
β”‚ β”‚ β”œβ”€β”€ components/ # Reusable UI components
β”‚ β”‚ β”œβ”€β”€ pages/ # Page components
β”‚ β”‚ β”œβ”€β”€ services/ # API services
β”‚ β”‚ └── styles/ # CSS and styling
β”‚ └── public/ # Static assets
└── docs/ # Documentation

πŸ”§ Configuration

Database Configuration

  • Default port: 3307
  • Database name: scriptsync
  • Tables: users, scripts, collaborators, comments, etc.

Authentication

  • JWT-based authentication
  • Role-based access control (Writer/Monitor)
  • Password hashing with bcrypt

Real-time Features

  • Socket.IO for real-time collaboration
  • Live cursor tracking
  • Instant script updates

πŸ“š API Documentation

Authentication Endpoints

  • POST /api/auth/login - User login
  • POST /api/auth/register - User registration
  • POST /api/auth/refresh - Refresh JWT token

Script Endpoints

  • GET /api/scripts - Get user scripts
  • POST /api/scripts - Create new script
  • PUT /api/scripts/:id - Update script
  • DELETE /api/scripts/:id - Delete script

Collaboration Endpoints

  • POST /api/scripts/:id/collaborators - Invite collaborators
  • GET /api/scripts/:id/versions - Get script versions
  • POST /api/scripts/:id/versions - Create new version

πŸ§ͺ Testing

# Run frontend tests
cd scriptsync
npm test
# Run backend tests
cd backend
npm test

πŸ“ˆ Performance

  • Frontend: Optimized with Vite build system
  • Backend: Express.js with optimized middleware
  • Database: Indexed queries for fast performance
  • Real-time: Efficient Socket.IO event handling

πŸ”’ Security

  • Password hashing with bcrypt
  • JWT token authentication
  • Rate limiting on API endpoints
  • Input validation and sanitization
  • CORS configuration
  • Environment variable protection

🀝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ‘₯ Team

  • Frontend: React, Tailwind CSS, Framer Motion
  • Backend: Node.js, Express, Socket.IO
  • Database: MySQL with optimized schema
  • DevOps: Vite build system, Environment configuration

πŸ™ Acknowledgments

  • Built with modern web technologies
  • Inspired by collaborative editing platforms
  • Designed for creative professionals

ScriptSync - Collaborative Scriptwriting Made Simple 🎬

About

ScriptSync is a modern collaborative scriptwriting platform. Features real-time collaborative editing, version control, role-based access (Writer/Monitor), secure JWT authentication, and responsive design

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle γ«γ‚ˆγ£γ¦ε€‰ζ›γ•γ‚ŒγŸγƒšγƒΌγ‚Έ (->γ‚ͺγƒͺγ‚ΈγƒŠγƒ«) /