61 Commits

Author SHA1 Message Date
0fd269df31
refactor: migrate authentication and signup flow to use external API and improve type safety
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 1m58s
2025-01-24 11:42:38 +05:00
8ffabb1fcb
Refactor authentication middleware to use native fetch, update dependencies, and enhance error handling. Add new error boundary component for dashboard and improve user verification UI. Update payment handling and device management components for better user experience. Adjust CSS for error backgrounds and refine input read-only components with validation indicators.
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 3m9s
2025-01-15 10:35:03 +05:00
d14b0b35a3
final fix
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 3m36s
2025-01-11 05:31:13 +05:30
b9cfc55751
fix: openssl
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 4m36s
2025-01-11 04:39:07 +05:30
ff70624283
fix: revert wut 2025-01-11 04:31:30 +05:30
cd86a7ad42
installing openssl
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 4m32s
2025-01-11 03:59:13 +05:00
e2e57516a0
fix:wut
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 3m38s
2025-01-11 04:18:26 +05:30
ef32b7413d
hamker magic
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 3m39s
2025-01-11 03:35:55 +05:00
7bfdc10a5a
switch to node
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 4m29s
2025-01-11 02:56:21 +05:00
d5c9253b04
bun can build 2025-01-11 02:55:33 +05:00
c79f06c17f
bruh
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 2m14s
2025-01-11 02:29:32 +05:00
8e068f1aa5
attempt 4 docker
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 16s
2025-01-11 01:55:43 +05:00
994956a98d
attempt no 3 docker
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 11s
2025-01-11 01:50:21 +05:00
a5b18e89d3
attempt 2 building with docker
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Has been cancelled
2025-01-11 01:45:19 +05:00
bfba3cf88b
npx now
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 9s
2025-01-11 01:42:48 +05:00
d72f9ae320
attempt to build docker again
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 11s
2025-01-11 01:40:14 +05:00
0943898cc1 remove test api route
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 3m41s
2025-01-11 00:46:17 +05:00
2c67848618 Enhance user verification and UI components
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 1m24s
- Updated `auth-actions.ts` to improve user verification notification formatting and date handling.
- Modified `layout.tsx` to support dark mode styling for better user experience.
- Refactored `signup/page.tsx` to enhance layout and responsiveness.
- Introduced a new API route in `route.ts` for sending user verification notifications.
- Improved user feedback in `user-payments-table.tsx` by updating the no payment message.
- Made minor adjustments in `application-layout.tsx` for consistent padding.
- Enhanced `signup-form.tsx` to display error messages for invalid user validation.

These changes improve the user verification process, enhance UI consistency, and provide better feedback to users.
2025-01-10 23:34:53 +05:00
a3f0759731 Refactor user verification and data handling
All checks were successful
Build and Push Docker Images / Build and Push Docker Images (push) Successful in 55s
- Updated `package.json` to add a new script for Prisma database setup.
- Replaced `usePerson` hook with `getNationalPerson` function in `lib/person.ts` for improved national data fetching.
- Refactored imports in `auth-actions.ts`, `user-actions.ts`, and `verify/page.tsx` to use the new `getNationalPerson` function.
- Enhanced device notification logic in `check-devices/route.ts` to correctly handle payment data.
- Improved error handling in `devices-to-pay.tsx` for better user feedback.

These changes streamline user verification processes and enhance data integrity across the application.
2025-01-10 21:58:13 +05:00
fcf4f37561 remove unused imports
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 32s
2025-01-10 21:44:47 +05:00
0e6f405ec4
optimize container build
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 1m36s
2025-01-10 21:20:33 +05:00
fe3161ead9
auto build
Some checks failed
Build and Push Docker Images / Build and Push Docker Images (push) Failing after 20s
2025-01-10 20:57:37 +05:00
ff0eae6ec4 Enhance user verification and data validation features
- Updated `next.config.ts` to include remote image patterns for user verification.
- Introduced `VerifyUserDetails` function in `lib/person.ts` to validate user data against national records.
- Added `usePerson` hook for fetching national data based on ID card.
- Enhanced `signup` and `signin` functions in `auth-actions.ts` to handle user verification status and send notifications for pending verifications.
- Refactored `VerifyUser` function in `user-actions.ts` to incorporate national data validation.
- Improved UI components in the user verification page to display both database and national information.
- Updated `InputReadOnly` component to support customizable label classes for better styling.

These changes improve the user verification process, ensuring data integrity and enhancing the overall user experience.
2025-01-10 15:59:44 +05:00
1a195d2307 Enhance payment processing and device management features
- Updated `package.json` to add a new script for pushing Prisma database changes.
- Refactored payment processing functions to include payment method handling for both wallet and transfer options.
- Improved `DevicesTable` and `AdminDevicesTable` components to support new payment method display and user association.
- Updated Prisma schema to introduce a new `PaymentType` enum and modified the `Payment` model to include a `method` field.
- Enhanced UI components to improve user experience in displaying payment and device information.

These changes improve the overall functionality and maintainability of the application, particularly in payment processing and device management.
2025-01-08 23:04:30 +05:00
0a63e4337e Enhance user management and payment processing features
- Updated `package.json` to include a new script for launching Prisma Studio.
- Modified `signup` function in `auth-actions.ts` to include account number in user data.
- Refactored `createPayment` function in `payment.ts` to improve error handling and return structured responses.
- Updated UI components in the dashboard to improve layout and responsiveness, including changes to `UserDevices` and `UserPayments` pages.
- Introduced new `AdminDevicesTable` and `UsersPaymentsTable` components for better admin functionalities.
- Enhanced `DeviceCartDrawer` to provide user feedback during payment processing.
- Added account number input to the signup form and updated validation schema accordingly.
- Updated Prisma schema to include a new `ninja_user_id` field for user management.

These changes improve the overall functionality, maintainability, and user experience of the application, particularly in user management and payment processing.
2025-01-06 12:49:13 +05:00
745f8d8fad Enhance device management and user experience features
- Updated `package.json` to include the latest version of `@radix-ui/react-separator` and added `moment` for date handling.
- Modified `blockDevice` function in `omada-actions.ts` to include a `blockedBy` parameter, allowing differentiation between admin and parent actions.
- Refactored `payment.ts` to include expiry date handling for devices during payment processing.
- Improved `DevicesTable` and `ClickableRow` components to support admin functionalities and enhance device interaction.
- Updated `BlockDeviceDialog` to accept an `admin` prop, allowing for tailored blocking actions based on user role.
- Enhanced UI components for better consistency and responsiveness across the dashboard.

These changes improve the overall functionality and maintainability of the application, providing a better user experience in device management.
2025-01-01 23:48:56 +05:00
bdf3729b0d Implement new features and enhance existing components for improved user experience
- Added a new `bun.lockb` file for dependency management.
- Updated `next.config.ts` to set output to "standalone" for better deployment options.
- Removed `package-lock.json` to streamline package management.
- Modified `package.json` to update dependencies, including `@prisma/client` and `sonner`, and adjusted build scripts for improved functionality.
- Enhanced Tailwind CSS configuration to include new animations and color schemes.
- Refactored various dashboard components to improve UI consistency, including adding a new `My Wallet` page and updating existing pages to use a unified styling approach.
- Introduced a new `BlockDeviceDialog` component for managing device blocking with user-defined reasons.
- Improved logging and error handling in payment verification and device management functions.

These changes enhance the overall functionality, maintainability, and user experience of the application.
2024-12-26 20:25:59 +05:00
5fb6f52bfc
docker build works now 2024-12-26 16:21:13 +05:00
0f17800a00 Refactor UI components for improved consistency and functionality
- Removed unnecessary border styles from various dashboard components including Devices, DeviceDetails, Parental Control, Payments, and Users pages to enhance visual consistency.
- Updated DevicesTable to utilize a new ClickableRow component for better device interaction and management.
- Refactored AddDevicesToCartButton to use a checkbox for selecting devices, improving user experience.
- Enhanced DeviceCard component to streamline device information display and interaction.
- Overall improvements to the layout and responsiveness of the dashboard components.

These changes enhance the user interface and improve the maintainability of the codebase.
2024-12-26 00:43:39 +05:00
7acd1189ee swap trusted origins for .env variables 2024-12-25 22:57:54 +05:00
df820ffdf0 Update dependencies and refactor calendar component
- Upgraded several dependencies in package.json and package-lock.json, including @faker-js/faker, next, react, and typescript, to their latest versions for improved performance and security.
- Refactored the Calendar component in calendar.tsx to simplify icon rendering by removing unnecessary props, enhancing code readability.

These changes ensure the application is up-to-date with the latest library versions and improve the maintainability of the Calendar component.
2024-12-25 21:54:56 +05:00
5c167e436d Refactor SMS notification handling to use environment variables
- Updated SMS API calls in auth-actions.ts, user-actions.ts, and check-devices/route.ts to utilize environment variables for the base URL and API key.
- Changed request body parameters from 'text' to 'message' and added 'check_delivery' to improve SMS delivery tracking.

These changes enhance security and maintainability by centralizing configuration settings.
2024-12-25 21:22:30 +05:00
75ad431160 Enhance payment processing and device management features
- Introduced wallet payment option in verifyPayment function to allow users to pay using their wallet balance.
- Added new BlockDeviceDialog component for managing device blocking and unblocking actions.
- Updated DeviceCard component to display device status and integrate blocking functionality.
- Refactored DevicesTable to utilize DeviceCard for better UI representation of devices.
- Implemented Wallet component to manage wallet balance and top-up functionality.
- Enhanced API routes and Prisma schema to support wallet transactions and device blocking reasons.
- Improved overall user experience with responsive design adjustments and new UI elements.

These changes improve user control over payments and device management, enhancing the overall functionality of the application.
2024-12-25 17:21:04 +05:00
c06c4fee3f Implement parental control features and enhance device management
- Added a new Parental Control page for managing device access and notifications.
- Introduced blockDevice function to handle blocking and unblocking devices based on payment status.
- Enhanced omada-actions.ts to include device blocking logic and improved error handling.
- Updated DevicesTable component to integrate BlockDeviceButton for managing device states.
- Implemented API route for checking device statuses and sending notifications for expiring devices.
- Refactored payment processing to update device statuses upon successful payment verification.
- Added new utility functions for API key validation and SMS notifications.

These changes improve user control over device management and enhance the overall functionality of the application.
2024-12-22 21:34:57 +05:00
586c0e7210 Refactor Omada actions and enhance payment processing
- Simplified fetchOmadaGroupProfiles function by removing unnecessary parameters and using environment variables for base URL and API key.
- Improved error handling in fetchOmadaGroupProfiles to check for error codes in the response.
- Updated addDevicesToGroup function to remove redundant parameters and streamline device addition logic.
- Integrated formatMacAddress utility to ensure consistent MAC address formatting during payment verification.
- Enhanced verifyPayment function to include device addition upon successful payment verification, with improved logging.
- Refactored DevicesToPay component to clean up payment verification logic and improve UI responsiveness.

These changes enhance the clarity and efficiency of device management and payment processing functionalities.
2024-12-21 00:24:29 +05:00
1d6f4faf7e Refactor Docker setup and add Prisma Studio service
- Introduced a new prisma-studio service in compose.yml for easier database management.
- Added a PostgreSQL database service with environment variables for user and database setup.
- Removed the outdated node service configuration from .build/dev/compose.yml.
- Simplified the node Dockerfile by removing unnecessary shell configuration.
- Created a new prisma.Dockerfile for running Prisma Studio.

These changes enhance the development environment and streamline database interactions.
2024-12-16 21:39:03 +05:00
e9d81c089a Implement Omada device management and enhance payment processing
- Added new omada-actions.ts file to handle fetching and updating device groups in Omada.
- Updated authMiddleware to include new payment routes.
- Enhanced createPayment function to add devices to a group upon successful payment verification.
- Improved payment verification process to include device management.
- Refactored PaymentsTable and DevicesToPay components for better UI and state handling.
- Removed unused hasSession function from auth-guard.ts for cleaner code.
2024-12-13 11:24:13 +05:00
36f22c0614 Enhance payment processing and user interaction features
- Updated createPayment function to log payment data more clearly.
- Introduced verifyPayment function for validating payments via an external API.
- Enhanced DevicesToPay component to include user information and payment verification functionality.
- Added formatDate utility for consistent date formatting across the application.
- Updated Prisma schema to include account number for users.
- Refactored layout and device cart components for improved user experience and responsiveness.
2024-12-09 22:59:13 +05:00
40b40ad3d1
example readme for prod deployment 2024-12-09 02:00:29 +05:00
fd4e147683
prepare for docker env 2024-12-09 01:57:18 +05:00
f9cac92858
prepare for docker env 2024-12-09 01:56:25 +05:00
e815da495a Add payment processing and device management features
- Introduced createPayment action for handling payment creation.
- Added PaymentsTable component for displaying payment records with pagination.
- Implemented new PaymentPage for viewing individual payment details and associated devices.
- Refactored DeviceCartDrawer to integrate payment creation and device selection.
- Enhanced DevicesToPay component to display devices based on payment status.
- Updated PriceCalculator component for better user input handling.
- Introduced NumberInput component for consistent number input across forms.
- Modified Prisma schema to include new fields for payments and devices.
- Improved overall user experience with responsive design adjustments and new UI elements.
2024-12-07 14:09:53 +05:00
c6f45710ca Enhance dashboard functionality with new payment and device management features
- Added new PaymentPage component for processing payments and displaying devices to pay.
- Introduced DeviceDetails component for viewing individual device information.
- Implemented PriceCalculator component for calculating costs based on user input.
- Integrated Jotai for state management across components, including device cart functionality.
- Updated layout to include Jotai Provider for state management.
- Enhanced DevicesTable with AddDevicesToCartButton for adding devices to the cart.
- Refactored sidebar to include a link to the new Price Calculator page.
- Updated Prisma schema to include Payment and BillFormula models for better data handling.
- Added new UI components for device cart management and drawer functionality.
- Improved overall user experience with responsive design adjustments and new UI elements.
2024-12-06 14:16:05 +05:00
9021f01ff4 Add Agreements page, enhance Devices and Users components with sorting and filtering options, and implement user verification dialogs
- Introduced a new Agreements page for managing agreements in the dashboard.
- Enhanced the Devices page by adding sorting and filtering options for better device management.
- Updated the Users page to include sorting functionality and improved layout.
- Implemented user verification and rejection dialogs for better user management.
- Added InputReadOnly component for displaying user information in a read-only format.
- Refactored search component to improve usability and visual consistency.
2024-12-01 23:19:31 +05:00
2b0bd515e7 Update package.json for turbopack support, enhance AppSidebar with new icons, and add Textarea and auth-utils components
- Modified the dev script in package.json to use turbopack for improved development performance.
- Enhanced AppSidebar by adding new icons for navigation items, improving visual clarity.
- Introduced a new Textarea component for consistent styling and functionality across forms.
- Added auth-utils module to fetch the current user session, streamlining user authentication processes.
2024-12-01 23:19:21 +05:00
2cbf9fb773 Add user rejection and device addition functionalities
- Implemented Rejectuser function to delete a user and send rejection details via SMS.
- Added SendUserRejectionDetailSMS function for SMS notifications.
- Introduced AddDevice function to create new devices associated with users.
- Updated user-actions.ts to include new functionalities and improve user management.
- Refactored auth-guard.ts to ensure proper session handling for admin access.
2024-12-01 23:16:54 +05:00
3f8bb4e70a Refactor authentication components and enhance user session handling
- Updated AccountPopover to utilize session data for user information display.
- Modified ApplicationLayout to fetch user details from the database using Prisma.
- Replaced Checkbox components with native input elements in SignUpForm for better accessibility.
- Enhanced seed script to include default islands and create related data in the database.
2024-12-01 07:40:21 +05:00
b91f34b6b1 Refactor dashboard components and update global styles
- Updated the title and description in layout.tsx to reflect the new application name.
- Replaced the background color in globals.css with a background image for the title section.
- Enhanced the Devices and UserDevices pages by adding search and filter components for improved user interaction.
- Introduced a new DevicesTable component for displaying device data with pagination.
- Updated the Users page to improve layout and added a filter for user status.
- Made various UI adjustments across components for better consistency and usability.
2024-11-30 23:38:32 +05:00
490150f9b7 Refactor user actions and authentication components
- Updated user verification logic to include atoll and island relationships.
- Introduced CreateClient function for integrating with external client API.
- Replaced 'house_name' with 'address' in user signup data handling.
- Added new Checkbox component for improved UI interactions.
- Migrated database provider from SQLite to PostgreSQL and redefined user schema.
- Removed obsolete migration files and ensured database integrity with new structure.
2024-11-30 23:38:20 +05:00
4e78ff2de9 Update user schema and forms to include address and consent fields
- Replaced 'house_name' with 'address' in user schema and related files.
- Added new fields for terms and privacy policy acceptance in the signup form schema.
- Updated package.json and package-lock.json to include @radix-ui/react-checkbox for checkbox functionality.
- Modified seed script to reflect changes in the user model.
2024-11-30 23:37:35 +05:00