Skip to content

er-pritamdas/Progress-Pulse

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

244 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“Š Progress Pulse

Progress Pulse Logo

A Modern Full-Stack Personal Productivity & Finance Management Platform

React Node.js MongoDB Docker CI/CD


๐Ÿš€ Overview

Progress Pulse is a comprehensive personal productivity and finance management platform that helps users track their habits, manage expenses, and monitor investments all in one place. Built with modern technologies and following industry best practices, it offers a seamless experience across all aspects of personal development and financial wellness.

โœจ Key Features

๐ŸŽฏ Habit Tracking - Build and maintain positive daily habits ๐Ÿ’ฐ Expense Management - Track and categorize your spending ๐Ÿ“ˆ Investment Portfolio - Monitor your investment performance ๐Ÿ” Secure Authentication - JWT-based auth with refresh tokens ๐Ÿ“ฑ Responsive Design - Works perfectly on all devices ๐Ÿณ Containerized Deployment - Docker-ready for any environment โšก CI/CD Pipeline - Automated testing, building, and deployment


๐Ÿ—๏ธ Architecture Overview

Progress Pulse follows a modern MERN Stack architecture with a microservices-inspired design pattern:

๐ŸŽจ Frontend Architecture (Client)

Client/
โ”œโ”€โ”€ ๐Ÿ“ src/
โ”‚   โ”œโ”€โ”€ ๐ŸŽจ components/          # Reusable UI components
โ”‚   โ”‚   โ”œโ”€โ”€ Authentication/     # Login/Signup components
โ”‚   โ”‚   โ”œโ”€โ”€ Dashboard/         # Main dashboard modules
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Habit/         # Habit tracking components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Expense/       # Expense management components
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Investment/    # Investment tracking components
โ”‚   โ”‚   โ””โ”€โ”€ Homepage/          # Landing page components
โ”‚   โ”œโ”€โ”€ ๐Ÿง  Context/            # React Context providers
โ”‚   โ”‚   โ”œโ”€โ”€ JwtAuthContext.jsx # Authentication context
โ”‚   โ”‚   โ”œโ”€โ”€ AxiosInstance.jsx  # API client configuration
โ”‚   โ”‚   โ””โ”€โ”€ LoadingContext.jsx # Loading state management
โ”‚   โ”œโ”€โ”€ ๐ŸŽญ pages/              # Page components
โ”‚   โ”œโ”€โ”€ ๐Ÿ”„ services/           # Redux store and slices
โ”‚   โ”œโ”€โ”€ ๐ŸŽฏ layouts/            # Layout components
โ”‚   โ””โ”€โ”€ ๐Ÿ› ๏ธ utils/              # Utility functions and helpers
โ”œโ”€โ”€ ๐Ÿ“‹ public/                 # Static assets
โ””โ”€โ”€ โš™๏ธ Configuration Files     # Vite, ESLint, Tailwind configs

๐Ÿ”ง Backend Architecture (Server)

Server/
โ”œโ”€โ”€ ๐ŸŽฎ controllers/            # Business logic handlers
โ”‚   โ”œโ”€โ”€ User-controllers/      # User authentication & management
โ”‚   โ”œโ”€โ”€ Habit-controllers/     # Habit tracking logic
โ”‚   โ””โ”€โ”€ Expense-controllers/   # Expense management logic
โ”œโ”€โ”€ ๐Ÿ—„๏ธ models/                # MongoDB schemas
โ”‚   โ”œโ”€โ”€ User-models/          # User data models
โ”‚   โ”œโ”€โ”€ Habit-models/         # Habit tracking models
โ”‚   โ””โ”€โ”€ Expense-models/       # Expense data models
โ”œโ”€โ”€ ๐Ÿ”’ middlewares/           # Authentication & validation
โ”‚   โ”œโ”€โ”€ JwtAuthorization.middleware.js
โ”‚   โ”œโ”€โ”€ JwtRefreshTokenValidation.middleware.js
โ”‚   โ””โ”€โ”€ OtpVerification.middleware.js
โ”œโ”€โ”€ ๐Ÿ›ค๏ธ routes/                # API endpoints
โ”œโ”€โ”€ ๐Ÿ—ƒ๏ธ db/                    # Database configuration
โ””โ”€โ”€ ๐Ÿ› ๏ธ utils/                 # Utility functions

๐Ÿ”„ Application Flow Diagrams

๐Ÿ” Authentication & JWT Token Flow

The authentication system uses a dual-token approach with access and refresh tokens for enhanced security:

  • Access Token: Short-lived (15 minutes), stored in localStorage
  • Refresh Token: Long-lived (7 days), stored in httpOnly cookies
  • Auto-refresh: Seamless token renewal without user intervention
sequenceDiagram
    participant U as "๐Ÿ” User"
    participant C as "โš›๏ธ Client (React)"
    participant S as "๐Ÿ”ง Server (Express)"
    participant DB as "๐Ÿƒ MongoDB"
    participant E as "๐Ÿ“ง Email Service"

    Note over U,E: User Registration Flow
    U->>C: Enter registration details
    C->>S: POST /api/v1/users/registered
    S->>DB: Check if user exists
    alt User not exists
        S->>DB: Create new user (unverified)
        S->>E: Send OTP email
        S->>C: Registration successful, verify OTP
        C->>U: Show OTP verification page
        U->>C: Enter OTP
        C->>S: POST /verify-otp
        S->>DB: Verify OTP & activate user
        S->>C: User activated
    else User exists
        S->>C: User already exists error
    end

    Note over U,E: Login Flow
    U->>C: Enter login credentials
    C->>S: POST /api/v1/users/loggedin
    S->>DB: Validate credentials
    alt Valid credentials
        S->>S: Generate Access & Refresh Tokens
        S->>C: Return tokens
        C->>C: Store tokens (localStorage + cookies)
        C->>U: Redirect to dashboard
    else Invalid credentials
        S->>C: Authentication error
    end

    Note over U,E: Token Refresh Flow
    C->>S: API request with expired token
    S->>C: 401 Unauthorized
    C->>S: POST /refresh-token (with refresh token)
    S->>S: Validate refresh token
    S->>S: Generate new access token
    S->>C: New access token
    C->>S: Retry original request
    S->>C: Success response
Loading

๐Ÿ“Š System Architecture Flow

Our architecture follows a separation of concerns principle with clear data flow:

  1. Frontend Layer: React components handle UI interactions
  2. API Layer: Express.js manages HTTP requests and routing
  3. Business Logic: Controllers process application logic
  4. Data Layer: Mongoose models interact with MongoDB
  5. External Services: Email notifications and logging
flowchart TD
    A["๐ŸŒ User Interface<br/>(React Components)"] --> B["โš›๏ธ React Frontend<br/>(Vite Dev Server)"]
    B --> C["๐Ÿ”„ Axios Instance<br/>(HTTP Client)"]
    C --> D["๐Ÿ”’ JWT Middleware<br/>(Token Validation)"]
    D --> E["๐Ÿ›ค๏ธ Express Routes<br/>(API Endpoints)"]
    E --> F["๐ŸŽฎ Controllers<br/>(Business Logic)"]
    F --> G["๐Ÿ—„๏ธ Mongoose Models<br/>(Data Layer)"]
    G --> H["๐Ÿ“Š MongoDB Database<br/>(Data Storage)"]
    
    B --> I["๐Ÿช Redux Store<br/>(Global State)"]
    I --> J["๐Ÿ“ฑ Local State<br/>(Component State)"]
    
    F --> K["๐Ÿ“ง Nodemailer<br/>(Email Service)"]
    F --> L["๐Ÿ“ Winston Logger<br/>(Application Logs)"]
    
    M["๐Ÿณ Docker Container<br/>(Containerization)"] --> B
    M --> E
    
    N["โš™๏ธ CI/CD Pipeline<br/>(GitHub Actions)"] --> O["๐Ÿ—๏ธ Build Process"]
    O --> P["๐Ÿ“ฆ Docker Images"]
    P --> Q["๐Ÿš€ Production Deployment"]
    
    style A fill:#e1f5fe,stroke:#01579b,stroke-width:2px
    style B fill:#f3e5f5,stroke:#4a148c,stroke-width:2px
    style H fill:#e8f5e8,stroke:#1b5e20,stroke-width:2px
    style K fill:#fff3e0,stroke:#e65100,stroke-width:2px
    style M fill:#e3f2fd,stroke:#0d47a1,stroke-width:2px
    style Q fill:#f1f8e9,stroke:#33691e,stroke-width:2px
Loading

๐Ÿ’ผ Technology Stack

๐ŸŽจ Frontend Technologies

Technology Version Purpose
โš›๏ธReact 19.0.0 UI Framework
โšกVite 6.2.0 Build Tool & Dev Server
๐ŸŽจTailwind CSS 4.0.14 Utility-First CSS Framework
๐ŸŒธDaisyUI 5.0.6 UI Component Library
๐ŸŽญMaterial-UI 7.0.1 React Components
๐Ÿ”„Redux Toolkit 2.8.1 State Management
๐Ÿ“กAxios 1.8.4 HTTP Client
๐ŸŽฏReact Router 7.3.0 Client-side Routing
๐Ÿ“ŠChart Libraries Latest Data Visualization
๐ŸŽฌFramer Motion 12.9.2 Animations

๐Ÿ”ง Backend Technologies

Technology Version Purpose
๐ŸŸขNode.js Latest Runtime Environment
๐Ÿš‚Express.js 4.21.2 Web Framework
๐ŸƒMongoDB Latest NoSQL Database
๐Ÿ“ฆMongoose 8.12.1 MongoDB ODM
๐Ÿ”‘JSON Web Token 9.0.2 Authentication
๐Ÿ”’bcryptjs 3.0.2 Password Hashing
๐Ÿ“งNodemailer 6.10.0 Email Service
๐Ÿ“Winston 3.17.0 Logging
๐ŸชCookie Parser 1.4.7 Cookie Handling
๐ŸŒCORS 2.8.5 Cross-Origin Requests

๐Ÿณ DevOps & Deployment

Technology Purpose
๐ŸณDocker Containerization
๐Ÿ™Docker Compose Multi-container Management
๐ŸŒNginx Reverse Proxy & Load Balancing
โš™๏ธGitHub Actions CI/CD Pipeline
๐Ÿ“ŠMonitoring Tools Application Monitoring

๐Ÿ” Authentication & Security

JWT Token Management System

Progress Pulse implements a robust dual-token authentication system for enhanced security:

๐ŸŽฏ Access Token Workflow

  • Lifespan: 15 minutes (short-lived for security)
  • Storage: localStorage (easily accessible for API calls)
  • Usage: Sent with every API request in Authorization header
  • Auto-renewal: Automatically refreshed when expired

๐Ÿ”„ Refresh Token Workflow

  • Lifespan: 7 days (long-lived for convenience)
  • Storage: httpOnly cookies (XSS protection)
  • Usage: Used only to generate new access tokens
  • Rotation: New refresh token issued on each renewal

๐Ÿ›ก๏ธ Security Features Implemented

โœ… Password Security

  • bcryptjs hashing with salt rounds
  • Strong password policy enforcement
  • Password reset with OTP verification

โœ… Token Security

  • JWT with RS256 algorithm
  • Token expiration and rotation
  • Secure cookie settings (httpOnly, secure, sameSite)

โœ… API Security

  • CORS configuration for trusted domains
  • Rate limiting middleware
  • Input validation and sanitization
  • SQL injection prevention

โœ… Authentication Flow

  • OTP-based email verification
  • Multi-step authentication process
  • Automatic token refresh mechanism
  • Secure session management

๐Ÿณ CI/CD Pipeline & Docker Architecture

DevOps Architecture

๐Ÿ”„ Continuous Integration/Continuous Deployment

Our project implements a streamlined CI/CD pipeline using Docker containerization for consistent deployments across environments.

flowchart LR
    A["๐Ÿ‘จโ€๐Ÿ’ป Developer<br/>(Code Changes)"] --> B["๐Ÿ“š Git Repository<br/>(Version Control)"]
    B --> C["๐Ÿ”„ GitHub Actions<br/>(CI/CD Pipeline)"]
    C --> D["๐Ÿงช Automated Tests<br/>(Unit & Integration)"]
    D --> E["๐Ÿ—๏ธ Build Docker Images<br/>(Frontend & Backend)"]
    E --> F["๐Ÿ“ฆ Container Registry<br/>(Docker Hub)"]
    F --> G["๐Ÿš€ Production Deploy<br/>(Container Orchestration)"]
    
    H["๐Ÿณ Development Environment<br/>(Docker Compose)"] --> I["๐Ÿ”ง Backend Container<br/>(Node.js + Express)"]
    H --> J["๐ŸŽจ Frontend Container<br/>(React + Vite)"]
    I --> K["๐Ÿ—„๏ธ Database<br/>(MongoDB)"]
    
    L["๐Ÿญ Production Environment<br/>(Docker Compose)"] --> M["๐Ÿ”ง Backend Container<br/>(Production Build)"]
    L --> N["๐ŸŽจ Frontend Container<br/>(Nginx + React)"]
    M --> O["๐Ÿ—„๏ธ Production Database<br/>(MongoDB Cloud)"]
    
    style A fill:#e3f2fd,stroke:#0d47a1,stroke-width:2px
    style C fill:#f3e5f5,stroke:#4a148c,stroke-width:2px
    style G fill:#e8f5e8,stroke:#1b5e20,stroke-width:2px
    style H fill:#fff8e1,stroke:#e65100,stroke-width:2px
    style L fill:#f1f8e9,stroke:#33691e,stroke-width:2px
Loading

๐Ÿณ Docker Configuration

๐Ÿ“ Development Environment

# DevOps/01.Build/Development/docker-compose.yml
version: "3.9"

services:
  backend:
    build:
      context: ../../../Server
      dockerfile: ../DevOps/01.Build/Development/backend.Dockerfile
    container_name: backend
    networks:
      - mern-network
    volumes:
      - backend_data:/app
    env_file:
      - ../../../Server/.env

  frontend:
    build:
      context: ../../../Client
      dockerfile: ../DevOps/01.Build/Development/frontend.Dockerfile
    container_name: frontend
    ports:
      - "5173:5173"
    networks:
      - mern-network
    volumes:
      - frontend_data:/app
    depends_on:
      - backend

networks:
  mern-network:
    driver: bridge

volumes:
  backend_data:
  frontend_data:

๐Ÿš€ Production Environment

# DevOps/01.Build/Production/docker-compose.yml
version: "3.9"

services:
  backend:
    build:
      context: ../../../Server
      dockerfile: ../DevOps/01.Build/Production/backend.Dockerfile
    container_name: backend
    networks:
      - mern-network
    ports:
      - "3000:3000"
    env_file:
      - ../../../Server/.env

  frontend:
    build:
      context: ../../../Client
      dockerfile: ../DevOps/01.Build/Production/frontend.Dockerfile
    container_name: frontend
    ports:
      - "80:80"  # Nginx serves on port 80
    networks:
      - mern-network
    depends_on:
      - backend

networks:
  mern-network:
    driver: bridge

๐Ÿ—๏ธ Build Process Pipeline

  1. ๐Ÿ” Code Analysis - ESLint and code quality checks
  2. ๐Ÿงช Test Phase - Unit and integration tests
  3. ๐Ÿ—๏ธ Build Phase - Create optimized Docker images
  4. ๐Ÿ“ฆ Release Phase - Tag and push to container registry
  5. ๐Ÿš€ Deploy Phase - Deploy to target environment

๐Ÿ› ๏ธ DevOps Directory Structure

DevOps/
โ”œโ”€โ”€ 01.Build/              # Build configurations
โ”‚   โ”œโ”€โ”€ Development/       # Development environment
โ”‚   โ”‚   โ”œโ”€โ”€ backend.Dockerfile
โ”‚   โ”‚   โ”œโ”€โ”€ frontend.Dockerfile
โ”‚   โ”‚   โ”œโ”€โ”€ docker-compose.yml
โ”‚   โ”‚   โ””โ”€โ”€ Steps.md
โ”‚   โ””โ”€โ”€ Production/        # Production environment
โ”‚       โ”œโ”€โ”€ backend.Dockerfile
โ”‚       โ”œโ”€โ”€ frontend.Dockerfile
โ”‚       โ”œโ”€โ”€ docker-compose.yml
โ”‚       โ””โ”€โ”€ nginx.conf
โ”œโ”€โ”€ 02.Test/              # Testing configurations
โ”œโ”€โ”€ 03.Release/           # Release management
โ””โ”€โ”€ 04.Deploy/            # Deployment scripts

๐Ÿ“Š Feature Modules Deep Dive

๐ŸŽฏ Habit Tracking Module

Comprehensive habit management system to build positive daily routines:

๐Ÿ”ง Core Features

  • ๐Ÿ“ Custom Habit Creation - Set personalized habits with specific goals
  • โœ… Daily Progress Tracking - Mark habits complete with streak counters
  • ๐Ÿ“Š Visual Analytics - Interactive charts showing progress over time
  • ๐ŸŽ–๏ธ Streak Management - Track consistency and build momentum
  • ๐Ÿ“ˆ Performance Insights - Weekly, monthly, and yearly reports
  • ๐Ÿ”” Smart Reminders - Customizable notification system
  • ๐Ÿ† Achievement System - Milestone rewards and badges

๐Ÿ›ค๏ธ API Endpoints

// Habit Management Routes
GET    /api/v1/dashboard/habit              // Get all user habits
POST   /api/v1/dashboard/habit/table-entry  // Create new habit
PUT    /api/v1/dashboard/habit/settings     // Update habit settings
DELETE /api/v1/dashboard/habit/:id          // Delete specific habit
GET    /api/v1/dashboard/habit/dashboard    // Get habit analytics
GET    /api/v1/dashboard/habit/table-view   // Get habit history

๐Ÿ’ฐ Expense Management Module

Complete financial tracking system for personal expense management:

๐Ÿ”ง Core Features

  • ๐Ÿ’ณ Quick Expense Entry - Fast expense logging with categories
  • ๐Ÿท๏ธ Smart Categorization - Custom categories with auto-suggestions
  • ๐Ÿ“Š Spending Analysis - Detailed spending patterns and trends
  • ๐Ÿ’น Budget Management - Set monthly/weekly budgets with alerts
  • ๐Ÿ“ฑ Receipt Management - Digital receipt storage and OCR
  • ๐Ÿ” Advanced Filtering - Search and filter by date, category, amount
  • ๐Ÿ“ˆ Financial Insights - Cash flow analysis and forecasting

๐Ÿ›ค๏ธ API Endpoints

// Expense Management Routes
GET    /api/v1/dashboard/expense              // Get all expenses
POST   /api/v1/dashboard/expense/table-entry  // Add new expense
PUT    /api/v1/dashboard/expense/:id          // Update expense
DELETE /api/v1/dashboard/expense/:id          // Delete expense
GET    /api/v1/dashboard/expense/dashboard    // Get expense analytics
GET    /api/v1/dashboard/expense/categories   // Get expense categories

๐Ÿ“ˆ Investment Portfolio Module

Advanced investment tracking and portfolio management:

๐Ÿ”ง Core Features

  • ๐Ÿ“Š Portfolio Overview - Real-time portfolio valuation
  • ๐Ÿ“ˆ Performance Tracking - ROI calculations and performance metrics
  • ๐Ÿ”” Price Alerts - Automated notifications for price changes
  • ๐Ÿ“ฑ Market Integration - Real-time market data and updates
  • ๐Ÿ“‹ Transaction History - Complete investment transaction log
  • ๐Ÿ“Š Asset Allocation - Visual portfolio distribution
  • ๐Ÿ’น Risk Analysis - Portfolio risk assessment and recommendations

๐Ÿ›ค๏ธ API Endpoints

// Investment Management Routes
GET    /api/v1/dashboard/investment              // Get portfolio overview
POST   /api/v1/dashboard/investment/table-entry  // Add investment
PUT    /api/v1/dashboard/investment/:id          // Update investment
DELETE /api/v1/dashboard/investment/:id          // Delete investment
GET    /api/v1/dashboard/investment/performance  // Get performance data
GET    /api/v1/dashboard/investment/alerts       // Manage price alerts

๐Ÿš€ Getting Started

๐Ÿ“‹ Prerequisites

Before running Progress Pulse, ensure you have:

  • ๐ŸŸข Node.js (v18 or higher)
  • ๐Ÿณ Docker & Docker Compose
  • ๐Ÿƒ MongoDB (local or cloud instance)
  • ๐Ÿ“ง Email Service configuration (Gmail/SendGrid)

๐Ÿ”ง Installation & Setup

1๏ธโƒฃ Clone the Repository

git clone https://github.com/your-username/Progress-Pulse.git
cd Progress-Pulse

2๏ธโƒฃ Environment Configuration

Server Environment Variables (Server/.env)

# Database Configuration
MONGODB_URI=mongodb://localhost:27017/progress-pulse
DB_NAME=progress_pulse

# JWT Configuration
JWT_SECRET_KEY=your-super-secure-jwt-secret-key-here
REFRESH_TOKEN_SECRET_KEY=your-super-secure-refresh-secret-key
JWT_ACCESS_TOKEN_EXPIRY=15m
JWT_REFRESH_TOKEN_EXPIRY=7d

# Email Service Configuration
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your-email@gmail.com
EMAIL_PASS=your-app-specific-password

# Server Configuration
PORT=3000
NODE_ENV=development
CORS_ORIGIN=http://localhost:5173

Client Environment Variables (Client/.env)

# API Configuration
VITE_API_BASE_URL=http://localhost:3000/api
VITE_APP_NAME=Progress Pulse
VITE_APP_VERSION=1.0.0

# Feature Flags
VITE_ENABLE_ANALYTICS=false
VITE_ENABLE_NOTIFICATIONS=true

3๏ธโƒฃ Development Setup Options

๐Ÿ–ฅ๏ธ Manual Setup (Traditional Development)

# Install server dependencies
cd Server
npm install

# Install client dependencies
cd ../Client
npm install

# Start MongoDB (if running locally)
mongod

# Start the backend server (in Server directory)
npm run dev

# Start the frontend development server (in Client directory)
npm run dev

๐Ÿณ Docker Setup (Recommended)

# Development Environment
cd DevOps/01.Build/Development
docker-compose up --build

# Production Environment  
cd DevOps/01.Build/Production
docker-compose up --build -d

4๏ธโƒฃ Access the Application


๐Ÿ“ฑ Application Screenshots & Demo

๐Ÿ  Homepage & Landing

Homepage Demo Clean and modern landing page with feature highlights

๐Ÿ“Š Dashboard Overview (Light Theme)

Dashboard Light Comprehensive dashboard with habit, expense, and investment widgets

๏ฟฝ Dashboard Overview (Sunset Theme)

Dashboard Sunset Beautiful sunset theme for a warm aesthetic

๐ŸŽฏ Habit Tracking

Habit Tracker Table Entry Detailed habit logging interface

Habit Tracker Dark Mode Habit tracking in dark mode

Habit Logging Quick habit logging interface

Habit Settings Customizable habit settings

Specific Dashboards

Water Tracking Sleep Tracking
Water Sleep
Read Tracking Calorie Tracking
Read Calorie

๐Ÿ’ฐ Expense Management

Expense Table View Overview of all expenses in a sortable table

Expense Entry Detailed expense entry view

๐ŸŽฅ Video Demo

Progress Pulse Demo Complete application walkthrough and feature demonstration


๐Ÿ“„ Comprehensive API Documentation

๐Ÿ” Authentication Endpoints

Method Endpoint Description Auth Required
POST /api/v1/users/registered User registration with email โŒ
POST /api/v1/users/registered/verify-otp OTP verification โŒ
POST /api/v1/users/loggedin User login โŒ
POST /api/v1/users/loggedin/refresh-token Refresh access token ๐Ÿช
GET /api/v1/dashboard/auto-login Token validation โœ…
POST /api/v1/users/logout User logout โœ…
POST /api/v1/users/forgot-password-verification Password reset request โŒ

๐ŸŽฏ Dashboard & User Management

Method Endpoint Description Auth Required
GET /api/v1/dashboard Get user dashboard data โœ…
PUT /api/v1/dashboard/profile Update user profile โœ…
GET /api/v1/dashboard/stats Get user statistics โœ…

๐Ÿ“Š Feature-Specific API Routes

Habit Tracking Routes

  • GET /api/v1/dashboard/habit - Retrieve all habits
  • POST /api/v1/dashboard/habit/table-entry - Create new habit
  • PUT /api/v1/dashboard/habit/settings - Update habit configuration
  • GET /api/v1/dashboard/habit/table-view - Get habit history
  • GET /api/v1/dashboard/habit/dashboard - Habit analytics

Expense Management Routes

  • GET /api/v1/dashboard/expense - Retrieve all expenses
  • POST /api/v1/dashboard/expense/table-entry - Add expense
  • PUT /api/v1/dashboard/expense/:id - Update expense
  • DELETE /api/v1/dashboard/expense/:id - Delete expense

Investment Portfolio Routes

  • GET /api/v1/dashboard/investment - Portfolio overview
  • POST /api/v1/dashboard/investment/table-entry - Add investment
  • PUT /api/v1/dashboard/investment/:id - Update investment
  • DELETE /api/v1/dashboard/investment/:id - Remove investment

๐Ÿ› ๏ธ Development Guidelines & Best Practices

๐Ÿ“ Project Structure Standards

Progress-Pulse/
โ”œโ”€โ”€ ๐Ÿ“ Client/                    # Frontend React Application
โ”‚   โ”œโ”€โ”€ src/
โ”‚   โ”‚   โ”œโ”€โ”€ components/           # Reusable UI Components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Authentication/   # Auth-related components
โ”‚   โ”‚   โ”‚   โ”œโ”€โ”€ Dashboard/        # Dashboard modules
โ”‚   โ”‚   โ”‚   โ””โ”€โ”€ Homepage/         # Landing page components
โ”‚   โ”‚   โ”œโ”€โ”€ Context/              # React Context Providers
โ”‚   โ”‚   โ”œโ”€โ”€ pages/                # Route-based page components
โ”‚   โ”‚   โ”œโ”€โ”€ services/             # Redux store & API services
โ”‚   โ”‚   โ”œโ”€โ”€ layouts/              # Layout wrapper components
โ”‚   โ”‚   โ””โ”€โ”€ utils/                # Utility functions & helpers
โ”‚   โ”œโ”€โ”€ public/                   # Static assets & media
โ”‚   โ””โ”€โ”€ DevOps configs            # Vite, ESLint, Tailwind
โ”œโ”€โ”€ ๐Ÿ“ Server/                    # Backend Node.js Application
โ”‚   โ”œโ”€โ”€ controllers/              # Route handler logic
โ”‚   โ”œโ”€โ”€ models/                   # MongoDB schema models
โ”‚   โ”œโ”€โ”€ middlewares/              # Express middleware functions
โ”‚   โ”œโ”€โ”€ routes/                   # API endpoint definitions
โ”‚   โ”œโ”€โ”€ db/                       # Database connection setup
โ”‚   โ””โ”€โ”€ utils/                    # Server utility functions
โ”œโ”€โ”€ ๐Ÿ“ DevOps/                    # Deployment & CI/CD
โ”‚   โ”œโ”€โ”€ 01.Build/                 # Docker configurations
โ”‚   โ”œโ”€โ”€ 02.Test/                  # Testing setup
โ”‚   โ”œโ”€โ”€ 03.Release/               # Release management
โ”‚   โ””โ”€โ”€ 04.Deploy/                # Deployment scripts
โ””โ”€โ”€ ๐Ÿ“ Scripts/                   # Database utility scripts

๐Ÿงช Testing Strategy

# Frontend Testing
cd Client
npm run test              # Run unit tests
npm run test:coverage     # Generate coverage report
npm run test:e2e          # End-to-end tests

# Backend Testing  
cd Server
npm run test              # Run unit tests
npm run test:integration  # Integration tests
npm run test:watch        # Watch mode for development

# Full Application Testing
npm run test:full         # Run all test suites

๐Ÿ—๏ธ Build & Deployment

# Development Build
npm run dev               # Start development servers

# Production Build
npm run build            # Build both client and server
npm run build:client     # Build frontend only
npm run build:server     # Build backend only

# Docker Commands
docker-compose up         # Start development environment
docker-compose -f DevOps/01.Build/Production/docker-compose.yml up -d

๐Ÿ› Troubleshooting Guide

๐Ÿ”ง Common Issues & Solutions

๐Ÿณ Docker-Related Issues

Issue: Port Already in Use

# Find and kill processes using required ports
lsof -ti:3000 | xargs kill -9  # Kill backend processes
lsof -ti:5173 | xargs kill -9  # Kill frontend processes

# Alternative: Use different ports
export PORT=3001  # For backend
export VITE_PORT=5174  # For frontend

Issue: Container Won't Start

# Check container logs for errors
docker logs backend
docker logs frontend

# Rebuild containers from scratch
docker-compose down
docker-compose build --no-cache
docker-compose up

Issue: Volume Permission Problems

# Fix volume permissions (Linux/macOS)
sudo chown -R $USER:$USER .
docker-compose down
docker volume prune  # Remove unused volumes
docker-compose up --build

๐Ÿ”Œ Database Connection Issues

Issue: MongoDB Connection Failed

# Check MongoDB service status
sudo systemctl status mongod

# Start MongoDB service
sudo systemctl start mongod

# Verify connection string in .env
MONGODB_URI=mongodb://localhost:27017/progress-pulse

# Test connection manually
mongosh mongodb://localhost:27017/progress-pulse

Issue: Database Authentication Error

// Update connection string with credentials
MONGODB_URI=mongodb://username:password@localhost:27017/progress-pulse?authSource=admin

๐ŸŒ API & Network Issues

Issue: Frontend Can't Reach Backend

// Check Vite proxy configuration (vite.config.js)
export default defineConfig({
  plugins: [react()],
  server: {
    proxy: {
      '/api': {
        target: 'http://localhost:3000',
        changeOrigin: true
      }
    }
  }
})

Issue: CORS Errors

// Server CORS configuration (Server/src/app.js)
app.use(cors({
  origin: ["http://localhost:5173", "http://localhost:3000"],
  credentials: true
}));

๐Ÿ” Authentication Problems

Issue: JWT Token Errors

# Clear localStorage and cookies
localStorage.clear()
document.cookie.split(";").forEach(cookie => {
  document.cookie = cookie.replace(/^ +/, "").replace(/=.*/, "=;expires=" + new Date().toUTCString() + ";path=/");
});

# Verify JWT secrets match between client and server
# Check .env files for consistency

Issue: Email OTP Not Sending

// Verify email configuration in Server/.env
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your-email@gmail.com
EMAIL_PASS=your-app-password  // Not regular password!

// Generate App Password for Gmail:
// Google Account โ†’ Security โ†’ 2-Step Verification โ†’ App Passwords

๐Ÿค Contributing to Progress Pulse

We welcome contributions from developers of all skill levels! Here's how you can contribute:

๐Ÿš€ Getting Started with Contributions

  1. ๐Ÿด Fork the Repository

    # Fork on GitHub, then clone your fork
    git clone https://github.com/your-username/Progress-Pulse.git
    cd Progress-Pulse
  2. ๐ŸŒฟ Create a Feature Branch

    git checkout -b feature/your-feature-name
    # or
    git checkout -b bugfix/issue-description
  3. ๐Ÿ”ง Set Up Development Environment

    # Install dependencies
    cd Client && npm install
    cd ../Server && npm install
    
    # Copy environment files
    cp Server/.env.example Server/.env
    cp Client/.env.example Client/.env

๐Ÿ“‹ Development Standards

โœ… Code Quality Requirements

  • ESLint: Follow the project's ESLint configuration
  • Prettier: Use consistent code formatting
  • TypeScript: Add type definitions where applicable
  • Comments: Write clear, meaningful comments
  • Tests: Include tests for new features

๐ŸŽฏ Commit Message Convention

# Format: type(scope): description
git commit -m "feat(habit): add streak counter functionality"
git commit -m "fix(auth): resolve token refresh issue"
git commit -m "docs(readme): update installation instructions"

# Types: feat, fix, docs, style, refactor, test, chore

๐Ÿ“ Pull Request Process

  1. Update Documentation: Update README if needed
  2. Add Tests: Ensure new features have appropriate tests
  3. Run Quality Checks:
    npm run lint      # Check code quality
    npm run test      # Run all tests
    npm run build     # Verify builds work
  4. Write Clear PR Description: Explain what, why, and how

๐ŸŽฏ Contribution Areas

๐Ÿ› Bug Fixes

  • Check Issues for bugs
  • Reproduce the issue locally
  • Create tests that demonstrate the fix
  • Submit PR with clear description

โœจ New Features

  • Discuss major features in Discussions
  • Create feature branch
  • Implement with proper tests
  • Update documentation
  • Submit PR for review

๐Ÿ“š Documentation

  • Improve README clarity
  • Add code comments
  • Create tutorials or guides
  • Update API documentation
  • Fix typos or formatting

๐Ÿงช Testing

  • Add unit tests
  • Improve test coverage
  • Add integration tests
  • Create end-to-end tests
  • Performance testing

๐Ÿ† Recognition

Contributors will be recognized in:

  • README Contributors Section
  • GitHub Contributors Graph
  • Release Notes for significant contributions
  • Special Mentions in project updates

๐Ÿ“Š Performance & Monitoring

๐Ÿš€ Performance Optimizations Implemented

Frontend Optimizations

  • โšก Code Splitting: Dynamic imports with React.lazy()
  • ๐Ÿ—œ๏ธ Bundle Optimization: Vite's advanced tree-shaking
  • ๐Ÿ“ฆ Caching Strategy: Proper HTTP caching headers
  • ๐Ÿ–ผ๏ธ Image Optimization: WebP format with fallbacks
  • ๐Ÿ”„ Request Optimization: Debouncing and request batching
  • ๐Ÿ“ฑ Progressive Web App: Service worker for offline capability

Backend Optimizations

  • ๐Ÿ—„๏ธ Database Indexing: Optimized MongoDB indexes
  • ๐Ÿ“Š Query Optimization: Efficient aggregation pipelines
  • ๐Ÿ”„ Connection Pooling: MongoDB connection pool management
  • ๐Ÿ’พ Caching Layer: Redis integration for frequently accessed data
  • ๐Ÿ“ˆ Response Compression: Gzip compression for API responses

๐Ÿ“ˆ Monitoring & Analytics

Application Monitoring

// Performance metrics tracked:
- API response times
- Database query performance
- Error rates and types
- User interaction patterns
- Resource usage statistics

Logging Strategy

// Winston logger configuration
const logger = winston.createLogger({
  level: 'info',
  format: winston.format.combine(
    winston.format.timestamp(),
    winston.format.errors({stack: true}),
    winston.format.json()
  ),
  transports: [
    new winston.transports.File({filename: 'logs/error.log', level: 'error'}),
    new winston.transports.File({filename: 'logs/combined.log'}),
    new winston.transports.DailyRotateFile({
      filename: 'logs/application-%DATE%.log',
      datePattern: 'YYYY-MM-DD',
      maxFiles: '14d'
    })
  ]
});

๐ŸŒŸ Project Roadmap & Future Enhancements

๐Ÿ“… Phase 1: Foundation (Completed โœ…)

  • โœ… User authentication system with JWT
  • โœ… Basic habit tracking functionality
  • โœ… Expense management system
  • โœ… Investment portfolio tracking
  • โœ… Docker containerization
  • โœ… CI/CD pipeline setup

๐Ÿ“… Phase 2: Enhancement (In Progress ๐Ÿšง)

  • ๐Ÿšง Mobile responsive design improvements
  • ๐Ÿšง Advanced analytics and reporting
  • ๐Ÿšง Email notification system
  • ๐Ÿšง Export functionality (PDF, CSV)
  • ๐Ÿšง Dark mode implementation
  • ๐Ÿšง Performance optimizations

๐Ÿ“… Phase 3: Advanced Features (Planned ๐Ÿ“‹)

  • ๐Ÿ“‹ Mobile application (React Native)
  • ๐Ÿ“‹ Real-time collaboration features
  • ๐Ÿ“‹ AI-powered insights and recommendations
  • ๐Ÿ“‹ Third-party integrations (bank APIs, fitness trackers)
  • ๐Ÿ“‹ Advanced security features (2FA, biometric auth)
  • ๐Ÿ“‹ Multi-language support

๐Ÿ“… Phase 4: Scale & Optimize (Future ๐Ÿ”ฎ)

  • ๐Ÿ”ฎ Microservices architecture
  • ๐Ÿ”ฎ Advanced caching strategies
  • ๐Ÿ”ฎ Machine learning recommendations
  • ๐Ÿ”ฎ Enterprise features
  • ๐Ÿ”ฎ API monetization
  • ๐Ÿ”ฎ White-label solutions

๐Ÿ“„ License & Legal

๐Ÿ“œ MIT License

MIT License

Copyright (c) 2024 Progress Pulse

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

๐Ÿ‘ฅ Team & Acknowledgments

๐Ÿ’ผ Development Team


Lead Developer
@your-username

UI/UX Designer
@designer

DevOps Engineer
@devops

๐Ÿ™ Special Thanks & Acknowledgments

  • Open Source Community for incredible tools and libraries
  • MERN Stack Contributors for robust development frameworks
  • Docker Team for containerization excellence
  • Modern Web Technologies that make development enjoyable
  • All Contributors who helped improve Progress Pulse
  • Beta Testers for valuable feedback and bug reports

๐Ÿ† Technology Credits

  • โš›๏ธ React Team - For the amazing frontend framework
  • ๐ŸŸข Node.js Foundation - For the powerful runtime environment
  • ๐Ÿƒ MongoDB Team - For the flexible database solution
  • ๐Ÿณ Docker Inc - For containerization technology
  • ๐ŸŽจ Tailwind CSS - For the utility-first CSS framework
  • ๐Ÿ“Š Chart.js & ApexCharts - For beautiful data visualizations

๐Ÿ“ž Support & Community

๐Ÿ†˜ Getting Help & Support

๐Ÿ’ฌ Community Channels

๐Ÿ“š Resources & Documentation

๐Ÿค Community Guidelines

  • Be Respectful: Treat all community members with respect
  • Stay On Topic: Keep discussions relevant to Progress Pulse
  • Help Others: Share knowledge and help fellow developers
  • Follow Code of Conduct: Maintain a positive, inclusive environment

๐Ÿ“ˆ Project Statistics

GitHub stars GitHub forks GitHub issues GitHub pull requests GitHub license GitHub last commit GitHub contributors


๐ŸŒŸ Star History

Star History Chart


๐Ÿ’ Show Your Support

If Progress Pulse has helped you become more productive or manage your finances better, please consider:

โญ Starring this repository to show your appreciation ๐Ÿด Forking and contributing to help improve the project ๐Ÿ“ข Sharing with friends who might benefit from Progress Pulse โ˜• Sponsoring development to support ongoing improvements


๐ŸŽ‰ Thank You!

Progress Pulse is made possible by the amazing open source community and contributors who believe in building better productivity tools for everyone.

Made with โค๏ธ for developers, by developers

Happy tracking! ๐Ÿ“Šโœจ

About

๐Ÿ”„ Progress Pulse is a personal productivity and financial tracking web app designed to help users monitor their daily habits, goals, and spending patterns in one place. Built using the MERN stack, it combines habit tracking ๐Ÿ“ˆ, financial analysis ๐Ÿ’ธ, and user-friendly visuals ๐Ÿง  to encourage consistency and self-growth over time.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages