Skip to content

A sophisticated collaboration platform designed to streamline team workflows and enhance productivity through intuitive project management tools. This full-stack application provides teams with a centralized workspace to create, track, and complete projects with ease.

License

Notifications You must be signed in to change notification settings

atpritam/project-collab-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

98 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nudge - Project Collaboration Platform

Next.js Express TypeScript PostgreSQL TailwindCSS Node.js JWT Socket.IO Stripe SMTP Docker

Nudge Logo

Table of Contents

  1. Overview
  2. Key Features
  3. Subscription & Payment System
  4. 🛠️ Technology Stack
  5. Testing
  6. Architecture
  7. Subscription System Architecture
  8. Security Features
  9. Getting Started
  10. Local Development
  11. Contribution

Overview

Nudge is a sophisticated project collaboration platform designed to streamline team workflows and enhance productivity through intuitive project management tools. This full-stack application provides teams with a centralized workspace to create, track, and complete projects with ease.

🔗 Live Demo: project-collab-app.vercel.app
Backend: Express.js API with PostgreSQL database deployed on Nortflank

Accounts created with email/password require activation before login. You can sign up with Google or GitHub for instant verification.

Key Features

  • Project Management: Create, edit, and organize projects
  • Team Collaboration: Invite team members, assign roles, and track contributions
  • Role-Based Access Control: Three-tiered permission system (Admin, Editor, Member) for secure collaboration
  • Task Management: Create, assign, and track tasks with priority levels, due dates, and status tracking
  • Real-time Communication: Integrated real-time chat system for both direct messaging and team discussions
  • Email Service: Email system for account verification, password reset, project invitations, security notifications and much more
  • File Management: Upload, organize, and share files within projects and tasks
  • Comprehensive Dashboard: Visual overview of projects, tasks, and recent activities
  • Calendar & Deadlines: Track important project milestones and deadlines
  • Kanban Board View: Drag-and-drop task management with visual workflow stages
  • Responsive Design: Fully mobile-responsive interface for collaboration on any device

Nudge Logo

Subscription & Payment System

  • Flexible Subscription Plans: Three-tiered pricing (Starter, Pro, Enterprise) with different limits and features
  • Stripe Integration: Secure payment processing with Stripe Checkout and Billing Portal
  • Usage-Based Limits: Project and team member limits based on subscription tier
  • Real-time Billing: Automatic subscription management with webhook integration

Subscription Tiers

Plan Projects Team Members Storage Price
Starter 5 4 100MB Free
Pro 100 15 10GB $29/month
Enterprise Unlimited Unlimited 100GB $79/month

Nudge Logo

Auto-Accept Team Invitation

For demo and testing purposes, any invitation sent to "pritam.amit26@gmail.com" to join a project as a member will be automatically accepted.

🛠️ Technology Stack

Frontend

  • Framework: Next.js 15 with App Router
  • UI: TailwindCSS with customized UI components
  • Authentication: NextAuth.js with email/password and social authentication (Google, Github)
  • Form Handling: React Hook Form with Zod validation
  • File Uploads: UploadThing integration

Backend

  • Server: Node.js with Express
  • Database: PostgreSQL with Prisma ORM
  • Authentication: JWT with bcrypt password hashing
  • Real-time Communication: Socket.IO server
  • Email Service: Integrated with Resend/SMTP for notifications
  • Payment Processing: Stripe integration with webhooks for subscription management

DevOps

  • Docker with multi-container setup
  • Docker Compose for local development and deployment

Testing

Nudge includes a comprehensive testing suite demonstrating modern testing practices and code quality assurance:

Test Coverage

  • Backend Tests: 40 tests covering authentication, validation, and utility functions
  • Frontend Tests: 47 tests covering components, forms, and user interactions
  • Total Coverage: 87 tests ensuring reliability and maintainability

Testing Technologies

  • Backend: Jest, Supertest, TypeScript testing with mocked dependencies
  • Frontend: Jest, React Testing Library, user event simulation
  • Coverage Reporting: Detailed coverage analysis with HTML and LCOV reports

Running Tests

# Backend tests
cd backend
npm test
npm run test:coverage

# Frontend tests
cd frontend
npm test
npm run test:coverage

# Watch mode for development
npm run test:watch

Test Categories

  • Unit Tests: Individual function and component testing
  • Integration Tests: API endpoint testing with mocked dependencies
  • Component Tests: React component rendering and user interaction testing
  • Security Tests: Input validation, sanitization, and authentication testing

Architecture

Nudge is built on a modern, microservices-oriented architecture:

  • Frontend Container: Next.js application serving the user interface
  • Backend Container: Express API providing business logic and data access
  • Database Container: PostgreSQL instance for persistent storage

The application uses a RESTful API for most operations, with Socket.io for real-time features like messaging and status updates.

Nudge Logo

Subscription System Architecture

Payment Flow

  1. Plan Selection: Users choose from Starter, Pro, or Enterprise plans
  2. Stripe Checkout: Secure payment processing through Stripe Checkout
  3. Webhook Processing: Real-time subscription updates via Stripe webhooks
  4. Database Sync: Automatic subscription status and limits updates
  5. Billing Portal: Self-service billing management for customers

Security Features

Authentication & Authorization

  • Email Verification: Required account activation for email/password registrations
  • Password Security: Enforced strong password requirements with bcrypt hashing

Data Protection

  • Input Validation: Comprehensive request validation using Joi schemas
  • HTML Sanitization: Protection against XSS attacks through input sanitization
  • SQL Injection Prevention: Prisma ORM provides built-in protection against SQL injection
  • CORS Configuration: Properly configured cross-origin resource sharing

Rate Limiting & DDoS Protection

  • Global Rate Limiting: 1000 requests per 15 minutes per IP
  • Authentication Rate Limiting: 10 login attempts per 15 minutes per IP
  • Message Rate Limiting: 300 messages per minute per IP
  • Targeted Protection: Specific limits for sensitive endpoints

Security Headers

  • Helmet.js Integration: Comprehensive security headers including:
    • Content Security Policy (CSP)
    • X-Frame-Options (Clickjacking protection)
    • X-Content-Type-Options (MIME sniffing protection)
    • Referrer Policy controls
    • Permissions Policy restrictions

Getting Started

Prerequisites

  • Docker and Docker Compose
  • Node.js (v18 or higher)
  • npm or yarn

Installation

  1. Clone the repository:
git clone https://github.com/atpritam/project-collab-app.git
cd project-collab-app
  1. Set up environment variables:
cp backend/.env.example backend/.env
cp frontend/.env.example frontend/.env

Required Environment Variables:

Backend (.env):

# Database
DATABASE_URL="postgresql://username:password@localhost:5432/nudge_db"

# JWT
JWT_SECRET="your-jwt-secret"

# Email (Resend/SMTP)
EMAIL_FROM="noreply@yourdomain.com"
RESEND_API_KEY="your-resend-api-key"

# Stripe
STRIPE_SECRET_KEY="sk_test_..."
STRIPE_WEBHOOK_SECRET="whsec_..."
FRONTEND_URL="http://localhost:3000"

# Server
PORT=4000

Frontend (.env.local):

# API
NEXT_PUBLIC_API_URL="http://localhost:4000"

# NextAuth
NEXTAUTH_URL="http://localhost:3000"
NEXTAUTH_SECRET="your-nextauth-secret"

# OAuth Providers
GOOGLE_CLIENT_ID="your-google-client-id"
GOOGLE_CLIENT_SECRET="your-google-client-secret"
GITHUB_CLIENT_ID="your-github-client-id"
GITHUB_CLIENT_SECRET="your-github-client-secret"

# UploadThing
UPLOADTHING_SECRET="your-uploadthing-secret"
UPLOADTHING_APP_ID="your-uploadthing-app-id"
  1. Start the application with Docker:
docker-compose up
  1. Set up Stripe (for subscription features):
# Install Stripe CLI
# macOS
brew install stripe/stripe-cli/stripe

# Linux/Windows - Download from https://stripe.com/docs/stripe-cli

# Login to Stripe
stripe login

# Forward webhooks to local development
stripe listen --forward-to localhost:4000/api/subscriptions/webhook

# Copy the webhook secret to your backend .env file
  1. Access the application:

Local Development

For local development without Docker:

  1. Install dependencies:

    # Frontend
    cd frontend
    npm install
    
    # Backend
    cd backend
    npm install
  2. Set up the database:

    cd backend
    npx prisma migrate dev
  3. Start the development servers:

    # Frontend
    cd frontend
    npm run dev
    
    # Backend
    cd backend
    npm run dev

Nudge Logo

Contribution

This project demonstrates my skills in full-stack development, architecture design, payment system integration, and creating intuitive user experiences. As a portfolio piece, it showcases my ability to build complex systems with modern web technologies including:

  • Full-Stack Development: Next.js, Express.js, PostgreSQL, TypeScript
  • Payment Integration: Stripe subscription management with webhooks
  • Real-time Features: Socket.IO for messaging and live updates
  • Authentication & Security: JWT, OAuth, rate limiting, input validation
  • Database Design: PostgreSQL with complex relationships and queries
  • Testing & Quality Assurance: Comprehensive test suite with Jest, React Testing Library, and Supertest
  • DevOps: Docker containerization and deployment strategies

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

© 2025 Nudge. All rights reserved.

About

A sophisticated collaboration platform designed to streamline team workflows and enhance productivity through intuitive project management tools. This full-stack application provides teams with a centralized workspace to create, track, and complete projects with ease.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages