Skip to content

Conversation

@PankajSingh34
Copy link

  • Add CONTRIBUTION_GUIDE.md with detailed contribution steps
  • Add FIRST_CONTRIBUTION_CHECKLIST.md for first-time contributors
  • Add .env.example with all environment variable templates
  • Add setup.sh script for automated development setup
  • Improve onboarding experience for new contributors

These files will help new contributors get started quickly and understand the contribution process better.

📝 Description

Provide a brief summary of your changes. Does this PR affect the Vanilla JS frontend, the Node.js API, or the PWA service workers?

🔗 Related Issue

Fixes # (issue number)

🛠️ Type of Change

  • New Feature (e.g., AI categorization, new Chart.js visual)
  • 🐞 Bug Fix (e.g., fixing a calculation error or UI glitch)
  • 📝 Documentation (e.g., updating README or API docs)
  • 🔐 Security/Backend (e.g., JWT updates, MongoDB schema changes)
  • 📱 PWA/Offline (e.g., Service Worker or Manifest updates)

🧪 Testing & Validation

  • I have tested the changes locally in Full-Stack Mode (Node.js + MongoDB).
  • I have verified that the UI remains responsive on mobile and desktop.
  • (If applicable) I have tested the offline functionality via the Service Worker.
  • I have run npm start and confirmed there are no console errors.

🚩 Checklist:

  • My code follows the existing folder structure (public/, models/, routes/).
  • I have updated the .env.example file if I added new environment variables.
  • I have not committed any sensitive .env secrets or private keys.
  • My PR targets the main branch (or the designated development branch).

📸 Visuals (if applicable)

Add screenshots or a screen recording of the new UI features or dashboard updates to help the reviewer.

- Add CONTRIBUTION_GUIDE.md with detailed contribution steps
- Add FIRST_CONTRIBUTION_CHECKLIST.md for first-time contributors
- Add .env.example with all environment variable templates
- Add setup.sh script for automated development setup
- Improve onboarding experience for new contributors

These files will help new contributors get started quickly and understand the contribution process better.
Copilot AI review requested due to automatic review settings February 3, 2026 14:58
@vercel
Copy link

vercel bot commented Feb 3, 2026

@PankajSingh34 is attempting to deploy a commit to the Renu's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link

github-actions bot commented Feb 3, 2026

🎉 Thanks for the PR, @PankajSingh34!

We really appreciate you taking the time to contribute to ExpenseFlow! 💙


⭐ Love this project?

Please give us a star! It helps the project grow and reach more developers! 🌟

🔗 https://github.com/Renu-code123/ExpenseFlow


✅ PR Checklist

Before we review, please ensure:

  • Your code follows the project's coding standards
  • All file changes are accurate and intentional
  • You've tested your changes locally
  • Any review comments have been addressed

🙌 Thank You for Contributing!

We truly appreciate your interest in contributing to this project.

  • Please make sure your code follows the project structure
  • Add clear commit messages and comments where necessary
  • Ensure your changes do not break existing functionality

We'll review your PR as soon as possible. Keep up the great work! ✨


Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds comprehensive contribution documentation to help new contributors get started with the ExpenseFlow project. The documentation provides detailed guidance on environment setup, contribution workflows, and best practices.

Changes:

  • Added detailed contribution guide (CONTRIBUTION_GUIDE.md) with step-by-step instructions, code examples, and resource links
  • Added first-time contributor checklist (FIRST_CONTRIBUTION_CHECKLIST.md) with comprehensive task lists for the entire contribution process
  • Added environment configuration template (.env.example) with extensive variable documentation for all integrations
  • Added automated setup script (setup.sh) to streamline development environment initialization

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 15 comments.

File Description
setup.sh Automated bash script to check prerequisites, install dependencies, create .env file, verify MongoDB, and create necessary directories
FIRST_CONTRIBUTION_CHECKLIST.md Comprehensive checklist covering pre-contribution setup, issue selection, development workflow, submission process, and post-PR activities
CONTRIBUTION_GUIDE.md Detailed guide with contribution ideas categorized by difficulty, step-by-step workflow, project structure overview, and practical examples
.env.example Environment variable template documenting all configuration options including server, database, authentication, email, integrations, and feature flags

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 269 to 270
### **2. Make changes**
Edit `public/script.js` to add a new category icon:
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example references non-existent file. The example workflow mentions editing public/script.js (line 270), but this file doesn't exist in the repository. The public directory contains many specific JavaScript files like public/dashboard.js, public/trackerscript.js, public/index.js, etc., but no generic script.js file. Update this example to reference an actual file from the codebase, or clarify that this is a hypothetical example. Consider using a real file like public/trackerscript.js or public/dashboard.js to make the example more concrete and accurate.

Copilot uses AI. Check for mistakes.
Comment on lines +87 to +96
- [ ] Wrote descriptive commit message:
```
Add feature: descriptive title

- Detailed change 1
- Detailed change 2
- Detailed change 3

Fixes #issue-number
```
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example commit message format doesn't follow the convention described in CONTRIBUTING.md. CONTRIBUTING.md (lines 106-120) specifies using imperative mood and present tense (e.g., "Add feature" not "Added feature"), with 72 character limit for first line. However, this example uses "Add feature: descriptive title" which includes a colon. While not wrong, for consistency with the existing CONTRIBUTING.md file, consider aligning the format. The example here is actually fine, but the checklist should reference the CONTRIBUTING.md convention for consistency.

Copilot uses AI. Check for mistakes.
Comment on lines +80 to +81
CORS_ORIGIN=http://localhost:3000,http://localhost:5000
# Add your frontend URL in production
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CORS origin configuration may be redundant or incorrect. The default value includes both http://localhost:3000 and http://localhost:5000, but the PORT is set to 5000 in this file (line 5), and server.js defaults to 3000 (line 46 of server.js). This creates confusion about which port is actually being used. If the server runs on port 5000 (as configured in this file), then http://localhost:3000 in CORS_ORIGIN would be incorrect unless there's a separate frontend server. Clarify which port(s) should be in CORS_ORIGIN based on the actual deployment setup, or add a comment explaining when multiple origins are needed (e.g., separate frontend dev server).

Suggested change
CORS_ORIGIN=http://localhost:3000,http://localhost:5000
# Add your frontend URL in production
# Comma-separated list of allowed frontend origins.
# Example: http://localhost:3000 for a React/Vue dev server, http://localhost:5000 for the API server itself.
# In most setups, the backend runs on PORT=5000 (see above) and the frontend dev server on 3000.
# Update/remove entries as needed for your actual deployment, and add your production frontend URL(s) here.
CORS_ORIGIN=http://localhost:3000,http://localhost:5000

Copilot uses AI. Check for mistakes.
- [ ] MongoDB running (local or Atlas)
- [ ] Project runs successfully (`npm run dev`)

### Repository Setup
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra trailing whitespace on line 14 after "Repository Setup". While this doesn't affect functionality, removing trailing whitespace is a common best practice in documentation for consistency and clean diffs.

Suggested change
### Repository Setup
### Repository Setup

Copilot uses AI. Check for mistakes.
ENABLE_OCR=false
ENABLE_AI_CATEGORIZATION=true
ENABLE_NOTIFICATIONS=true
ENABLE_MULTI_CURRENCY=true
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing critical environment variables that are used in the codebase. The following environment variables should be added to this file:

  • SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASS - used by services/alertService.js, services/inviteService.js, and services/reminderService.js for email functionality
  • FRONTEND_URL or APP_URL - used by server.js line 40, 98, and throughout services for generating URLs
  • REDIS_HOST, REDIS_PORT, REDIS_DB - used by middleware/rateLimiter.js for distributed rate limiting
  • ADMIN_EMAIL or ADMIN_EMAILS - used by services/alertService.js for admin notifications
  • SUPPORT_EMAIL - used by services/emailService.js
  • ALPHA_VANTAGE_API_KEY - used by services/investmentService.js and services/priceUpdateService.js
  • COINGECKO_API_KEY, FINNHUB_API_KEY, POLYGON_API_KEY - used by services/priceUpdateService.js
  • DEFAULT_CURRENCY, DEFAULT_LOCALE - used by services/analyticsService.js
  • EMAIL_SERVICE - used by services/notificationService.js
  • PLAID_WEBHOOK_SECRET - used by services/openBankingService.js
  • ALERT_LOG_FILE - used by services/alertService.js

These variables are necessary for various features to work properly.

Suggested change
ENABLE_MULTI_CURRENCY=true
ENABLE_MULTI_CURRENCY=true
# SMTP Configuration (for email functionality)
SMTP_HOST=smtp.gmail.com
SMTP_PORT=587
SMTP_USER=your-email@gmail.com
SMTP_PASS=your-app-specific-password
# Frontend URL (used for generating links in emails, redirects, etc.)
FRONTEND_URL=http://localhost:3000
# Redis Configuration (for distributed rate limiting, caching, etc.)
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_DB=0
# Admin & Support Emails
ADMIN_EMAILS=admin1@example.com,admin2@example.com
SUPPORT_EMAIL=support@example.com
# Market Data & Investment APIs
ALPHA_VANTAGE_API_KEY=your_alpha_vantage_api_key
COINGECKO_API_KEY=your_coingecko_api_key
FINNHUB_API_KEY=your_finnhub_api_key
POLYGON_API_KEY=your_polygon_api_key
# Analytics Defaults
DEFAULT_CURRENCY=USD
DEFAULT_LOCALE=en-US
# Notification Service (e.g., smtp, sendgrid, mailgun)
EMAIL_SERVICE=smtp
# Plaid Webhook (used to verify Plaid webhook signatures)
PLAID_WEBHOOK_SECRET=your_plaid_webhook_secret
# Alert Logging
ALERT_LOG_FILE=logs/alerts.log

Copilot uses AI. Check for mistakes.
Comment on lines +13 to +17
# JWT Configuration
JWT_SECRET=your_super_secret_jwt_key_change_this_in_production
JWT_EXPIRE=7d
JWT_REFRESH_SECRET=your_refresh_token_secret_change_this
JWT_REFRESH_EXPIRE=30d
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weak example JWT secrets could be accidentally used in production. Lines 14 and 16 contain example secrets like "your_super_secret_jwt_key_change_this_in_production" and "your_refresh_token_secret_change_this". While these include warnings to change them, developers might forget. Consider adding a more prominent warning comment above the JWT section, such as: "# CRITICAL: Generate strong random secrets for production. Never use these example values!" Also consider adding a note about using a tool like openssl rand -base64 32 to generate secure secrets.

Copilot uses AI. Check for mistakes.
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USER=your-email@gmail.com
EMAIL_PASSWORD=your-app-specific-password
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The environment variable name is inconsistent with the codebase. The code uses EMAIL_PASS (see services/emailService.js line 11, services/notificationService.js line 153), but this file specifies EMAIL_PASSWORD. This will cause email functionality to fail because the password won't be read correctly. Change EMAIL_PASSWORD to EMAIL_PASS to match the actual codebase usage.

Suggested change
EMAIL_PASSWORD=your-app-specific-password
EMAIL_PASS=your-app-specific-password

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +23
- [ ] Read CONTRIBUTING.md
- [ ] Read CONTRIBUTION_GUIDE.md
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent reference to contribution documentation. This checklist references "CONTRIBUTING.md" on line 22, but the PR adds a new file called "CONTRIBUTION_GUIDE.md" (which is being reviewed). The existing CONTRIBUTING.md file already exists in the repository. This creates confusion about which file contributors should read. Either update this reference to point to CONTRIBUTION_GUIDE.md, or clarify that both files should be read, specifying the purpose of each.

Suggested change
- [ ] Read CONTRIBUTING.md
- [ ] Read CONTRIBUTION_GUIDE.md
- [ ] Read CONTRIBUTING.md (general contribution guidelines and policies)
- [ ] Read CONTRIBUTION_GUIDE.md (step-by-step guide for making your first contribution)

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,79 @@
#!/bin/bash
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing execute permissions notice. While the script has a proper shebang line, new contributors might not know they need to make it executable. Consider adding a comment in the script or in the documentation about running chmod +x setup.sh before executing it, or mention that users should run it with bash setup.sh if they encounter permission issues.

Copilot uses AI. Check for mistakes.
## 💻 Making Your Contribution

### Branch Creation
- [ ] Updated main branch: `git checkout main && git pull upstream main`
Copy link

Copilot AI Feb 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent Git workflow between files. FIRST_CONTRIBUTION_CHECKLIST.md line 48 correctly instructs to git pull upstream main (pulling from the original repository after forking), but CONTRIBUTION_GUIDE.md line 109 shows git pull origin main (pulling from your own fork). For contributors who have forked the repository, they should consistently pull from 'upstream' to get the latest changes from the main repository. Update line 109 in CONTRIBUTION_GUIDE.md to use git pull upstream main for consistency, or add a note explaining the difference between 'origin' (your fork) and 'upstream' (original repo).

Copilot uses AI. Check for mistakes.
@PankajSingh34
Copy link
Author

hy @Renu-code123 ,
could you please merge the pr

- Add consistent spacing between sections
- Improve markdown formatting for better readability
- Fix quote inconsistencies in code examples
- Enhance visual hierarchy of content

This makes the contribution guide more accessible and easier to follow for new contributors.
- Add complete openInviteModal() function with form handling
- Implement closeInviteModal() to properly close modal
- Add updateRolePermissions() to display role-specific permissions
- Create handleInviteSubmit() for async API integration
- Include loading states and error handling
- Display role permissions dynamically based on selection
- Integrate with existing workspace invitation API endpoint

Resolves TODO at line 333 in workspace-feature.js
Closes Renu-code123#1 - Invite Modal Implementation
- Install Jest, Supertest, and testing dependencies
- Create jest.config.js with coverage thresholds (50%)
- Add test scripts to package.json (test, test:watch, test:unit, test:integration)
- Create test directory structure (tests/unit, tests/integration)
- Implement User model unit tests (18 test cases)
  - Schema validation tests
  - Password hashing tests
  - Data sanitization tests
  - Currency and locale tests
  - Budget limit validation
- Implement utility function tests (40+ test cases)
  - Email validation
  - Input sanitization
  - Currency formatting
  - Percentage calculations
  - Date utilities
  - String and array utilities
- Create integration test template for Authentication API
- Add comprehensive test documentation (tests/README.md)
- Update .gitignore to exclude coverage reports
- Configure global test setup with mockdate

Test Results: 30 passing tests
Coverage: Models 20.61%, User.js 22.98%

Resolves Renu-code123#2 - Add Unit Tests
- Document both completed contributions
- Include technical details and impact
- Add test statistics and coverage metrics
- Provide pull request template
- List future contribution ideas

This summary documents the completion of:
1. Invite Modal Functionality
2. Unit Testing Infrastructure
@Renu-code123
Copy link
Owner

@PankajSingh34 mention issue no.#

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants