Skip to content

AdnanOlarmmi/CollabN-More

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

28 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ CollabN-More - Microservices Architecture

A full-stack collaborative platform (Slack clone) built with modern microservices architecture, featuring real-time messaging, workspaces, channels, and more.

πŸ“‹ Table of Contents


🎯 Overview

This is a production-ready collaborative platform featuring:

  • βœ… Microservices Architecture - Independent, scalable services
  • βœ… Real-time Communication - WebSockets for instant messaging
  • βœ… Workspace Management - Teams, channels, and permissions
  • βœ… Secure Authentication - JWT-based auth with bcrypt hashing
  • βœ… Type Safety - Full TypeScript implementation
  • βœ… Containerized - Docker Compose for easy deployment

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Frontend   β”‚
β”‚  (React)    β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”˜
       β”‚
β”Œβ”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  API Gateway    β”‚  (Port 3000)
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
    β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚         β”‚        β”‚          β”‚           β”‚
β”Œβ”€β”€β”€β–Όβ”€β”€β”€β” β”Œβ”€β”€β–Όβ”€β”€β” β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β” β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β” β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β”
β”‚ Auth  β”‚ β”‚Chat β”‚ β”‚Workspaceβ”‚ β”‚ Media  β”‚ β”‚ Notify β”‚
β”‚:3001  β”‚ β”‚:3002β”‚ β”‚  :3003  β”‚ β”‚ :3004  β”‚ β”‚ :3005  β”‚
β””β”€β”€β”€β”¬β”€β”€β”€β”˜ β””β”€β”€β”¬β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”˜
    β”‚        β”‚         β”‚           β”‚          β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                       β”‚
        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
        β”‚              β”‚              β”‚
   β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”    β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”     β”Œβ”€β”€β”€β–Όβ”€β”€β”€β”€β”
   β”‚PostgreSQLβ”‚    β”‚MongoDBβ”‚     β”‚ Redis  β”‚
   β”‚  :5433  β”‚    β”‚:27017 β”‚     β”‚ :6379  β”‚
   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ”§ Services

βœ… Auth Service (Port 3001) - COMPLETED

Status: 🟒 Production Ready

Responsibilities:

  • User registration and authentication
  • JWT token generation and verification
  • Password hashing with bcrypt
  • Protected route middleware

Tech Stack:

  • Node.js + Express + TypeScript
  • PostgreSQL + Prisma ORM
  • JWT + bcrypt + Zod validation

Endpoints:

Method Endpoint Description Auth Required
POST /auth/register Register new user No
POST /auth/login Login user No
GET /auth/me Get current user Yes
GET /health Health check No

Database Schema:

model User {
  id              String
  email           String   @unique
  username        String   @unique
  passwordHash    String
  displayName     String
  role            Role     @default(USER)
  // ... more fields
}

🚧 Workspace Service (Port 3003) - IN PROGRESS

Status: 🟑 Under Development

Responsibilities:

  • Workspace (team) management
  • Channel creation and management
  • Membership and permissions
  • Workspace/channel settings

Planned Features:

  • Create/update/delete workspaces
  • Public/private channels
  • User invitations
  • Role-based permissions

πŸ“… Chat Service (Port 3002) - PLANNED

Real-time messaging with WebSockets


πŸ“… Media Service (Port 3004) - PLANNED

File uploads and storage


πŸ“… Notification Service (Port 3005) - PLANNED

Real-time notifications


πŸ“… API Gateway (Port 3000) - PLANNED

Central routing and load balancing


πŸ› οΈ Tech Stack

Backend

Technology Purpose
Node.js + Express Web framework
TypeScript Type safety
Prisma Database ORM
PostgreSQL Primary database
MongoDB Chat/messages storage
Redis Caching & sessions
RabbitMQ Message queue
JWT Authentication
bcrypt Password hashing
Zod Input validation
Socket.io Real-time communication

Infrastructure

  • Docker + Docker Compose
  • Microservices architecture
  • RESTful APIs
  • WebSocket connections

πŸš€ Getting Started

Prerequisites

  • Node.js 18+
  • Docker & Docker Compose
  • Git

Installation

  1. Clone the repository
git clone <your-repo-url>
cd CollabN-More
  1. Start all services with Docker Compose
docker-compose up
  1. Or run individual services locally:

Auth Service:

cd services/auth
npm install
npm run prisma:generate
npm run prisma:migrate
npm run dev

Workspace Service:

cd services/workspace
npm install
npm run prisma:generate
npm run prisma:migrate
npm run dev

Environment Variables

Each service needs a .env file. See .env.example in each service folder.


πŸ“‘ API Documentation

Auth Service

Register User

POST http://localhost:3001/auth/register
Content-Type: application/json

{
  "email": "user@example.com",
  "username": "johndoe",
  "displayName": "John Doe",
  "password": "Password123!",
  "timezone": "UTC"
}

Login

POST http://localhost:3001/auth/login
Content-Type: application/json

{
  "email": "user@example.com",
  "password": "Password123!"
}

Get Current User

GET http://localhost:3001/auth/me
Authorization: Bearer <your-jwt-token>

πŸ“‚ Project Structure

CollabN-More/
β”œβ”€β”€ services/
β”‚   β”œβ”€β”€ auth/           βœ… Complete
β”‚   β”œβ”€β”€ workspace/      🚧 In Progress
β”‚   β”œβ”€β”€ chat/           πŸ“… Planned
β”‚   β”œβ”€β”€ media/          πŸ“… Planned
β”‚   └── notification/   πŸ“… Planned
β”œβ”€β”€ api-gateway/        πŸ“… Planned
β”œβ”€β”€ frontend/           πŸ“… Planned
β”œβ”€β”€ docker-compose.yml
└── README.md

🎯 Roadmap

  • Project setup
  • Auth Service (registration, login, JWT)
  • Workspace Service (teams, channels, permissions)
  • Chat Service (real-time messaging)
  • Media Service (file uploads)
  • Notification Service
  • API Gateway
  • Frontend (React)
  • Deployment

πŸ‘¨β€πŸ’» Author

Built as a portfolio project to demonstrate full-stack microservices architecture.


πŸ“ License

This project is for educational purposes.

About

Cheap send

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors