Skip to content

cypherix/code-editor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸ–₯️ CodeHUB

An online collaborative code editor where users can create files and folders, store code without running it, and experience real-time collaboration! πŸš€

Note: This app is currently under development! Stay tuned for more updates. πŸ‘¨β€πŸ’»πŸ‘©β€πŸ’»

🌟 Features

  • πŸ—‚οΈ File & Folder Management: Create and organize files and folders.
  • πŸ”— Unique Slug for Every Project: Each project gets a unique URL (slug) that can be shared with others.
  • πŸ‘₯ Real-time Collaboration: Watch changes live as they happen between users on the same slug.
  • πŸ“ Monaco Editor Integration: Write and edit code using the powerful Monaco editor (VS Code's underlying editor).
  • πŸ› οΈ Persistent Storage: All changes are saved in the cloud so you never lose your work!

πŸš€ Tech Stack

Frontend

  • Framework: Next.js
  • Editor: Monaco Editor
  • State Management: Zustand
  • UI: Chakra UI
  • Real-time Updates: WebSocket (Socket.IO)

Backend

  • Runtime: Node.js
  • Framework: Express.js
  • Database: MongoDB
  • Real-time Sync: Operational Transformation (OT) or Conflict-Free Replicated Data Types (CRDT)
  • File Storage: AWS S3

Architecture

  1. Users create a project with files and folders πŸ—‚οΈ.
  2. Each project is assigned a unique slug πŸ”—.
  3. Multiple users can access the slug and make changes in real-time πŸ“.
  4. Changes are synced across users using WebSocket 🚦.
  5. All data is persisted in the database πŸ“‚.

⚑ How It Works

  1. Visit a slug URL like /exampleSlug πŸ”—.
  2. Create or edit files and folders in the Monaco editor πŸ’».
  3. If someone else joins the same slug, they’ll see your changes in real-time πŸ”„.
  4. Your work is auto-saved and persisted, so you never lose it! πŸ’Ύ

πŸ”§ Installation (Development Mode)

# Clone the repository
git clone https://github.com/username/codecollab.git

# Install dependencies
npm install

# Start the development server
npm run dev

πŸ‘¨β€πŸ’» Contribution Guidelines

We welcome contributions! Please follow these steps:

  1. Fork the repo 🍴.
  2. Create a new branch for your feature or bugfix 🌿.
  3. Submit a pull request πŸ”„.

πŸ“… What's Next?

  • 🚧 Real-time collaboration with Operational Transformation (OT) or CRDT.
  • πŸ”’ User authentication and project permissions.
  • πŸ’Ύ Autosaving and versioning.

πŸ“ License

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


⚠️ Note: This project is under active development. Some features might not be fully functional yet. Stay tuned! 🌱

About

A collaborative code editor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published