Skip to content

falakrana/DevCollab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DevCollab β€” Enterprise Collaboration Platform

A modern developer collaboration platform combining task management and real-time communication, built with ASP.NET Core and Next.js.

🎯 Project Overview

DevCollab is a full-stack enterprise application demonstrating:

  • Enterprise Backend Development with ASP.NET Core
  • Real-time Communication using SignalR
  • Authentication & Authorization with JWT
  • Scalable Architecture with clean separation of concerns
  • Modern Frontend with Next.js and TypeScript

πŸ—οΈ Architecture

Next.js Frontend (Port 3000)
         ↓
ASP.NET Core Web API (Port 5000)
         ↓
   Service Layer
         ↓
Entity Framework Core
         ↓
   PostgreSQL Database

Real-time: Frontend ↔ SignalR ↔ ASP.NET Core

πŸš€ Tech Stack

Backend

  • ASP.NET Core 10 - Web API framework
  • Entity Framework Core 10 - ORM
  • PostgreSQL - Database
  • JWT Authentication - Secure authentication
  • BCrypt.Net - Password hashing
  • AutoMapper - Object mapping
  • FluentValidation - Input validation
  • SignalR - Real-time communication (coming soon)

Frontend (Coming Soon)

  • Next.js 15 - React framework
  • TypeScript - Type safety
  • Tailwind CSS - Styling
  • Axios - HTTP client
  • Zustand - State management
  • SignalR Client - Real-time updates

πŸ“‹ Features

Phase 1: Authentication βœ…

  • User registration
  • User login
  • JWT token generation
  • Password hashing with BCrypt
  • Role-based authorization setup

Phase 2: Database & Models βœ…

  • User model
  • Workspace model
  • Task model
  • Message model
  • Notification model
  • WorkspaceMember model
  • Entity relationships configured

Phase 3: CRUD APIs (In Progress)

  • Workspace management
  • Task management
  • Member management
  • Activity tracking

Phase 4: Real-Time Features (Planned)

  • SignalR hub setup
  • Real-time chat
  • Live notifications
  • Typing indicators
  • Task updates broadcast

Phase 5: Frontend (Planned)

  • Next.js setup
  • Authentication pages
  • Dashboard
  • Workspace views
  • Task board
  • Chat interface

Phase 6: Deployment (Planned)

  • Docker containerization
  • Backend deployment (Railway/Render)
  • Frontend deployment (Vercel)
  • Database hosting

πŸ› οΈ Getting Started

Prerequisites

Backend Setup

  1. Clone the repository

    git clone <your-repo-url>
    cd DevCollab
  2. Set up PostgreSQL Database

    Option A: Local PostgreSQL (Recommended if you have PostgreSQL installed)

    See detailed guide: LOCAL_POSTGRESQL_SETUP.md

    Quick steps:

    • Open pgAdmin 4
    • Create database: devcollab
    • Update DevCollab.API/appsettings.json with your password:
      "ConnectionStrings": {
        "DefaultConnection": "Host=localhost;Port=5432;Database=devcollab;Username=postgres;Password=YOUR_PASSWORD"
      }

    Option B: Docker (Alternative)

    docker-compose up -d
  3. Run database migrations

    cd DevCollab.API
    dotnet ef migrations add InitialCreate
    dotnet ef database update
  4. Run the API

    dotnet run

    The API will be available at:

    • HTTPS: https://localhost:5001
    • HTTP: http://localhost:5000
    • Swagger: https://localhost:5001/swagger

Frontend Setup (Coming Soon)

cd frontend
npm install
npm run dev

πŸ“ Project Structure

Backend Structure

DevCollab.API/
β”œβ”€β”€ Controllers/        # API endpoints
β”œβ”€β”€ Services/          # Business logic
β”œβ”€β”€ Repositories/      # Data access (coming soon)
β”œβ”€β”€ DTOs/             # Data transfer objects
β”œβ”€β”€ Models/           # Entity models
β”œβ”€β”€ Data/             # DbContext
β”œβ”€β”€ Hubs/             # SignalR hubs (coming soon)
β”œβ”€β”€ Middleware/       # Custom middleware (coming soon)
β”œβ”€β”€ Validators/       # FluentValidation rules (coming soon)
β”œβ”€β”€ Mappings/         # AutoMapper profiles (coming soon)
β”œβ”€β”€ Interfaces/       # Service interfaces (coming soon)
└── Program.cs        # Application entry point

πŸ” API Endpoints

Authentication

Register

POST /api/auth/register
Content-Type: application/json

{
  "name": "John Doe",
  "email": "john@example.com",
  "password": "SecurePassword123!"
}

Response:

{
  "id": 1,
  "name": "John Doe",
  "email": "john@example.com",
  "role": "Member",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Login

POST /api/auth/login
Content-Type: application/json

{
  "email": "john@example.com",
  "password": "SecurePassword123!"
}

Response:

{
  "id": 1,
  "name": "John Doe",
  "email": "john@example.com",
  "role": "Member",
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Workspaces (Coming Soon)

  • GET /api/workspaces - Get all workspaces
  • POST /api/workspaces - Create workspace
  • GET /api/workspaces/{id} - Get workspace by ID
  • PUT /api/workspaces/{id} - Update workspace
  • DELETE /api/workspaces/{id} - Delete workspace

Tasks (Coming Soon)

  • GET /api/workspaces/{workspaceId}/tasks - Get all tasks
  • POST /api/workspaces/{workspaceId}/tasks - Create task
  • PUT /api/tasks/{id} - Update task
  • DELETE /api/tasks/{id} - Delete task

πŸ—„οΈ Database Schema

Users

  • Id (PK)
  • Name
  • Email (Unique)
  • PasswordHash
  • Role
  • CreatedAt

Workspaces

  • Id (PK)
  • Name
  • Description
  • OwnerId (FK β†’ Users)
  • CreatedAt

WorkspaceMembers

  • Id (PK)
  • WorkspaceId (FK β†’ Workspaces)
  • UserId (FK β†’ Users)
  • Role
  • JoinedAt

Tasks

  • Id (PK)
  • Title
  • Description
  • Status (Todo, InProgress, Done)
  • Priority (Low, Medium, High, Urgent)
  • AssignedTo (FK β†’ Users)
  • WorkspaceId (FK β†’ Workspaces)
  • DueDate
  • CreatedAt
  • UpdatedAt

Messages

  • Id (PK)
  • WorkspaceId (FK β†’ Workspaces)
  • SenderId (FK β†’ Users)
  • Content
  • CreatedAt

Notifications

  • Id (PK)
  • UserId (FK β†’ Users)
  • Title
  • Message
  • IsRead
  • CreatedAt

πŸ§ͺ Testing with Swagger

  1. Start the API: dotnet run
  2. Open Swagger UI: https://localhost:5001/swagger
  3. Test the /api/auth/register endpoint
  4. Copy the JWT token from the response
  5. Click "Authorize" button in Swagger
  6. Enter: Bearer <your-token>
  7. Test protected endpoints

πŸ”§ Development Commands

Entity Framework Migrations

# Create a new migration
dotnet ef migrations add MigrationName

# Update database
dotnet ef database update

# Remove last migration
dotnet ef migrations remove

# List all migrations
dotnet ef migrations list

Database Management

# Start PostgreSQL
docker-compose up -d

# Stop PostgreSQL
docker-compose down

# View logs
docker-compose logs -f postgres

# Reset database (WARNING: Deletes all data)
docker-compose down -v
docker-compose up -d
dotnet ef database update

πŸ“š Learning Resources

ASP.NET Core

SignalR

Next.js

🚧 Roadmap

  • Phase 1: Project setup & authentication
  • Phase 2: Workspace & task CRUD APIs
  • Phase 3: SignalR real-time features
  • Phase 4: Frontend development
  • Phase 5: Testing & optimization
  • Phase 6: Deployment

🀝 Contributing

This is a learning project. Feel free to:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

πŸ“ Notes

  • Security: Change the JWT secret key in production
  • Database: Update PostgreSQL credentials for production
  • CORS: Update allowed origins for production
  • AutoMapper Warning: Version 12.0.1 has a known vulnerability. Monitor for updates.

πŸ“„ License

This project is for educational purposes.

πŸŽ“ What You'll Learn

  • Building RESTful APIs with ASP.NET Core
  • Database design and Entity Framework Core
  • JWT authentication and authorization
  • Real-time communication with SignalR
  • Clean architecture principles
  • Repository and service patterns
  • Docker containerization
  • Full-stack application deployment

Happy Coding! πŸš€

About

A modern developer collaboration platform combining task management and real-time communication, built with ASP.NET Core and Next.js.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages