Commit 2f18048
authored
feat: migrate to pnpm, enhance Docker and deployment workflows, and improve clipboard OTP UX (#362)
* chore: migrate project to pnpm and update dependencies
- Updated package manager from Yarn to pnpm in package.json and Dockerfile.
- Adjusted dependency specifications to use workspace:* for local packages.
- Removed yarn.lock and added pnpm-lock.yaml for dependency management.
- Updated Dockerfile to install pnpm globally and configure it for better network settings.
- Refactored middleware and cookie imports to align with new structure.
- Cleaned up unused code and comments in various components.
* refactor: update docker-compose configuration for core-client service
- Renamed core service to core-client for clarity.
- Added environment variables for base URL configurations.
- Removed commented-out network definitions to clean up the file.
* feat: add docker-compose configuration for core-client service
- Introduced a new docker-compose file for the core-client service.
- Configured build context and Dockerfile path.
- Set environment variables for base URL configurations.
* feat: add environment variables to Dockerfile for base URL configurations
- Introduced environment variables NEXT_PUBLIC_BASE_URL and NEXT_PUBLIC_BASE_URL_ATTACHMENT in the Dockerfile.
- Enhanced configuration for better integration with the core-client service.
* fix: update base URL in coreApi and guestApi to a hardcoded value
- Changed the base URL in coreApi and guestApi from the environment variable to a hardcoded URL for immediate testing.
- Added TODO comments to remind future updates to revert to using the environment variable.
* feat: enhance authentication components with clipboard OTP functionality
- Added a reusable `useClipboardOtp` hook for extracting OTP from the clipboard.
- Introduced `PasteOtpButton` component to facilitate pasting OTP directly into forms.
- Updated `SetPasswordPage`, `SignupOtpForm`, and other components to utilize the new clipboard functionality.
- Enhanced user experience by allowing OTP pasting and auto-submission.
- Refactored `PasswordInput` component for better integration with the new features.
* feat: add clipboard permission request functionality to useClipboardOtp hook
- Introduced a new `requestPermission` method to explicitly request clipboard access.
- Added `isRequestingPermission` state to track the permission request status.
- Updated `checkClipboard` method to utilize the new permission request logic.
- Enhanced the overall clipboard OTP functionality for better user experience.
* feat: implement clipboard permission listener in useClipboardOtp hook
- Added a useEffect to listen for changes in clipboard permission status.
- Automatically checks the clipboard when permission is granted.
* feat: add deploy action
* feat: add production docker-compose configuration for core-client service
- Introduced a new docker-compose.prod.yml file for deploying the core-client service.
- Configured service settings including build context, Dockerfile path, and environment variables for base URL configurations.
* refactor: update docker-compose configuration for client service
- Renamed core-client service to client for clarity.
- Updated image reference to use the latest version of the pixel-client.
- Adjusted service settings in docker-compose.prod.yml for improved deployment.
* chore: enhance Docker Hub deployment process in workflow
- Added a step to log in to Docker Hub before building and pushing the Docker image.
- Cleaned up the push command by removing redundant login steps from the push action.
- Improved overall clarity and efficiency of the deployment workflow.
* chore: clean up Docker deployment workflow
- Removed unnecessary blank lines in the deploy.yml file for improved readability.
- Ensured consistency in the Docker push command formatting.
* fix: update Docker deployment workflow to pull client service
- Changed the deployment command to pull the client service instead of the web service in the Docker Compose workflow.
- Ensured the deployment process aligns with the recent renaming of the core-client service.
* chore: remove commented-out Docker build and push steps from deployment workflow
- Eliminated unnecessary commented-out lines in the deploy.yml file to enhance clarity and maintainability of the workflow.
- Streamlined the deployment process by focusing on active commands.
* chore: add concurrency configuration to deployment workflow
- Introduced a concurrency group in the deploy.yml file to manage simultaneous workflow runs.
- Set the concurrency group to use the branch name, enhancing control over deployment processes.
* chore: update deployment workflow to use self-hosted runners
- Changed the runner configuration in deploy.yml to use self-hosted runners instead of the default group.
- Aimed to optimize deployment performance and resource management.
* chore: expose port for core service in production Docker Compose
- Added port mapping for the core service to expose port 3000 in docker-compose.prod.yml.
- This change allows external access to the service, facilitating communication with other services or clients.
* fix: update API base URLs from HTTPS to HTTP
- Changed the base URL for both coreApi and guestApi from "https://api.pixelgenius.ir" to "http://api.pixelgenius.ir".
- This adjustment ensures consistency in API endpoint usage across the application.
* refactor: simplify post-login schema transformation and update docker-compose configuration
- Modified the post-login schema transformation to return the original data without modifications.
- Updated the docker-compose.yml to rename the core-client service to client and changed the image reference to the latest version, enhancing clarity and consistency.
* feat: add development and preview Docker Compose configurations
- Introduced docker-compose.dev.yml for development environment with client-dev service.
- Added docker-compose.preview.yml for PR previews, allowing dynamic port assignment and image tagging.
- Updated deploy.yml to handle deployments for development and PR previews, enhancing CI/CD workflow.
* refactor: update PR comment actions in deployment workflow
- Replaced the GitHub script action with a sticky pull request comment action for posting deployment and cleanup messages.
- Enhanced the preview deployment comment to include a structured message with the preview URL and container details.
- Improved the cleanup confirmation comment to provide a clear summary of the resources removed after the PR is closed.
* chore: update permissions in deployment workflow
- Added permissions for reading contents and writing to pull requests and issues in deploy.yml.
- This change enhances the workflow's ability to interact with GitHub resources during deployment processes.1 parent f42431e commit 2f18048
File tree
42 files changed
+17604
-12127
lines changed- .github/workflows
- apps
- core
- app
- (landing)
- become-auther/_components
- auth
- _components
- forget-password/_components/form
- login
- _components/form
- set-password
- signup/otp/_components
- storybook
- packages
- apis
- src
- constant
- instance
- services/core/accounts/users/login/post
- utils
- design-system
- icons
- src/types
- ui
- src
- components
- molecules
- constant
- hooks
- utils
- scripts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
42 files changed
+17604
-12127
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 26 | + | |
| 27 | + | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
40 | | - | |
| 39 | + | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
| |||
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| |||
Lines changed: 19 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
3 | 12 | | |
4 | 13 | | |
5 | 14 | | |
| |||
18 | 27 | | |
19 | 28 | | |
20 | 29 | | |
21 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
22 | 33 | | |
23 | 34 | | |
24 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
25 | 39 | | |
26 | 40 | | |
27 | 41 | | |
| |||
32 | 46 | | |
33 | 47 | | |
34 | 48 | | |
35 | | - | |
| 49 | + | |
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
106 | 105 | | |
107 | 106 | | |
108 | 107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
| 1 | + | |
5 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
10 | 16 | | |
11 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
12 | 31 | | |
13 | | - | |
| 32 | + | |
14 | 33 | | |
15 | 34 | | |
16 | 35 | | |
| |||
Lines changed: 12 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
18 | | - | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
36 | 44 | | |
37 | 45 | | |
38 | 46 | | |
39 | 47 | | |
40 | 48 | | |
41 | | - | |
| 49 | + | |
| 50 | + | |
42 | 51 | | |
43 | 52 | | |
44 | 53 | | |
| |||
0 commit comments