Skip to content
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

Prepare for version 1.0.0 #5

Merged
merged 58 commits into from
Feb 23, 2025
Merged

Prepare for version 1.0.0 #5

merged 58 commits into from
Feb 23, 2025

Conversation

darkterminal
Copy link
Owner

- Added `toSnakeCase`, `calculateTypingDuration`, and `bannerCLI` utility functions.
- Updated `serverLog` to support dynamic time zone configuration via `process.env.TZ`.
- Refactored `formatInternationalPhoneNumber` for better readability using a `switch` statement.
- Removed redundant comments in `removeDuplicateContacts` and `formatInternationalPhoneNumber`.
- Exported new utility functions for use in other modules.

This change enhances functionality and improves code maintainability.
- Renamed table creation functions for clarity (e.g., `commands` to `create_commands_table`).
- Added new tables: `jobs`, `job_histories`, and `message_histories`.
- Added `alter_job_status_in_jobs_table` to include a `job_status` column.
- Refactored `init` function to initialize all tables and apply schema changes.
…onnection

- Added new file `socket-options.js` to handle socket events for WhatsApp client.
- Implemented socket events for connection, authentication, QR code, and logout.
- Added reinitialization logic after logout.
- Included socket cleanup on disconnect.
- Added new `job-controller.js` with CRUD operations for job management.
- Enhanced `message-controller.js` with typing simulation and message history recording.
- Improved error handling and logging in both controllers.
…expressions

- Added `cron-parser.js` with a `Cron` class for parsing and translating cron expressions.
- Implemented methods for human-readable descriptions and retrieving next scheduled runs.
- Supports timezone configuration and detailed field descriptions for cron expressions.
- Added `api-rate-limiter.js` for rate limiting API requests.
- Added `app-layout.js` to set app-wide layout variables based on authentication state.
- Added `cors-options.js` for CORS configuration and origin validation.
- Added `helmet-policies.js` for defining Content Security Policy (CSP) directives.
- Added `find` method to retrieve a contact by phone number.
- Added `upsertMany` method to upsert multiple contacts in bulk.
- Improved error handling and logging for database operations.
- Added `find` method to retrieve a group by its `groupId`.
- Added `upsertMany` method to upsert multiple groups in bulk.
- Improved error handling and logging for database operations.
- Added `job.js` with CRUD operations for managing jobs.
- Implemented methods for creating, updating, deleting, and paginating jobs.
- Added support for soft and force deletion of jobs.
- Included search and pagination functionality for job listings.
- Added `message_history.js` to record and count message histories.
- Implemented `recordMessageHistory` to log direct and group messages.
- Added methods to count direct and group messages for the current month.
- Integrated with contact and group models for target identification.
- Added `index-front-routes.js` to handle the dashboard route with message statistics.
- Updated `message-front-routes.js` to include a new route for scheduling messages.
- Integrated message history counts into the dashboard view.
- Added `cron-routes.js` for parsing and translating cron expressions.
- Added `job-routes.js` with CRUD endpoints for managing jobs.
- Removed unused placeholder routes from `contact-routes.js` and `group-routes.js`.
- Updated import path from `getProfile` to `get-profile` in `ready.js`.
- Updated `get-contacts.js` to use `upsertMany` and emit socket logs during contact sync.
- Updated `get-groups.js` to use `upsertMany` for group data.
- Enhanced `get-profile.js` to include phone number in the profile response.
- Improved `index.js` with dynamic Puppeteer options based on environment (development/production).
- Added `auth.ejs` layout for authentication pages (e.g., QR code login).
- Added `dashboard.ejs` layout for authenticated dashboard pages.
- Included responsive design, dark mode support, and dynamic Tailwind CSS integration.
- Added socket event handling for QR code and authentication states.
- Added `contacts-modal.ejs` for selecting individual contacts.
- Added `group-contacts-modal.ejs` for selecting group contacts.
- Added `address-book-modal.ejs` for managing address book entries.
- Added `cron-helper-modal.ejs` for explaining cron schedule formats.
- Added `delete-schedule-modal.ejs` for confirming schedule deletions.
- Added `schedule-modal.ejs` for creating and editing scheduled messages.
- Added `add-edit-modal.ejs` for adding or editing commands.
- Added `delete-modal.ejs` for confirming command deletions.
- Added `send-group-message-modal.ejs` for sending messages to groups.
- Added `send-message-modal.ejs` for sending individual messages.
- Added `donate.ejs` for displaying donation options.
… environment handling

- Added Tailwind indicator for development environment
- Included donate modal in the footer
- Updated jQuery script to socket.io-client for real-time support
- Replaced main.js with app.js for updated script handling
- Added fallback logic for API URL to handle SSR and file protocol edge cases
…on and user profile section

- Implemented sidebar with active link highlighting based on current pathname
- Added navigation links for Dashboard, Commands, Send Message, Send Group Message, Schedule Messages, and Contacts
- Included user profile section with logout button for mobile view
- Styled with Tailwind CSS for light and dark mode support
- Integrated Donate button for user contributions
…, user menu, and theme switcher

- Implemented mobile-friendly header with sticky positioning and shadow effect
- Added sidebar toggle button for smaller screens
- Included user profile dropdown with links to Profile and Logout
- Integrated dark/light mode toggle with dynamic icon switching
- Styled using Tailwind CSS for consistency with existing components
…mprove style consistency

- Replaced CDN Tailwind CSS with local /css/main.css for better performance and control
- Moved Font Awesome link for consistent ordering
- Added global cursor pointer style for buttons and links
- Reformatted JavaScript code for improved readability
…upport

- Introduced dynamic `position` variable with default value `bottom-1 left-1`
- Added dark mode styling for better visibility in dark themes
…color

- Wrapped logs section in a margin-top div for better spacing
- Added fixed height and vertical scroll to logs container for improved UX
- Highlighted connection status with red text for clearer disconnected state indication
…s, and modals

- Created a new schedule page for managing scheduled messages
- Added search functionality and a responsive table listing jobs with status badges
- Integrated modals for schedule creation, address book, cron expression help, and deletion
- Included cron-validator and schedule.js for dynamic behavior and validation
…button

- Created a responsive profile page displaying user picture, phone number, username, and about section
- Included dark mode support and dynamic session data placeholders
- Added logout button with styled hover and transition effects
…tion

- Streamlined the send message form with clearer recipient and message fields
- Replaced inline contact modal with dynamic contact selection modal include
- Improved dark mode support and consistent styling
- Removed redundant modal and code for better maintainability
…wilio, and WATI/Chatfuel

- Introduced input for total messages sent (monthly) with dynamic value population
- Added responsive card grid comparing costs of Whatsback, Twilio API, and WATI/Chatfuel
- Included explanatory notes on pricing structures
- Integrated `/js/dashboard.js` for dynamic calculations
- Enhanced dark mode support and responsive layout
…proved UX

- Reworked group message interface with clearer input fields and labels
- Replaced inline modal with reusable 'group-contacts-modal' component
- Improved dark mode compatibility and responsive design
- Updated scripts to use `group.js` instead of `message.js`
- Added clear button for selected group and improved message editor integration
…e layout, and modals

- Redesigned contacts page with separate sections for individual and group contacts
- Added global and individual search bars for better filtering
- Introduced scrollable containers for large contact lists
- Implemented reusable modals for sending individual and group messages
- Enhanced dark mode styling and responsive grid layout
…table, modals, and responsive design

- Simplified command management layout with cleaner table structure
- Replaced inline modal code with reusable modal components for add/edit and delete actions
- Enhanced dark mode compatibility and responsive styling
- Improved action buttons with icon integration for better UX
- Optimized performance with sticky headers and scrollable content
…ompose

- Switched to Node.js 20-slim image for a smaller footprint
- Installed Chromium dependencies and configured Puppeteer environment
- Added non-root user (appuser) for better security
- Implemented dumb-init for better process management
- Optimized npm install with `npm ci --omit=dev`
- Introduced healthcheck endpoint for app service
- Added cronjob service in docker-compose with wait-for script
- Persisted database using db-data volume
@darkterminal darkterminal merged commit 205f0f2 into main Feb 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant