Skip to content

skinny-ke/mern-final-project-skinny-ke

Β 
Β 

Repository files navigation

CollabTask - MERN Stack Team Collaboration Platform

CollabTask Logo

Streamline team collaboration with intelligent project management

TypeScript React Node.js MongoDB Express Socket.io

πŸš€ Project Overview

CollabTask is a comprehensive team collaboration platform built with the MERN stack (MongoDB, Express.js, React, Node.js) that addresses the fragmentation problem in modern project management tools. It provides real-time collaboration, unified project management, and intelligent insights for small to medium-sized teams.

🎯 Key Features

  • Real-time Collaboration: Instant updates and notifications across all project activities
  • Unified Project Management: Consolidate task management, file sharing, and communication in one platform
  • Intelligent Project Insights: Data-driven insights for better project decision making
  • Seamless Integration Experience: Minimal friction in team adoption and daily usage
  • Mobile-First Design: Responsive interface optimized for all devices
  • Robust Security: JWT-based authentication with role-based access control

πŸ—οΈ Technology Stack

Frontend

  • React 18 with TypeScript
  • Redux Toolkit for state management
  • Socket.io Client for real-time features
  • Material-UI for consistent design system
  • React Query for data fetching and caching

Backend

  • Node.js with Express.js framework
  • MongoDB with Mongoose ODM
  • Socket.io for real-time communication
  • JWT for authentication
  • Redis for session management and caching

Infrastructure

  • Frontend Deployment: Vercel/Netlify
  • Backend Deployment: Vercel/Render/Heroku
  • Database: MongoDB Atlas with global clusters
  • Real-time: Redis Cloud for WebSocket scaling
  • Monitoring: Sentry for error tracking

πŸ“ Project Structure

collabtask/
β”œβ”€β”€ πŸ“ backend/                 # Express.js API server
β”‚   β”œβ”€β”€ πŸ“ src/
β”‚   β”‚   β”œβ”€β”€ πŸ“ controllers/     # Route handlers
β”‚   β”‚   β”œβ”€β”€ πŸ“ models/          # Mongoose schemas
β”‚   β”‚   β”œβ”€β”€ πŸ“ routes/          # API routes
β”‚   β”‚   β”œβ”€β”€ πŸ“ middleware/      # Custom middleware
β”‚   β”‚   β”œβ”€β”€ πŸ“ services/        # Business logic
β”‚   β”‚   β”œβ”€β”€ πŸ“ utils/           # Utility functions
β”‚   β”‚   └── πŸ“ socket/          # WebSocket handlers
β”‚   β”œβ”€β”€ πŸ“ tests/               # Backend tests
β”‚   β”œβ”€β”€ πŸ“„ package.json
β”‚   └── πŸ“„ server.js            # Entry point
β”œβ”€β”€ πŸ“ frontend/                # React application
β”‚   β”œβ”€β”€ πŸ“ public/
β”‚   β”œβ”€β”€ πŸ“ src/
β”‚   β”‚   β”œβ”€β”€ πŸ“ components/      # React components
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“ ui/          # Base UI components
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“ forms/       # Form components
β”‚   β”‚   β”‚   β”œβ”€β”€ πŸ“ layout/      # Layout components
β”‚   β”‚   β”‚   └── πŸ“ features/    # Feature components
β”‚   β”‚   β”œβ”€β”€ πŸ“ pages/           # Page components
β”‚   β”‚   β”œβ”€β”€ πŸ“ hooks/           # Custom hooks
β”‚   β”‚   β”œβ”€β”€ πŸ“ store/           # Redux store
β”‚   β”‚   β”œβ”€β”€ πŸ“ services/        # API services
β”‚   β”‚   β”œβ”€β”€ πŸ“ utils/           # Utility functions
β”‚   β”‚   β”œβ”€β”€ πŸ“ types/           # TypeScript types
β”‚   β”‚   └── πŸ“ styles/          # CSS and styling
β”‚   β”œβ”€β”€ πŸ“ tests/               # Frontend tests
β”‚   β”œβ”€β”€ πŸ“„ package.json
β”‚   └── πŸ“„ index.tsx            # Entry point
β”œβ”€β”€ πŸ“ shared/                  # Shared types and utilities
β”œβ”€β”€ πŸ“ docs/                    # Documentation
β”œβ”€β”€ πŸ“„ .gitignore
β”œβ”€β”€ πŸ“„ .eslintrc.js
β”œβ”€β”€ πŸ“„ .prettierrc.js
β”œβ”€β”€ πŸ“„ package.json             # Root package.json
└── πŸ“„ README.md                # This file

🚦 Getting Started

Prerequisites

  • Node.js (v18+ recommended)
  • MongoDB (v6+)
  • Git for version control

Installation

  1. Clone the repository

    git clone https://github.com/your-username/collabtask.git
    cd collabtask
  2. Install dependencies

    # Install root dependencies
    npm install
    
    # Install backend dependencies
    cd backend
    npm install
    
    # Install frontend dependencies
    cd ../frontend
    npm install
  3. Set up environment variables

    # Backend (.env)
    cd backend
    cp .env.example .env
    
    # Frontend (.env)
    cd ../frontend
    cp .env.example .env
  4. Start development servers

    # Terminal 1: Start backend (port 5000)
    cd backend
    npm run dev
    
    # Terminal 2: Start frontend (port 3000)
    cd frontend
    npm start
  5. Access the application

πŸ§ͺ Testing

Backend Testing

cd backend
npm test                    # Run all tests
npm run test:watch         # Run tests in watch mode
npm run test:coverage      # Run tests with coverage report

Frontend Testing

cd frontend
npm test                   # Run all tests
npm run test:watch        # Run tests in watch mode
npm run test:coverage     # Run tests with coverage report
npm run test:e2e          # Run end-to-end tests

πŸ“¦ Building for Production

Backend Build

cd backend
npm run build
npm start

Frontend Build

cd frontend
npm run build
npm run preview           # Preview production build

πŸš€ Deployment

Environment Setup

  1. Backend Deployment

    • Configure environment variables on your hosting platform
    • Set up MongoDB Atlas connection
    • Configure Redis for real-time features
  2. Frontend Deployment

    • Build the React application
    • Deploy to Vercel or Netlify
    • Configure environment variables
  3. Database Setup

    • Set up MongoDB Atlas cluster
    • Create database collections
    • Run initial data migrations

πŸ“Š Development Workflow

Git Branch Strategy

We use GitFlow branching strategy:

  • main - Production-ready code
  • develop - Integration branch for features
  • feature/* - Individual feature branches
  • hotfix/* - Production hotfixes
  • release/* - Release preparation branches

Commit Message Format

type(scope): description

[optional body]

[optional footer]

Types:

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation
  • style: Code style changes
  • refactor: Code refactoring
  • test: Testing
  • chore: Build/config changes

Examples:

feat(auth): add JWT token validation
fix(ui): resolve button hover state issue
docs(api): update endpoint documentation

Development Guidelines

  1. Code Quality

    • Use ESLint and Prettier for code formatting
    • Write unit tests for all new features
    • Follow TypeScript best practices
    • Use meaningful variable and function names
  2. Component Development

    • Create reusable, accessible components
    • Follow the established design system
    • Use semantic HTML and proper ARIA labels
    • Implement responsive design patterns
  3. API Development

    • Follow RESTful API design principles
    • Use proper HTTP status codes
    • Implement comprehensive error handling
    • Document all endpoints with Swagger

πŸ“ˆ Performance & Monitoring

Performance Targets

  • Page Load Time: < 2 seconds
  • API Response Time: < 200ms
  • Real-time Update Latency: < 1 second
  • Test Coverage: >80% backend, >75% frontend

Monitoring & Analytics

  • Error Tracking: Sentry integration
  • Performance Monitoring: Core Web Vitals
  • User Analytics: Google Analytics
  • API Monitoring: Response times and error rates

πŸ›‘οΈ Security

Security Features

  • JWT Authentication: Secure token-based authentication
  • Password Hashing: bcrypt for secure password storage
  • Rate Limiting: API rate limiting to prevent abuse
  • CORS Configuration: Proper cross-origin resource sharing
  • Input Validation: Comprehensive input sanitization
  • SQL Injection Prevention: MongoDB injection protection

πŸ“– Documentation

API Documentation

  • Swagger/OpenAPI: Interactive API documentation
  • Postman Collection: Downloadable API collection
  • Schema Documentation: Data model documentation

Component Documentation

  • Storybook: Component library documentation
  • Design System: UI component specifications
  • Style Guide: CSS and design guidelines

🀝 Contributing

We welcome contributions! Please read our Contributing Guidelines for details on:

  • Code of conduct
  • Development process
  • Pull request guidelines
  • Issue reporting

Development Setup

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes
  4. Run tests: npm test
  5. Commit your changes: git commit -m 'feat: add amazing feature'
  6. Push to the branch: git push origin feature/amazing-feature
  7. Open a Pull Request

πŸ“„ License

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

πŸ™ Acknowledgments

  • Design System: Material-UI components and design patterns
  • Real-time Communication: Socket.io and WebSocket technologies
  • Authentication: JWT and bcrypt security practices
  • Testing: Jest, React Testing Library, and Cypress
  • Deployment: Vercel, Render, and MongoDB Atlas

πŸ“ž Support

For support and questions:


Built with ❀️ by the CollabTask Team

Making team collaboration simple and effective.

About

plp-mern-stack-development-classroom-mern-final-project-MERN-Stack-Week8 created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published