-
Notifications
You must be signed in to change notification settings - Fork 64
Add comprehensive contribution documentation #533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
3dbda07
b6712df
9ca660b
ab2cabd
b9dc1c5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,92 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # ExpenseFlow Environment Variables | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Copy this file to .env and fill in your actual values | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Server Configuration | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PORT=5000 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| NODE_ENV=development | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # MongoDB Configuration | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MONGODB_URI=mongodb://localhost:27017/expenseflow | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Or use MongoDB Atlas: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # MONGODB_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/expenseflow?retryWrites=true&w=majority | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # 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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+13
to
+17
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Email Configuration (for notifications) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EMAIL_HOST=smtp.gmail.com | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EMAIL_PORT=587 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EMAIL_USER=your-email@gmail.com | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EMAIL_PASSWORD=your-app-specific-password | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EMAIL_PASSWORD=your-app-specific-password | |
| EMAIL_PASS=your-app-specific-password |
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
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).
| 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
AI
Feb 3, 2026
There was a problem hiding this comment.
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 functionalityFRONTEND_URLorAPP_URL- used by server.js line 40, 98, and throughout services for generating URLsREDIS_HOST,REDIS_PORT,REDIS_DB- used by middleware/rateLimiter.js for distributed rate limitingADMIN_EMAILorADMIN_EMAILS- used by services/alertService.js for admin notificationsSUPPORT_EMAIL- used by services/emailService.jsALPHA_VANTAGE_API_KEY- used by services/investmentService.js and services/priceUpdateService.jsCOINGECKO_API_KEY,FINNHUB_API_KEY,POLYGON_API_KEY- used by services/priceUpdateService.jsDEFAULT_CURRENCY,DEFAULT_LOCALE- used by services/analyticsService.jsEMAIL_SERVICE- used by services/notificationService.jsPLAID_WEBHOOK_SECRET- used by services/openBankingService.jsALERT_LOG_FILE- used by services/alertService.js
These variables are necessary for various features to work properly.
| 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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,35 @@ | ||
| .env | ||
| .env.test | ||
| node_modules | ||
| node_modules/ | ||
|
|
||
| # Test coverage | ||
| coverage/ | ||
| *.lcov | ||
| .nyc_output/ | ||
|
|
||
| # Test results | ||
| test-results/ | ||
| junit.xml | ||
|
|
||
| # IDE | ||
| .vscode/ | ||
| .idea/ | ||
| *.swp | ||
| *.swo | ||
| *~ | ||
|
|
||
| # OS | ||
| .DS_Store | ||
| Thumbs.db | ||
|
|
||
| # Logs | ||
| logs/ | ||
| *.log | ||
| npm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
|
|
||
| # Build | ||
| dist/ | ||
| build/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default PORT value is inconsistent with server.js. The server.js file uses
process.env.PORT || 3000(line 46), but this .env.example file specifies PORT=5000. This inconsistency may confuse developers. Either update this to PORT=3000 to match the server.js default, or update server.js to match this value.