Skip to content

ManikMaity/chattr-frontend

Repository files navigation

Anime messaging

Chattr

A real-time Slack like collaborative platform for creating and managing workspaces, channels, and private messaging, with advanced admin controls and responsive design 🌐.

πŸ“š Index

Features

πŸ” User Management

  • Users can signup and login using their credentials with cookie-based authentication using JWT.
  • Users can reset their password by requesting a password reset link via email.
  • Users can update their username and verify their email in settings (verification link sent via email).
  • Members can send private direct messages to other members.

🏒 Workspace and Channel Management

  • Users can create and switch between multiple workspaces.
  • Admins can update workspace details (name, image) and delete workspaces.
  • Admins can invite members using a shareable and editable workspace link.
  • Registered users can join a workspace via the shared link.
  • Members and admins can leave any workspace.
  • Admins can remove members or promote them to admin.
  • Admins can create, rename, and delete channels within a workspace.
  • Members can switch between channels in a workspace.
  • Members can search workspace messagers.

πŸ’¬ Messaging and Collaboration

  • Messages are fetched and displayed for selected channels with real-time updates using WebSocket.
  • Supports a rich-text input editor with features like bold, italic, underline, links, code, and bullets.
  • Members can upload single images with messages.
  • Members can react to messages and view reaction details.
  • Messages can be deleted by the sender with real-time updates.
  • Subcribed users can use AI text generator to generate messages.

🌟 Additional Features

  • Integrated Razorpay for secure subscription payment processing.
  • Supports dark mode and light mode switching.
  • Designed with responsive UI using TailwindCSS and shadCN.

Tech Stack

🎨 Frontend

  • UI Frameworks: shadCN, TailwindCSS
  • APIs & Libraries: axios, firebase, razorpay, socket.io-client, groq
  • Rich Text Editor: Quill
  • Routing: react-router-dom
  • State Management: react-query

πŸ–₯️ Backend

  • Server Framework: Express
  • Database & ORM: Mongoose
  • Authentication: bcrypt, jsonwebtoken
  • Real-Time Communication: Socket.io
  • Payment Gateway: Razorpay
  • Queue Management: Bull, ioredis
  • Validation: Zod
  • Email Service: Nodemailer

Live Link

Preview Images

Channel

Member

Private Messaging

Workspace Join

Signup

Signin

Payment

Installation and Setup

βœ… Prerequisites

  • Node.js and npm/yarn installed.
  • MongoDB database set up locally or on a cloud provider.
  • Radis server set up locally or or a cloud provider.
  • Razorpay account for subscription payments

πŸ“ Steps

  1. Make a folder for the project and cd into it

    mkdir chattr
    cd chattr
  2. Clone the backend Repository:

    git clone https://github.com/ManikMaity/chattr-backend.git
    cd chattr-backend
  3. Install dependencies:

    npm install
  4. Create a .env file and add the following variables:

    PORT=3000
    NODE_ENV="development"
    DEV_DB_URL="your_dev_database_url"
    PROD_DB_URL="your_prod_database_url"
    SALT_ROUND=6
    JWT_SECRET="your_jwt_secret"
    MAIL_PASSWORD="your_mail_password"
    MAIL_ID="your_email_id"
    REDIS_HOST="your_redis_host"
    REDIS_PORT="your_redis_port"
    REDIS_PASSWORD="your_redis_password"
    CLIENT_URL="http://localhost:5173"
    RAZORPAY_ID="your_razorpay_id"
    RAZORPAY_SECRET="your_razorpay_secret"
    ENABLE_EMAIL_VERIFICATION=true
    JWT_EXPIRY="1y"
    GROQ_API=your_groq_api
  5. Start the backend server:

    npm run dev
  6. Clone Frontend Repository:

    cd ..
    git clone https://github.com/ManikMaity/chattr-frontend.git
    cd chattr-frontend
  7. Install dependencies:

    npm install
  8. Create a .env file and add the following variables:

    VITE_BACKEND_URL="http://localhost:3000/"
    VITE_FRONTEND_URL = "http://localhost:5173"
    VITE_BACKEND_SOCKET_URL="http://localhost:3000"
    VITE_FIREBASE_API_KEY="your firebase api key"
    VITE_RAZORPAY_ID="your_razorpay_id"
  9. Start the frontend server:

    npm run dev
  10. Open your browser and navigate to http://localhost:5173

About

Chattr is a collaborative platform for creating and managing workspaces, channels, and private messaging, with advanced admin controls and responsive design 🌐

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors