{"id":32453720,"url":"https://github.com/arsh342/collabspace","last_synced_at":"2025-10-26T07:46:06.238Z","repository":{"id":315730978,"uuid":"1053212175","full_name":"arsh342/collabspace","owner":"arsh342","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-28T10:05:48.000Z","size":26102,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-28T12:10:25.089Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"EJS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arsh342.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-09T06:24:38.000Z","updated_at":"2025-09-28T10:05:51.000Z","dependencies_parsed_at":"2025-09-20T11:49:59.379Z","dependency_job_id":null,"html_url":"https://github.com/arsh342/collabspace","commit_stats":null,"previous_names":["arsh342/collabspace"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/arsh342/collabspace","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsh342%2Fcollabspace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsh342%2Fcollabspace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsh342%2Fcollabspace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsh342%2Fcollabspace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arsh342","download_url":"https://codeload.github.com/arsh342/collabspace/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arsh342%2Fcollabspace/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281074203,"owners_count":26439421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-26T02:00:06.575Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-10-26T07:45:25.435Z","updated_at":"2025-10-26T07:46:06.220Z","avatar_url":"https://github.com/arsh342.png","language":"EJS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CollabSpace - Team Collaboration Platform\n\n![CollabSpace Logo](https://via.placeholder.com/200x80/1e40af/ffffff?text=CollabSpace)\n\nA comprehensive team collaboration platform built with Node.js, Express, MongoDB, and Socket.IO. CollabSpace provides real-time chat, task management, team organization, and file sharing capabilities for modern teams.\n\n## 🚀 Features\n\n### Core Features\n\n- **Real-time Team Chat** - Instant messaging with Socket.IO\n- **Task Management** - Create, assign, and track tasks with Kanban boards\n- **Team Organization** - Create teams, invite members, manage roles\n- **File Sharing** - Upload and share files in chat and tasks\n- **User Authentication** - Secure login with session management\n- **Responsive Design** - Works on desktop, tablet, and mobile\n\n### Advanced Features\n\n- **Role-based Access Control** - Organizers and Members with different permissions\n- **Real-time Notifications** - Live updates for messages, tasks, and team activities\n- **Message Reactions** - React to messages with emojis\n- **File Attachments** - Support for images, documents, and other files\n- **Typing Indicators** - See when team members are typing\n- **Online Status** - Track who's currently online\n- **Search Functionality** - Search messages and tasks\n- **Dashboard Analytics** - Overview of team activity and progress\n\n## 🛠️ Technology Stack\n\n### Backend\n\n- **Node.js** - Runtime environment\n- **Express.js** - Web framework\n- **MongoDB** - Database with Mongoose ODM\n- **Socket.IO** - Real-time communication\n- **JWT** - Authentication tokens\n- **bcryptjs** - Password hashing\n- **Multer** - File upload handling\n\n### Frontend\n\n- **EJS** - Template engine\n- **Tailwind CSS** - Utility-first CSS framework\n- **Vanilla JavaScript** - Client-side functionality\n- **Font Awesome** - Icons\n- **Socket.IO Client** - Real-time communication\n\n### Development Tools\n\n- **Nodemon** - Development server\n- **PM2** - Production process manager\n- **PostCSS** - CSS processing\n- **Autoprefixer** - CSS vendor prefixes\n\n## 📁 Project Structure\n\n```\ncollabspace/\n├── src/                          # Source code\n│   ├── app.js                   # Main application entry point\n│   ├── config/                  # Configuration files\n│   │   ├── database.js          # MongoDB connection\n│   │   └── jwt.js              # JWT configuration\n│   ├── middleware/              # Express middleware\n│   │   ├── auth.js             # Authentication middleware\n│   │   ├── errorHandler.js     # Error handling\n│   │   ├── logger.js           # Logging middleware\n│   │   └── rateLimiter.js      # Rate limiting\n│   ├── models/                  # Database models\n│   │   ├── User.js             # User model\n│   │   ├── Team.js             # Team model\n│   │   ├── Task.js             # Task model\n│   │   ├── Message.js          # Message model\n│   │   └── TeamInvitation.js   # Team invitation model\n│   ├── routes/                  # API routes\n│   │   ├── auth.js             # Authentication routes\n│   │   ├── users.js            # User management\n│   │   ├── teams.js            # Team management\n│   │   ├── tasks.js            # Task management\n│   │   ├── chat.js             # Chat functionality\n│   │   ├── messages.js         # Message handling\n│   │   ├── dashboard.js        # Dashboard data\n│   │   ├── invitations.js      # Team invitations\n│   │   ├── member-api.js       # Member API endpoints\n│   │   ├── member-api-simple.js # Simplified member API\n│   │   └── upload.js           # File upload handling\n│   ├── views/                   # EJS templates\n│   │   ├── layouts/            # Layout templates\n│   │   ├── partials/           # Reusable components\n│   │   ├── index.ejs           # Landing page\n│   │   ├── login.ejs           # Login page\n│   │   ├── register.ejs        # Registration page\n│   │   ├── dashboard.ejs       # Main dashboard\n│   │   ├── organiser-dashboard.ejs # Organizer dashboard\n│   │   ├── member-dashboard.ejs # Member dashboard\n│   │   └── [other pages].ejs   # Additional pages\n│   ├── public/                  # Static assets\n│   │   ├── css/                # Stylesheets\n│   │   └── js/                 # Client-side JavaScript\n│   └── utils/                   # Utility functions\n│       └── dashboardSummary.js # Dashboard calculations\n├── uploads/                     # File uploads directory\n├── logs/                        # Application logs\n├── package.json                 # Dependencies and scripts\n├── tailwind.config.js          # Tailwind CSS configuration\n├── postcss.config.js           # PostCSS configuration\n└── README.md                   # This file\n```\n\n## 🚀 Getting Started\n\n### Prerequisites\n\n- Node.js (v18.0.0 or higher)\n- MongoDB (v4.4 or higher)\n- npm or yarn\n\n### Installation\n\n1. **Clone the repository**\n\n   ```bash\n   git clone https://github.com/yourusername/collabspace.git\n   cd collabspace\n   ```\n\n2. **Install dependencies**\n\n   ```bash\n   npm install\n   ```\n\n3. **Environment Setup**\n   Create a `.env` file in the root directory:\n\n   ```env\n   # Database\n   MONGODB_URI=mongodb://localhost:27017/collabspace\n\n   # JWT\n   JWT_SECRET=your-super-secret-jwt-key\n   JWT_EXPIRES_IN=7d\n\n   # Session\n   SESSION_SECRET=your-session-secret\n\n   # Server\n   PORT=3000\n   NODE_ENV=development\n\n   # File Upload\n   UPLOAD_PATH=./uploads\n   MAX_FILE_SIZE=5242880\n   ```\n\n4. **Start MongoDB**\n\n   ```bash\n   # Using MongoDB service\n   sudo systemctl start mongod\n\n   # Or using Docker\n   docker run -d -p 27017:27017 --name mongodb mongo:latest\n   ```\n\n5. **Run the application**\n\n   ```bash\n   # Development mode\n   npm run dev\n\n   # Production mode\n   npm start\n   ```\n\n6. **Access the application**\n   Open your browser and navigate to `http://localhost:3000`\n\n## 🔧 Configuration\n\n### Database Configuration\n\nThe application uses MongoDB with Mongoose ODM. Database connection is configured in `src/config/database.js`:\n\n```javascript\nconst mongoose = require(\"mongoose\");\n\nconst connectDB = async () =\u003e {\n  try {\n    await mongoose.connect(process.env.MONGODB_URI);\n    console.log(\"MongoDB connected successfully\");\n  } catch (error) {\n    console.error(\"Database connection error:\", error);\n    process.exit(1);\n  }\n};\n```\n\n### Authentication\n\n- **Session-based authentication** for web interface\n- **JWT tokens** for API access\n- **Password hashing** with bcryptjs\n- **Rate limiting** to prevent brute force attacks\n\n### File Upload\n\n- **Multer** for handling multipart/form-data\n- **File type validation** for security\n- **Size limits** to prevent abuse\n- **Organized storage** in uploads directory\n\n## 📊 Database Schema\n\n### User Model\n\n```javascript\n{\n  username: String (unique, required),\n  email: String (unique, required),\n  password: String (required),\n  firstName: String (required),\n  lastName: String (required),\n  avatar: String,\n  phone: String,\n  bio: String,\n  isOnline: Boolean,\n  lastSeen: Date,\n  createdAt: Date,\n  updatedAt: Date\n}\n```\n\n### Team Model\n\n```javascript\n{\n  name: String (required),\n  description: String,\n  admin: ObjectId (ref: User),\n  members: [ObjectId] (ref: User),\n  avatar: String,\n  isPublic: Boolean,\n  lastActivity: Date,\n  lastMessage: ObjectId (ref: Message),\n  createdAt: Date,\n  updatedAt: Date\n}\n```\n\n### Task Model\n\n```javascript\n{\n  title: String (required),\n  description: String,\n  team: ObjectId (ref: Team),\n  assignedTo: ObjectId (ref: User),\n  createdBy: ObjectId (ref: User),\n  status: String (enum: ['todo', 'in_progress', 'review', 'completed']),\n  priority: String (enum: ['low', 'medium', 'high']),\n  dueDate: Date,\n  attachments: [Object],\n  isArchived: Boolean,\n  createdAt: Date,\n  updatedAt: Date\n}\n```\n\n### Message Model\n\n```javascript\n{\n  content: String (required),\n  team: ObjectId (ref: Team),\n  sender: ObjectId (ref: User),\n  messageType: String (enum: ['text', 'file', 'image', 'system']),\n  attachments: [Object],\n  reactions: [Object],\n  replyTo: Object,\n  mentions: [Object],\n  isEdited: Boolean,\n  editedAt: Date,\n  isDeleted: Boolean,\n  deletedAt: Date,\n  createdAt: Date,\n  updatedAt: Date\n}\n```\n\n## 🔌 API Endpoints\n\n### Authentication\n\n- `POST /api/auth/register` - User registration\n- `POST /api/auth/login` - User login\n- `POST /api/auth/logout` - User logout\n- `GET /api/auth/me` - Get current user\n\n### Users\n\n- `GET /api/users` - Get all users\n- `GET /api/users/:id` - Get user by ID\n- `PUT /api/users/:id` - Update user\n- `DELETE /api/users/:id` - Delete user\n\n### Teams\n\n- `GET /api/teams` - Get user's teams\n- `POST /api/teams` - Create team\n- `GET /api/teams/:id` - Get team details\n- `PUT /api/teams/:id` - Update team\n- `DELETE /api/teams/:id` - Delete team\n- `POST /api/teams/:id/members` - Add team member\n- `DELETE /api/teams/:id/members/:userId` - Remove team member\n\n### Tasks\n\n- `GET /api/tasks` - Get tasks\n- `POST /api/tasks` - Create task\n- `GET /api/tasks/:id` - Get task details\n- `PUT /api/tasks/:id` - Update task\n- `DELETE /api/tasks/:id` - Delete task\n\n### Chat \u0026 Messages\n\n- `GET /api/chat/conversations` - Get conversations\n- `GET /api/chat/messages/:conversationId` - Get messages\n- `POST /api/chat/messages` - Send message\n- `PUT /api/chat/messages/:id` - Edit message\n- `DELETE /api/chat/messages/:id` - Delete message\n\n### File Upload\n\n- `POST /api/upload` - Upload file\n- `GET /api/files/:filename` - Get file\n\n## 🎨 User Interface\n\n### Dashboard Types\n\n1. **Organizer Dashboard** - Full access to team management\n2. **Member Dashboard** - Limited access to assigned tasks and team chat\n\n### Key UI Components\n\n- **Navigation Sidebar** - Quick access to different sections\n- **Team Chat Interface** - Real-time messaging with file support\n- **Task Kanban Board** - Visual task management\n- **Team Management** - Create and manage teams\n- **User Profile** - Account settings and preferences\n\n## 🔒 Security Features\n\n- **Password Hashing** - bcryptjs with salt rounds\n- **Session Management** - Secure session storage\n- **Rate Limiting** - Prevent abuse and DDoS attacks\n- **Input Validation** - Sanitize and validate all inputs\n- **File Upload Security** - Type and size validation\n- **CORS Configuration** - Control cross-origin requests\n- **Helmet.js** - Security headers\n\n## 🚀 Deployment\n\n### Production Setup\n\n1. **Environment Variables**\n\n   ```env\n   NODE_ENV=production\n   MONGODB_URI=mongodb://your-production-db\n   JWT_SECRET=your-production-jwt-secret\n   SESSION_SECRET=your-production-session-secret\n   ```\n\n2. **Using PM2**\n\n   ```bash\n   npm run prod    # Start with PM2\n   npm run stop    # Stop PM2 process\n   npm run restart # Restart PM2 process\n   ```\n\n3. **Using Docker**\n   ```dockerfile\n   FROM node:18-alpine\n   WORKDIR /app\n   COPY package*.json ./\n   RUN npm ci --only=production\n   COPY . .\n   EXPOSE 3000\n   CMD [\"npm\", \"start\"]\n   ```\n\n### Deployment Platforms\n\n- **Heroku** - Easy deployment with buildpacks\n- **DigitalOcean** - VPS deployment\n- **AWS EC2** - Scalable cloud deployment\n- **Docker** - Containerized deployment\n\n## 🧪 Testing\n\n### Manual Testing\n\n- User registration and login\n- Team creation and management\n- Task creation and assignment\n- Real-time chat functionality\n- File upload and sharing\n\n### Test Scripts\n\n```bash\n# Test database connection\nnode test-app.js\n\n# Test date handling\nnode test-createdAt.js\n```\n\n## 📝 Development Guidelines\n\n### Code Style\n\n- Use ES6+ features\n- Follow async/await pattern\n- Implement proper error handling\n- Add comprehensive logging\n- Write descriptive comments\n\n### Git Workflow\n\n- Feature branches for new development\n- Pull requests for code review\n- Semantic commit messages\n- Regular merges to main branch\n\n## 🤝 Contributing\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🆘 Support\n\nFor support and questions:\n\n- Create an issue on GitHub\n- Check the documentation\n- Review the code comments\n- Contact the development team\n\n## 🔮 Future Enhancements\n\n- **Video Conferencing** - Integrated video calls\n- **Calendar Integration** - Task scheduling and deadlines\n- **Mobile App** - React Native or Flutter app\n- **Advanced Analytics** - Team performance metrics\n- **Third-party Integrations** - Slack, Discord, GitHub\n- **AI Features** - Smart task suggestions and chat bots\n\n---\n\n**CollabSpace** - Bringing teams together, one collaboration at a time! 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farsh342%2Fcollabspace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farsh342%2Fcollabspace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farsh342%2Fcollabspace/lists"}