Convert Figma logo to code with AI

mattermost logomattermost-webapp

Archived web app of Mattermost. Moved to the monorepo: https://github.com/mattermost/mattermost

2,289
2,696
2,289
0

Top Related Projects

162,288

Visual Studio Code

227,213

The library for web and native user interfaces.

95,657

Deliver web apps with confidence 🚀

207,677

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.

A utility-first CSS framework for rapid UI development.

Quick Overview

Mattermost-webapp is the web client application for Mattermost, an open-source, self-hostable online chat service with file sharing, search, and integrations. It provides a responsive and feature-rich user interface for team communication and collaboration, similar to platforms like Slack or Microsoft Teams.

Pros

  • Open-source and customizable
  • Supports self-hosting for enhanced privacy and control
  • Extensive integration capabilities with other tools and services
  • Active community and regular updates

Cons

  • Requires technical knowledge for setup and maintenance
  • May have fewer third-party integrations compared to proprietary alternatives
  • Can be resource-intensive for larger organizations
  • Learning curve for users accustomed to other chat platforms

Code Examples

// Example of using the Mattermost Redux store
import {getChannel} from 'mattermost-redux/selectors/entities/channels';
import {getCurrentUserId} from 'mattermost-redux/selectors/entities/users';

const mapStateToProps = (state, ownProps) => {
    const channel = getChannel(state, ownProps.channelId);
    const currentUserId = getCurrentUserId(state);
    return {
        channel,
        currentUserId,
    };
};

This example demonstrates how to use the Mattermost Redux store to retrieve channel and user information.

// Example of creating a custom plugin
import {Plugin, PluginRegistry} from 'mattermost-webapp/plugins';

class MyPlugin extends Plugin {
    initialize(registry: PluginRegistry) {
        registry.registerPostTypeComponent(
            'custom_post_type',
            CustomPostComponent
        );
    }
}

This code shows how to create a custom plugin for Mattermost, registering a custom post type component.

// Example of using the Mattermost API client
import {Client4} from 'mattermost-redux/client';

async function createPost(channelId, message) {
    try {
        const post = await Client4.createPost({
            channel_id: channelId,
            message: message,
        });
        console.log('Post created:', post);
    } catch (error) {
        console.error('Error creating post:', error);
    }
}

This example demonstrates how to use the Mattermost API client to create a new post in a channel.

Getting Started

To get started with mattermost-webapp development:

  1. Clone the repository:

    git clone https://github.com/mattermost/mattermost-webapp.git
    cd mattermost-webapp
    
  2. Install dependencies:

    npm install
    
  3. Start the development server:

    npm run run
    
  4. Open your browser and navigate to http://localhost:8065 to view the application.

For more detailed instructions, refer to the project's README and contribution guidelines on GitHub.

Competitor Comparisons

162,288

Visual Studio Code

Pros of VS Code

  • Larger community and more extensive ecosystem of extensions
  • More comprehensive documentation and learning resources
  • Broader language support and advanced debugging capabilities

Cons of VS Code

  • Heavier resource usage, potentially slower on older hardware
  • More complex codebase, which can make contributing more challenging
  • Less focused on team collaboration features compared to Mattermost

Code Comparison

VS Code (TypeScript):

export class EditorAction extends Action {
    constructor(descriptor: IEditorActionDescriptorData, editor: ICodeEditor) {
        super(descriptor.id, descriptor.label, descriptor.cssClass);
        this.editor = editor;
    }
}

Mattermost (JavaScript):

export default class UserProfile extends React.PureComponent {
    static propTypes = {
        user: PropTypes.object.isRequired,
        status: PropTypes.string,
        isBusy: PropTypes.bool,
    };
}

Both projects use modern JavaScript/TypeScript practices, but VS Code's codebase is more TypeScript-heavy, providing stronger type checking. Mattermost's webapp uses React for its UI components, while VS Code uses a custom UI framework.

227,213

The library for web and native user interfaces.

Pros of React

  • Larger community and ecosystem, with more resources and third-party libraries
  • More versatile, can be used for various types of web applications
  • Better performance optimization with virtual DOM

Cons of React

  • Steeper learning curve for beginners
  • Requires additional libraries for full-featured applications
  • More frequent updates and potential breaking changes

Code Comparison

React component:

function Welcome(props) {
  return <h1>Hello, {props.name}</h1>;
}

Mattermost-webapp component:

export default class Welcome extends React.PureComponent {
  render() {
    return <h1>Hello, {this.props.name}</h1>;
  }
}

Key Differences

  • React is a library, while Mattermost-webapp is a full application
  • Mattermost-webapp is specifically designed for team communication
  • React offers more flexibility in project structure and architecture

Community and Support

  • React has a larger, more diverse community
  • Mattermost-webapp has a focused community around team collaboration tools

Use Cases

  • React: General-purpose web development, single-page applications
  • Mattermost-webapp: Team communication and collaboration platforms

Learning Resources

  • React: Abundant tutorials, courses, and documentation
  • Mattermost-webapp: More specialized resources focused on contributing to the project
95,657

Deliver web apps with confidence 🚀

Pros of Angular

  • More comprehensive framework with built-in features for routing, forms, and HTTP client
  • Stronger typing system with TypeScript, leading to better code quality and maintainability
  • Larger community and ecosystem, with more third-party libraries and resources available

Cons of Angular

  • Steeper learning curve due to its complexity and unique concepts (e.g., decorators, dependency injection)
  • Heavier bundle size, which can impact initial load times for applications
  • More opinionated structure, which may limit flexibility in some cases

Code Comparison

Angular (component example):

@Component({
  selector: 'app-root',
  template: '<h1>{{title}}</h1>'
})
export class AppComponent {
  title = 'My Angular App';
}

Mattermost-webapp (React component example):

import React from 'react';

const AppComponent = () => {
  return <h1>My Mattermost App</h1>;
};

export default AppComponent;

The Angular example showcases its decorator-based approach and TypeScript integration, while the Mattermost-webapp example demonstrates React's more straightforward functional component style. Angular's template syntax is inline with the component, whereas React typically separates JSX into the return statement.

207,677

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

Pros of Vue

  • Lightweight and fast, with a smaller bundle size
  • Easier learning curve for beginners
  • More flexible and adaptable for various project sizes

Cons of Vue

  • Smaller ecosystem compared to React (used in Mattermost)
  • Less suitable for large-scale enterprise applications
  • Fewer job opportunities in the market

Code Comparison

Vue component example:

<template>
  <div>{{ message }}</div>
</template>

<script>
export default {
  data() {
    return {
      message: 'Hello Vue!'
    }
  }
}
</script>

Mattermost React component example:

import React from 'react';

const HelloComponent = () => {
  return <div>Hello Mattermost!</div>;
};

export default HelloComponent;

The Vue example showcases its template-based approach and component structure, while the Mattermost example demonstrates React's JSX syntax and functional component style. Vue's single-file component structure combines template, script, and style in one file, whereas Mattermost's React components typically separate these concerns into different files or sections.

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.

Pros of Material-UI

  • More comprehensive UI component library with a wider range of pre-built components
  • Stronger focus on design consistency and adherence to Material Design principles
  • Larger community and ecosystem, leading to more third-party extensions and resources

Cons of Material-UI

  • Steeper learning curve due to its extensive API and customization options
  • Potentially heavier bundle size if not properly optimized or tree-shaken
  • Less specific to team collaboration features compared to Mattermost's webapp

Code Comparison

Material-UI example:

import { Button, TextField } from '@material-ui/core';

function LoginForm() {
  return (
    <form>
      <TextField label="Username" variant="outlined" />
      <Button variant="contained" color="primary">Login</Button>
    </form>
  );
}

Mattermost webapp example:

import { FormattedMessage } from 'react-intl';
import { Input, Button } from 'components/common';

function LoginForm() {
  return (
    <form>
      <Input placeholder={<FormattedMessage id="login.username" />} />
      <Button primary><FormattedMessage id="login.signIn" /></Button>
    </form>
  );
}

The Material-UI example showcases its pre-built components with built-in styling, while the Mattermost webapp example demonstrates its use of custom components and internationalization support.

A utility-first CSS framework for rapid UI development.

Pros of Tailwind CSS

  • Highly customizable and flexible utility-first CSS framework
  • Smaller file sizes and better performance due to purging unused styles
  • Rapid development with pre-built utility classes

Cons of Tailwind CSS

  • Steeper learning curve for developers new to utility-first CSS
  • Can lead to longer class names and potentially cluttered HTML
  • Less semantic markup compared to traditional CSS approaches

Code Comparison

Tailwind CSS:

<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
  Button
</button>

Mattermost-webapp:

<button className={`btn btn-primary ${styles.customButton}`}>
  Button
</button>

Tailwind CSS uses utility classes directly in the HTML, while Mattermost-webapp typically combines CSS modules with global classes. Tailwind's approach can lead to more verbose HTML but offers greater flexibility and faster development. Mattermost-webapp's method provides better separation of concerns but may require more CSS file management.

Both projects have their strengths, with Tailwind CSS focusing on rapid UI development through utility classes, and Mattermost-webapp providing a more traditional approach to styling in a large-scale web application.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

The Mattermost web app no longer lives in this repository since we have moved to using a monorepo located in https://github.com/mattermost/mattermost-server.

Our developer setup instructions have been updated to use the monorepo, and we're going to be continuing to update our developer documentation to reflect the new setup over the next couple weeks.

All changes going forward should be made in the monorepo since we're no longer accepting PRs in this repository, and any existing PRs should be resubmitted over there. We have some notes on how to do that migration here, but most of the code that was previously in this repository is now located in either webapp/channels or webapp/platform in the monorepo. We were unable to maintain Git history with the move, so migrating PRs to the new repo will likely involve a lot of manually copying changes to their new locations.

This repository is being kept open until December 2023 to maintain support for our extended support releases at which point it will be archived and kept as a historical record.