├── .env.example ├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── custom.md │ └── feature_request.md ├── .gitignore ├── .vite └── deps_temp_da3ddc9a │ └── package.json ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── SECURITY.md ├── components.json ├── index.html ├── jsconfig.json ├── package-lock.json ├── package.json ├── postcss.config.js ├── public ├── Feature.png ├── Featurevid.mkv ├── Featurevid.mp4 ├── Featurevid.webm └── vite.png ├── src ├── App.css ├── App.jsx ├── Components │ ├── AI │ │ └── AIWritingAssistant.jsx │ ├── Auth │ │ ├── Login.jsx │ │ ├── Logout.jsx │ │ └── UserProfile.jsx │ ├── Common │ │ ├── ErrorBoundary.jsx │ │ └── Loading.jsx │ ├── Layout │ │ ├── Footer.jsx │ │ └── Header.jsx │ ├── Logo │ │ └── Logo.jsx │ ├── Notes │ │ ├── NoteEditor.jsx │ │ ├── NoteList.jsx │ │ ├── NoteView.jsx │ │ └── SharedNote.jsx │ ├── Text-Speach │ │ └── TextToSpeech.jsx │ ├── magicui │ │ ├── border-beam.jsx │ │ └── shimmer-button.jsx │ └── ui │ │ ├── Abouttext.jsx │ │ ├── Features.jsx │ │ ├── Geminie.jsx │ │ ├── ReviewCard.jsx │ │ ├── alert-dialog.jsx │ │ ├── alert.jsx │ │ ├── aurora-background.jsx │ │ ├── avatar.jsx │ │ ├── badge.jsx │ │ ├── button.jsx │ │ ├── card.jsx │ │ ├── cover.jsx │ │ ├── dialog.jsx │ │ ├── dropdown-menu.jsx │ │ ├── flip-words.jsx │ │ ├── google-gemini-effect.jsx │ │ ├── infinite-moving-cards.jsx │ │ ├── input.jsx │ │ ├── label.jsx │ │ ├── macbook-scroll.jsx │ │ ├── mode-toggle.jsx │ │ ├── popover.jsx │ │ ├── progress.jsx │ │ ├── scroll-area.jsx │ │ ├── select.jsx │ │ ├── separator.jsx │ │ ├── skeleton.jsx │ │ ├── slider.jsx │ │ ├── sparkles.jsx │ │ ├── spotlight.jsx │ │ ├── switch.jsx │ │ ├── tabs.jsx │ │ ├── text-generate-effect.jsx │ │ ├── textarea.jsx │ │ ├── toast.jsx │ │ ├── toaster.jsx │ │ ├── toggle.jsx │ │ ├── tooltip.jsx │ │ └── use-toast.js ├── Pages │ ├── About.jsx │ ├── Editor.jsx │ └── Home.jsx ├── Services │ ├── aiService.js │ └── appwrite.js ├── assets │ ├── logo1.png.png │ └── toolpilot-badge-b.png ├── index.css ├── lib │ ├── utils.js │ └── utils.ts └── main.jsx ├── tailwind.config.js ├── vercel.json └── vite.config.js /.env.example: -------------------------------------------------------------------------------- 1 | VITE_APPWRITE_URL="https://example.com/v1" 2 | VITE_APPWRITE_PROJECT_ID="your_project_id" 3 | VITE_APPWRITE_DATABASE_ID="your_database_id" 4 | VITE_APPWRITE_COLLECTION_ID="your_collection_id" 5 | VITE_APPWRITE_USERS_COLLECTION_ID="your_users_collection_id" 6 | VITE_APPWRITE_BUCKET_ID="your_bucket_id" 7 | VITE_GOOGLE_AI_API_KEY="your_google_ai_api_key" -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Desktop (please complete the following information):** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Smartphone (please complete the following information):** 32 | - Device: [e.g. iPhone6] 33 | - OS: [e.g. iOS8.1] 34 | - Browser [e.g. stock browser, safari] 35 | - Version [e.g. 22] 36 | 37 | **Additional context** 38 | Add any other context about the problem here. 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/custom.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Custom issue template 3 | about: Describe this issue template's purpose here. 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | *.env 26 | 27 | .vercel -------------------------------------------------------------------------------- /.vite/deps_temp_da3ddc9a/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module" 3 | } 4 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | We as members, contributors, and leaders pledge to make participation in our 6 | community a harassment-free experience for everyone, regardless of age, body 7 | size, visible or invisible disability, ethnicity, sex characteristics, gender 8 | identity and expression, level of experience, education, socio-economic status, 9 | nationality, personal appearance, race, religion, or sexual identity 10 | and orientation. 11 | 12 | We pledge to act and interact in ways that contribute to an open, welcoming, 13 | diverse, inclusive, and healthy community. 14 | 15 | ## Our Standards 16 | 17 | Examples of behavior that contributes to a positive environment for our 18 | community include: 19 | 20 | * Demonstrating empathy and kindness toward other people 21 | * Being respectful of differing opinions, viewpoints, and experiences 22 | * Giving and gracefully accepting constructive feedback 23 | * Accepting responsibility and apologizing to those affected by our mistakes, 24 | and learning from the experience 25 | * Focusing on what is best not just for us as individuals, but for the 26 | overall community 27 | 28 | Examples of unacceptable behavior include: 29 | 30 | * The use of sexualized language or imagery, and sexual attention or 31 | advances of any kind 32 | * Trolling, insulting or derogatory comments, and personal or political attacks 33 | * Public or private harassment 34 | * Publishing others' private information, such as a physical or email 35 | address, without their explicit permission 36 | * Other conduct which could reasonably be considered inappropriate in a 37 | professional setting 38 | 39 | ## Enforcement Responsibilities 40 | 41 | Community leaders are responsible for clarifying and enforcing our standards of 42 | acceptable behavior and will take appropriate and fair corrective action in 43 | response to any behavior that they deem inappropriate, threatening, offensive, 44 | or harmful. 45 | 46 | Community leaders have the right and responsibility to remove, edit, or reject 47 | comments, commits, code, wiki edits, issues, and other contributions that are 48 | not aligned to this Code of Conduct, and will communicate reasons for moderation 49 | decisions when appropriate. 50 | 51 | ## Scope 52 | 53 | This Code of Conduct applies within all community spaces, and also applies when 54 | an individual is officially representing the community in public spaces. 55 | Examples of representing our community include using an official e-mail address, 56 | posting via an official social media account, or acting as an appointed 57 | representative at an online or offline event. 58 | 59 | ## Enforcement 60 | 61 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 62 | reported to the community leaders responsible for enforcement at 63 | . 64 | All complaints will be reviewed and investigated promptly and fairly. 65 | 66 | All community leaders are obligated to respect the privacy and security of the 67 | reporter of any incident. 68 | 69 | ## Enforcement Guidelines 70 | 71 | Community leaders will follow these Community Impact Guidelines in determining 72 | the consequences for any action they deem in violation of this Code of Conduct: 73 | 74 | ### 1. Correction 75 | 76 | **Community Impact**: Use of inappropriate language or other behavior deemed 77 | unprofessional or unwelcome in the community. 78 | 79 | **Consequence**: A private, written warning from community leaders, providing 80 | clarity around the nature of the violation and an explanation of why the 81 | behavior was inappropriate. A public apology may be requested. 82 | 83 | ### 2. Warning 84 | 85 | **Community Impact**: A violation through a single incident or series 86 | of actions. 87 | 88 | **Consequence**: A warning with consequences for continued behavior. No 89 | interaction with the people involved, including unsolicited interaction with 90 | those enforcing the Code of Conduct, for a specified period of time. This 91 | includes avoiding interactions in community spaces as well as external channels 92 | like social media. Violating these terms may lead to a temporary or 93 | permanent ban. 94 | 95 | ### 3. Temporary Ban 96 | 97 | **Community Impact**: A serious violation of community standards, including 98 | sustained inappropriate behavior. 99 | 100 | **Consequence**: A temporary ban from any sort of interaction or public 101 | communication with the community for a specified period of time. No public or 102 | private interaction with the people involved, including unsolicited interaction 103 | with those enforcing the Code of Conduct, is allowed during this period. 104 | Violating these terms may lead to a permanent ban. 105 | 106 | ### 4. Permanent Ban 107 | 108 | **Community Impact**: Demonstrating a pattern of violation of community 109 | standards, including sustained inappropriate behavior, harassment of an 110 | individual, or aggression toward or disparagement of classes of individuals. 111 | 112 | **Consequence**: A permanent ban from any sort of public interaction within 113 | the community. 114 | 115 | ## Attribution 116 | 117 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], 118 | version 2.0, available at 119 | https://www.contributor-covenant.org/version/2/0/code_of_conduct.html. 120 | 121 | Community Impact Guidelines were inspired by [Mozilla's code of conduct 122 | enforcement ladder](https://github.com/mozilla/diversity). 123 | 124 | [homepage]: https://www.contributor-covenant.org 125 | 126 | For answers to common questions about this code of conduct, see the FAQ at 127 | https://www.contributor-covenant.org/faq. Translations are available at 128 | https://www.contributor-covenant.org/translations. 129 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # NoteX Contributor Guidelines 2 | 3 | Welcome! Follow these guidelines for a smooth collaboration. 4 | 5 | ## Table of Contents 6 | 1. [Code of Conduct](#code-of-conduct) 7 | 2. [How to Contribute](#how-to-contribute) 8 | - Reporting Bugs 9 | - Feature Requests 10 | - Submitting Code 11 | 3. [Development Setup](#development-setup) 12 | 4. [Pull Request Guidelines](#pull-request-guidelines) 13 | 5. [Code Style Guidelines](#code-style-guidelines) 14 | 6. [Issue Management](#issue-management) 15 | 7. [Contact](#contact) 16 | 17 | ## Code of Conduct 18 | 19 | Adhere to the [Contributor Covenant Code of Conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct/). Be respectful and inclusive. 20 | 21 | ## How to Contribute 22 | 23 | ### Reporting Bugs 24 | 25 | - Search [issues](https://github.com/soummyaanon/-noteX/issues) for existing reports. 26 | - Open a new issue with detailed reproduction steps if not found. 27 | 28 | ### Feature Requests 29 | 30 | - Open a feature request in the issues section with your idea and use cases. 31 | 32 | ### Submitting Code 33 | 34 | 1. Fork the repo and create a new branch (`git checkout -b feature-branch`). 35 | 2. Implement changes following code style guidelines. 36 | 3. Ensure all tests pass. 37 | 4. Commit with a clear message (`git commit -m "Add feature XYZ"`). 38 | 5. Push your branch (`git push origin feature-branch`). 39 | 6. Submit a pull request (PR) and reference relevant issues. -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | ## Getting Started 3 | 4 | To get started with this template, follow these steps: 5 | 6 | 1. Clone the repository: 7 | ```sh 8 | git clone https://github.com/soummyaanon/-noteX 9 | ``` 10 | 2. Navigate to the project directory: 11 | ```sh 12 | cd your-repo-name 13 | ``` 14 | 3. Install the dependencies: 15 | ```sh 16 | npm install 17 | ``` 18 | 4. Start the development server: 19 | ```sh 20 | npm run dev 21 | ``` 22 | 23 | ## Contributing 24 | 25 | We welcome contributions to this project! If you'd like to contribute, please follow these guidelines: 26 | 27 | 1. **Fork the repository**: Click the "Fork" button at the top right of this page to create a copy of the repository on your GitHub account. 28 | 29 | 2. **Clone your fork**: Clone the forked repository to your local machine. 30 | ```sh 31 | git clone https://github.com/soummyaanon/-noteX 32 | ``` 33 | 34 | 3. **Create a new branch**: Create a new branch for your feature or bugfix. 35 | ```sh 36 | git checkout -b my-feature-branch 37 | ``` 38 | 39 | 4. **Make your changes**: Make the necessary changes to the codebase. 40 | 41 | 5. **Commit your changes**: Commit your changes with a descriptive commit message. 42 | ```sh 43 | git commit -m "Description of my changes" 44 | ``` 45 | 46 | 6. **Push to your fork**: Push your changes to your forked repository. 47 | ```sh 48 | git push origin my-feature-branch 49 | ``` 50 | 51 | 7. **Create a Pull Request**: Go to the original repository on GitHub and create a pull request from your forked repository. Provide a clear description of your changes and why they are necessary. 52 | 53 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | Use this section to tell people about which versions of your project are 6 | currently being supported with security updates. 7 | 8 | | Version | Supported | 9 | | ------- | ------------------ | 10 | | 5.1.x | :white_check_mark: | 11 | | 5.0.x | :x: | 12 | | 4.0.x | :white_check_mark: | 13 | | < 4.0 | :x: | 14 | 15 | ## Reporting a Vulnerability 16 | 17 | Use this section to tell people how to report a vulnerability. 18 | 19 | Tell them where to go, how often they can expect to get an update on a 20 | reported vulnerability, what to expect if the vulnerability is accepted or 21 | declined, etc. 22 | -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": false, 5 | "tsx": false, 6 | "tailwind": { 7 | "config": "tailwind.config.js", 8 | "css": "src/index.css", 9 | "baseColor": "slate", 10 | "cssVariables": true 11 | }, 12 | "aliases": { 13 | "components": "@/components", 14 | "utils": "@/lib/utils" 15 | } 16 | } -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | noteX 11 | 22 | 23 | 24 |
25 | 26 | 27 | -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "paths": { 5 | "@/*": ["./src/*"] 6 | } 7 | } 8 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "notecolab", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "vite build", 9 | "lint": "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "@fontsource/amatic-sc": "^5.1.0", 14 | "@fontsource/caveat": "^5.1.0", 15 | "@fontsource/dancing-script": "^5.1.0", 16 | "@fontsource/indie-flower": "^5.1.0", 17 | "@fontsource/pacifico": "^5.1.0", 18 | "@fontsource/permanent-marker": "^5.1.0", 19 | "@fontsource/shadows-into-light": "^5.1.0", 20 | "@google/generative-ai": "^0.17.1", 21 | "@radix-ui/react-alert-dialog": "^1.1.1", 22 | "@radix-ui/react-avatar": "^1.1.0", 23 | "@radix-ui/react-dialog": "^1.1.1", 24 | "@radix-ui/react-dropdown-menu": "^2.1.1", 25 | "@radix-ui/react-label": "^2.1.0", 26 | "@radix-ui/react-popover": "^1.1.1", 27 | "@radix-ui/react-progress": "^1.1.0", 28 | "@radix-ui/react-scroll-area": "^1.1.0", 29 | "@radix-ui/react-select": "^2.1.1", 30 | "@radix-ui/react-separator": "^1.1.0", 31 | "@radix-ui/react-slider": "^1.2.0", 32 | "@radix-ui/react-slot": "^1.1.0", 33 | "@radix-ui/react-switch": "^1.1.0", 34 | "@radix-ui/react-tabs": "^1.1.0", 35 | "@radix-ui/react-toast": "^1.2.1", 36 | "@radix-ui/react-toggle": "^1.1.0", 37 | "@radix-ui/react-tooltip": "^1.1.2", 38 | "@tabler/icons-react": "^3.17.0", 39 | "@tensorflow-models/universal-sentence-encoder": "^1.3.3", 40 | "@tensorflow/tfjs": "^4.20.0", 41 | "@tsparticles/engine": "^3.5.0", 42 | "@tsparticles/react": "^3.0.0", 43 | "@tsparticles/slim": "^3.5.0", 44 | "appwrite": "^15.0.0", 45 | "canvas-confetti": "^1.9.3", 46 | "class-variance-authority": "^0.7.0", 47 | "clsx": "^2.1.1", 48 | "docx": "^8.5.0", 49 | "file-saver": "^2.0.5", 50 | "framer-motion": "^11.5.4", 51 | "jspdf": "^3.0.1", 52 | "lodash.debounce": "^4.0.8", 53 | "lucide-react": "^0.439.0", 54 | "marked": "^13.0.2", 55 | "next-themes": "^0.3.0", 56 | "react": "^18.3.1", 57 | "react-dom": "^18.3.1", 58 | "react-hook-form": "^7.52.1", 59 | "react-icons": "^5.3.0", 60 | "react-router-dom": "^6.24.1", 61 | "react-spinners": "^0.14.1", 62 | "tailwind-merge": "^2.5.2", 63 | "tailwindcss-animate": "^1.0.7" 64 | }, 65 | "devDependencies": { 66 | "@rollup/plugin-commonjs": "^26.0.1", 67 | "@types/node": "^22.5.2", 68 | "@types/offscreencanvas": "^2019.7.3", 69 | "@types/react": "^18.3.3", 70 | "@types/react-dom": "^18.3.0", 71 | "@types/webgl-ext": "^0.0.37", 72 | "@vitejs/plugin-react": "^4.3.4", 73 | "autoprefixer": "^10.4.19", 74 | "eslint": "^8.57.0", 75 | "eslint-plugin-react": "^7.34.2", 76 | "eslint-plugin-react-hooks": "^4.6.2", 77 | "eslint-plugin-react-refresh": "^0.4.7", 78 | "postcss": "^8.4.39", 79 | "tailwindcss": "^3.4.10", 80 | "typescript": "^5.5.4", 81 | "vite": "^6.3.4" 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /public/Feature.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soummyaanon/-noteX/061577f9bd93974097e42e11c9b99ccc770f4543/public/Feature.png -------------------------------------------------------------------------------- /public/Featurevid.mkv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soummyaanon/-noteX/061577f9bd93974097e42e11c9b99ccc770f4543/public/Featurevid.mkv -------------------------------------------------------------------------------- /public/Featurevid.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soummyaanon/-noteX/061577f9bd93974097e42e11c9b99ccc770f4543/public/Featurevid.mp4 -------------------------------------------------------------------------------- /public/Featurevid.webm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soummyaanon/-noteX/061577f9bd93974097e42e11c9b99ccc770f4543/public/Featurevid.webm -------------------------------------------------------------------------------- /public/vite.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/soummyaanon/-noteX/061577f9bd93974097e42e11c9b99ccc770f4543/public/vite.png -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- 1 | /* Common styles */ 2 | #root { 3 | max-width: 1280px; 4 | margin: 0 auto; 5 | padding: 2rem; 6 | text-align: center; 7 | } 8 | 9 | /* Dark theme styles */ 10 | .dark { 11 | background-color: #000000; /* Pure black background */ 12 | color: #ffffff; /* White text */ 13 | } 14 | 15 | .dark .logo { 16 | filter: drop-shadow(0 0 2em #ffffffaa); /* White glow on hover */ 17 | } 18 | 19 | .dark .logo.react:hover { 20 | filter: drop-shadow(0 0 2em #61dafbaa); /* React blue glow on hover */ 21 | } 22 | 23 | .dark .card { 24 | padding: 2em; 25 | background-color: #1a1a1a; /* Dark gray background for cards */ 26 | border: 1px solid #333333; /* Darker border */ 27 | border-radius: 8px; 28 | color: #ffffff; /* White text */ 29 | } 30 | 31 | .dark .read-the-docs { 32 | color: #888888; /* Light gray text */ 33 | } 34 | 35 | /* Light theme styles */ 36 | .light { 37 | background-color: #ffffff; /* White background */ 38 | color: #000000; /* Black text */ 39 | } 40 | 41 | .light .logo { 42 | filter: drop-shadow(0 0 2em #000000aa); /* Black glow on hover */ 43 | } 44 | 45 | .light .logo.react:hover { 46 | filter: drop-shadow(0 0 2em #61dafbaa); /* React blue glow on hover */ 47 | } 48 | 49 | .light .card { 50 | padding: 2em; 51 | background-color: #f0f0f0; /* Light gray background for cards */ 52 | border: 1px solid #cccccc; /* Lighter border */ 53 | border-radius: 8px; 54 | color: #000000; /* Black text */ 55 | } 56 | 57 | .light .read-the-docs { 58 | color: #555555; /* Dark gray text */ 59 | } 60 | 61 | /* Animation and media query */ 62 | @keyframes logo-spin { 63 | from { 64 | transform: rotate(0deg); 65 | } 66 | to { 67 | transform: rotate(360deg); 68 | } 69 | } 70 | 71 | @media (prefers-reduced-motion: no-preference) { 72 | a:nth-of-type(2) .logo { 73 | animation: logo-spin infinite 20s linear; 74 | } 75 | } 76 | .glow-cyan { 77 | box-shadow: 0 0 15px rgba(0, 255, 255, 0.5); 78 | } -------------------------------------------------------------------------------- /src/App.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect, lazy, Suspense } from 'react'; 2 | import { BrowserRouter as Router, Route, Routes, Navigate } from 'react-router-dom'; 3 | import { ThemeProvider } from 'next-themes'; 4 | import { getCurrentUser } from './Services/appwrite'; 5 | import Header from './Components/Layout/Header'; 6 | import Footer from './Components/Layout/Footer'; 7 | import Loading from './Components/Common/Loading'; 8 | import ErrorBoundary from './Components/Common/ErrorBoundary'; 9 | import './App.css'; 10 | 11 | // Lazy-loaded components 12 | const Login = lazy(() => import('./Components/Auth/Login')); 13 | const NoteList = lazy(() => import('./Components/Notes/NoteList')); 14 | const SharedNote = lazy(() => import('./Components/Notes/SharedNote')); 15 | const NoteEditor = lazy(() => import('./Components/Notes/NoteEditor')); 16 | const NoteView = lazy(() => import('./Components/Notes/NoteView')); 17 | const Home = lazy(() => import('./Pages/Home')); 18 | const Editor = lazy(() => import('./Pages/Editor')); 19 | const UserProfile = lazy(() => import('./Components/Auth/UserProfile')); 20 | const About = lazy(() => import('./Pages/About')); // Added About page 21 | 22 | export default function App() { 23 | const [user, setUser] = useState(null); 24 | const [loading, setLoading] = useState(true); 25 | 26 | useEffect(() => { 27 | const checkUser = async () => { 28 | try { 29 | const currentUser = await getCurrentUser(); 30 | setUser(currentUser); 31 | } catch (error) { 32 | console.error('Error checking user:', error); 33 | setUser(null); 34 | } finally { 35 | setLoading(false); 36 | } 37 | }; 38 | checkUser(); 39 | }, []); 40 | 41 | if (loading) { 42 | return ; 43 | } 44 | 45 | return ( 46 | 47 | 48 | 49 |
50 |
51 |
52 | }> 53 | 54 | } /> 55 | : } 58 | /> 59 | : } 62 | /> 63 | : } 66 | /> 67 | : } 70 | /> 71 | : } 74 | /> 75 | } /> 76 | : } 79 | /> 80 | } /> {/* Added About route */} 81 | } /> 82 | 83 | 84 |
85 |
86 |
87 |
88 |
89 |
90 | ); 91 | } -------------------------------------------------------------------------------- /src/Components/Auth/Logout.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { useNavigate } from 'react-router-dom'; 3 | import { logout } from '../../Services/appwrite'; 4 | import { FiLogOut } from 'react-icons/fi'; // Import the logout icon 5 | 6 | function Logout() { 7 | const navigate = useNavigate(); 8 | 9 | const handleLogout = async () => { 10 | try { 11 | await logout(); 12 | // Redirect to login page after successful logout 13 | navigate('/login'); 14 | } catch (error) { 15 | console.error('Logout failed:', error); 16 | // You might want to show an error message to the user here 17 | } 18 | }; 19 | 20 | return ( 21 | 28 | ); 29 | } 30 | 31 | export default Logout; -------------------------------------------------------------------------------- /src/Components/Common/ErrorBoundary.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | class ErrorBoundary extends React.Component { 4 | constructor(props) { 5 | super(props); 6 | this.state = { hasError: false }; 7 | } 8 | 9 | static getDerivedStateFromError(error) { 10 | return { hasError: true }; 11 | } 12 | 13 | componentDidCatch(error, errorInfo) { 14 | console.error("Uncaught error:", error, errorInfo); 15 | } 16 | 17 | render() { 18 | if (this.state.hasError) { 19 | return ( 20 |
21 |

Oops! Something went wrong.

22 |

We're sorry for the inconvenience. Please try refreshing the page or contact support if the problem persists.

23 | 29 |
30 | ); 31 | } 32 | 33 | return this.props.children; 34 | } 35 | } 36 | 37 | export default ErrorBoundary; -------------------------------------------------------------------------------- /src/Components/Common/Loading.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from 'react'; 2 | import { PuffLoader } from 'react-spinners'; 3 | import { Progress } from "../ui/progress"; 4 | 5 | const NoteXSimpleLoader = () => { 6 | const [progress, setProgress] = useState(0); 7 | const [isDarkMode, setIsDarkMode] = useState(true); 8 | 9 | useEffect(() => { 10 | const timer = setInterval(() => { 11 | setProgress((prevProgress) => 12 | prevProgress < 100 ? prevProgress + 1 : 0 13 | ); 14 | }, 300); 15 | 16 | const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)'); 17 | setIsDarkMode(mediaQuery.matches); 18 | const handleChange = (e) => setIsDarkMode(e.matches); 19 | mediaQuery.addListener(handleChange); 20 | 21 | return () => { 22 | clearInterval(timer); 23 | mediaQuery.removeListener(handleChange); 24 | }; 25 | }, []); 26 | 27 | const bgColor = isDarkMode ? 'bg-black' : 'bg-white'; 28 | const textColor = isDarkMode ? 'text-white' : 'text-black'; 29 | const subTextColor = isDarkMode ? 'text-gray-400' : 'text-gray-600'; 30 | 31 | return ( 32 |
33 |

34 | noteX 35 |

36 | 37 | 38 |
39 | 40 |
41 |

42 | Initializing AI-powered notes... {progress}% 43 |

44 |
45 | ); 46 | }; 47 | 48 | export default NoteXSimpleLoader; -------------------------------------------------------------------------------- /src/Components/Layout/Footer.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Button } from "../ui/button"; 3 | import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../ui/tooltip"; 4 | import { cn } from "../../lib/utils"; 5 | import { Github, Linkedin } from 'lucide-react'; 6 | import { RiTwitterXFill } from "react-icons/ri"; 7 | 8 | export default function MinimalisticFooter() { 9 | const currentYear = new Date().getFullYear(); 10 | 11 | const socialLinks = [ 12 | { name: 'GitHub', icon: Github, url: 'https://github.com/soummyaanon' }, 13 | { name: 'Twitter', icon: RiTwitterXFill, url: 'https://twitter.com/Thesourya2000' }, 14 | { name: 'LinkedIn', icon: Linkedin, url: 'https://www.linkedin.com/in/soumyapanda12/' }, 15 | ]; 16 | 17 | return ( 18 | 58 | ); 59 | } -------------------------------------------------------------------------------- /src/Components/Layout/Header.jsx: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState, useCallback } from 'react' 2 | import { Link, useNavigate, useLocation } from 'react-router-dom' 3 | import { logout, getProfileImage } from '../../Services/appwrite' 4 | import { Button } from "../ui/button" 5 | import { 6 | DropdownMenu, 7 | DropdownMenuContent, 8 | DropdownMenuItem, 9 | DropdownMenuTrigger, 10 | } from "../ui/dropdown-menu" 11 | import { Avatar, AvatarFallback, AvatarImage } from "../ui/avatar" 12 | import { ModeToggle } from "../ui/mode-toggle" 13 | import { Menu } from "lucide-react" 14 | import { Progress } from "../ui/progress" 15 | import Logo from '../Logo/Logo' 16 | import { FiHome, FiLogIn, FiFileText, FiPlusSquare, FiUser, FiLogOut, FiInfo } from 'react-icons/fi' 17 | import { motion, AnimatePresence } from 'framer-motion' 18 | 19 | 20 | 21 | 22 | export default function Component({ user, setUser }) { 23 | const navigate = useNavigate() 24 | const location = useLocation() 25 | const [profileImageUrl, setProfileImageUrl] = useState(null) 26 | const [loading, setLoading] = useState(false) 27 | const [mobileMenuOpen, setMobileMenuOpen] = useState(false) 28 | const [loadingProgress, setLoadingProgress] = useState(0) 29 | 30 | const fetchProfileImage = useCallback(async () => { 31 | if (user?.profileImageId) { 32 | try { 33 | const imageUrl = await getProfileImage(user.profileImageId) 34 | setProfileImageUrl(imageUrl) 35 | } catch (error) { 36 | console.error('Error fetching profile image:', error) 37 | } 38 | } else { 39 | setProfileImageUrl(null) 40 | } 41 | }, [user]) 42 | 43 | useEffect(() => { 44 | fetchProfileImage() 45 | const refreshInterval = setInterval(fetchProfileImage, 1000) // Refresh every 5 seconds 46 | return () => clearInterval(refreshInterval) 47 | }, [fetchProfileImage]) 48 | 49 | useEffect(() => { 50 | setLoading(true) 51 | setLoadingProgress(0) 52 | const timer = setInterval(() => { 53 | setLoadingProgress((oldProgress) => { 54 | if (oldProgress === 100) { 55 | clearInterval(timer) 56 | setLoading(false) 57 | return 100 58 | } 59 | const diff = Math.random() * 20 60 | return Math.min(oldProgress + diff, 100) 61 | }) 62 | }, 50) 63 | return () => clearInterval(timer) 64 | }, [location]) 65 | 66 | const handleLogout = useCallback(async () => { 67 | try { 68 | setLoading(true) 69 | await logout() 70 | setUser(null) 71 | navigate('/login') 72 | } catch (error) { 73 | console.error('Logout failed:', error) 74 | } finally { 75 | setLoading(false) 76 | } 77 | }, [navigate, setUser]) 78 | 79 | const NavItem = useCallback(({ to, icon: Icon, label }) => ( 80 | 81 | 91 | {label} 92 | 93 | ), [location.pathname]) 94 | 95 | const navItems = ( 96 | <> 97 | 98 | {user ? ( 99 | <> 100 | 101 | 102 | 103 | ) : ( 104 | 105 | )} 106 | 107 | ) 108 | 109 | return ( 110 |
111 | {loading && ( 112 | 113 | )} 114 |
115 | 163 | 164 | 165 | {mobileMenuOpen && ( 166 | 173 |
174 | {navItems} 175 | {user && ( 176 | <> 177 | 178 | 179 | 183 | 184 | )} 185 |
186 |
187 | )} 188 |
189 |
190 | ) 191 | } -------------------------------------------------------------------------------- /src/Components/Logo/Logo.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import logo from '../../assets/logo1.png.png'; // adjust the path to match your file structure 3 | 4 | function Logo() { 5 | return ( 6 | Logo 11 | ); 12 | } 13 | 14 | export default Logo; -------------------------------------------------------------------------------- /src/Components/Notes/NoteView.jsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import React, { useState, useEffect, useCallback } from 'react' 4 | import { useParams, useNavigate } from 'react-router-dom' 5 | import { getDocument, deleteDocument, getCurrentUser } from '../../Services/appwrite' 6 | import { marked } from 'marked' 7 | import { Card, CardContent, CardFooter } from '../ui/card' 8 | import { Button } from '../ui/button' 9 | import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from '../ui/alert-dialog' 10 | import { Skeleton } from '../ui/skeleton' 11 | import { Alert, AlertDescription, AlertTitle } from '../ui/alert' 12 | import { ChevronLeft, Pencil, Trash2, Clock, Eye, Code, Volume2, Link, Maximize2, Minimize2, AlignLeft, AlignCenter, AlignRight } from 'lucide-react' 13 | import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "../ui/tooltip" 14 | import { Tabs, TabsContent, TabsList, TabsTrigger } from "../ui/tabs" 15 | import { Toggle } from "../ui/toggle" 16 | import { motion, AnimatePresence } from 'framer-motion' 17 | import TextToSpeech from '../Text-Speach/TextToSpeech' 18 | 19 | // Import Google Fonts 20 | import '@fontsource/caveat' 21 | import '@fontsource/dancing-script' 22 | import '@fontsource/indie-flower' 23 | import '@fontsource/pacifico' 24 | import '@fontsource/permanent-marker' 25 | import '@fontsource/shadows-into-light' 26 | import '@fontsource/amatic-sc' 27 | 28 | const NOTES_COLLECTION_ID = import.meta.env.VITE_APPWRITE_COLLECTION_ID 29 | 30 | export default function Component() { 31 | const { noteId } = useParams() 32 | const navigate = useNavigate() 33 | const [note, setNote] = useState(null) 34 | const [loading, setLoading] = useState(true) 35 | const [error, setError] = useState(null) 36 | const [currentUser, setCurrentUser] = useState(null) 37 | const [showTextToSpeech, setShowTextToSpeech] = useState(false) 38 | const [activeTab, setActiveTab] = useState('preview') 39 | const [zenMode, setZenMode] = useState(false) 40 | const [textAlignment, setTextAlignment] = useState('left') 41 | const [linkCopied, setLinkCopied] = useState(false) 42 | 43 | const fetchNoteAndUser = useCallback(async () => { 44 | try { 45 | const [fetchedNote, user] = await Promise.all([ 46 | getDocument(NOTES_COLLECTION_ID, noteId), 47 | getCurrentUser() 48 | ]) 49 | setNote(fetchedNote) 50 | setCurrentUser(user) 51 | } catch (err) { 52 | console.error('Error fetching note:', err) 53 | if (err.code === 404) { 54 | setError('Note not found. It may have been deleted or you may not have permission to view it.') 55 | } else { 56 | setError('An error occurred while fetching the note. Please try again later.') 57 | } 58 | } finally { 59 | setLoading(false) 60 | } 61 | }, [noteId]) 62 | 63 | useEffect(() => { 64 | fetchNoteAndUser() 65 | }, [fetchNoteAndUser]) 66 | 67 | const handleDelete = async () => { 68 | try { 69 | await deleteDocument(NOTES_COLLECTION_ID, noteId) 70 | navigate('/notes', { state: { message: 'Note deleted successfully' } }) 71 | } catch (err) { 72 | setError('Failed to delete the note. Please try again.') 73 | console.error('Error deleting note:', err) 74 | } 75 | } 76 | 77 | const toggleZenMode = () => { 78 | setZenMode(!zenMode) 79 | } 80 | 81 | const handleAlignmentChange = (alignment) => { 82 | setTextAlignment(alignment) 83 | } 84 | 85 | const handleCopyLink = () => { 86 | const link = `${window.location.origin}/notes/${noteId}` 87 | navigator.clipboard.writeText(link) 88 | setLinkCopied(true) 89 | setTimeout(() => setLinkCopied(false), 2000) 90 | } 91 | 92 | if (loading) { 93 | return ( 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | ) 102 | } 103 | 104 | if (error) { 105 | return ( 106 | 107 | Error 108 | {error} 109 | 116 | 117 | ) 118 | } 119 | 120 | if (!note) { 121 | return ( 122 | 123 | Note not found 124 | The requested note could not be found. 125 | 132 | 133 | ) 134 | } 135 | 136 | return ( 137 | 144 | 145 | 146 | 152 |

{note.title}

153 |
154 | 155 | 156 | 157 | handleAlignmentChange('left')} aria-label="Align Left"> 158 | 159 | 160 | 161 | Align Left 162 | 163 | 164 | 165 | handleAlignmentChange('center')} aria-label="Align Center"> 166 | 167 | 168 | 169 | Align Center 170 | 171 | 172 | 173 | handleAlignmentChange('right')} aria-label="Align Right"> 174 | 175 | 176 | 177 | Align Right 178 | 179 | 180 | 181 | 182 | {zenMode ? : } 183 | 184 | 185 | 186 | {zenMode ? 'Exit Zen Mode' : 'Enter Zen Mode'} 187 | 188 | 189 | 190 |
191 |
192 | 198 | 199 | Last updated: {new Date(note.$updatedAt).toLocaleString()} 200 | 201 | 207 | 208 | 209 | 210 | 213 | 214 | Edit Note 215 | 216 | 217 | 218 | 221 | 222 | Text to Speech 223 | 224 | 225 | 226 | 229 | 230 | Copy Link to Clipboard 231 | 232 | 233 | 234 | 235 | 236 | 239 | 240 | 241 | 242 | Delete this note? 243 | This action cannot be undone. 244 | 245 | 246 | Cancel 247 | Delete 248 | 249 | 250 | 251 | 252 | Delete Note 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | Preview 261 | 262 | 263 | 264 | Source 265 | 266 | 267 | 268 | 275 | 276 |
284 | 285 | 286 |
290 |                     {note.content || ''}
291 |                   
292 |
293 | 294 | 295 | 296 | 297 | {showTextToSpeech && ( 298 | 305 | 306 | 307 | )} 308 | 309 | 310 | 311 | 318 | 319 | 320 | 321 | ) 322 | } -------------------------------------------------------------------------------- /src/Components/Notes/SharedNote.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from 'react'; 2 | import { useParams } from 'react-router-dom'; 3 | import { getDocument } from '../../Services/appwrite'; 4 | import { marked } from 'marked'; 5 | 6 | const SharedNote = () => { 7 | const { noteId } = useParams(); 8 | const [note, setNote] = useState(null); 9 | const [loading, setLoading] = useState(true); 10 | const [error, setError] = useState(null); 11 | 12 | useEffect(() => { 13 | fetchSharedNote(); 14 | }, [noteId]); 15 | 16 | const fetchSharedNote = async () => { 17 | setLoading(true); 18 | try { 19 | const fetchedNote = await getDocument('notes', noteId); 20 | setNote(fetchedNote); 21 | } catch (error) { 22 | console.error('Error fetching shared note', error); 23 | setError('Failed to fetch the shared note. It may not exist or you may not have permission to view it.'); 24 | } finally { 25 | setLoading(false); 26 | } 27 | }; 28 | 29 | if (loading) return
Loading shared note...
; 30 | if (error) return
{error}
; 31 | if (!note) return
Note not found.
; 32 | 33 | return ( 34 |
35 |

{note.title}

36 |
37 |
41 |
42 |

43 | Last updated: {new Date(note.updated_at).toLocaleString()} 44 |

45 |
46 | ); 47 | }; 48 | 49 | export default SharedNote; -------------------------------------------------------------------------------- /src/Components/Text-Speach/TextToSpeech.jsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from 'react'; 2 | import { Button } from '../ui/button'; 3 | import { Slider } from '../ui/slider'; 4 | import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../ui/select'; 5 | import { Play, Pause, Sun } from 'lucide-react'; 6 | 7 | const TextToSpeech = ({ text }) => { 8 | const [isPlaying, setIsPlaying] = useState(false); 9 | const [utterance, setUtterance] = useState(null); 10 | const [voice, setVoice] = useState(null); 11 | const [rate, setRate] = useState(1); 12 | const [voices, setVoices] = useState([]); 13 | 14 | useEffect(() => { 15 | const synth = window.speechSynthesis; 16 | const u = new SpeechSynthesisUtterance(text); 17 | setUtterance(u); 18 | 19 | const loadVoices = () => { 20 | const availableVoices = synth.getVoices(); 21 | setVoices(availableVoices); 22 | setVoice(availableVoices[0]); 23 | }; 24 | 25 | synth.onvoiceschanged = loadVoices; 26 | loadVoices(); 27 | 28 | return () => { 29 | synth.cancel(); 30 | }; 31 | }, [text]); 32 | 33 | const handleTogglePlay = () => { 34 | const synth = window.speechSynthesis; 35 | 36 | if (isPlaying) { 37 | synth.pause(); 38 | } else { 39 | if (synth.paused) { 40 | synth.resume(); 41 | } else { 42 | utterance.voice = voice; 43 | utterance.rate = rate; 44 | synth.speak(utterance); 45 | } 46 | } 47 | 48 | setIsPlaying(!isPlaying); 49 | }; 50 | 51 | const handleVoiceChange = (value) => { 52 | const selectedVoice = voices.find(v => v.name === value); 53 | setVoice(selectedVoice); 54 | }; 55 | 56 | return ( 57 |
58 |
59 | 65 | 66 | 78 |
79 |
80 | Speed 81 | setRate(value)} 87 | className="w-full" 88 | /> 89 | {rate.toFixed(1)}x 90 |
91 |
92 | ); 93 | }; 94 | 95 | export default TextToSpeech; -------------------------------------------------------------------------------- /src/Components/magicui/border-beam.jsx: -------------------------------------------------------------------------------- 1 | import { cn } from "../../lib/utils.ts"; 2 | 3 | export const BorderBeam = ({ 4 | className, 5 | size = 200, 6 | duration = 15, 7 | anchor = 90, 8 | borderWidth = 1.5, 9 | colorFrom = "#85e61e", // Neon cyan start color 10 | colorTo = "#3bccea", // Neon cyan end color 11 | delay = 0 12 | }) => { 13 | return ( 14 |
33 | ); 34 | }; -------------------------------------------------------------------------------- /src/Components/magicui/shimmer-button.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | import { cn } from "../../lib/utils.ts"; 4 | 5 | const ShimmerButton = React.forwardRef(( 6 | { 7 | shimmerColor = "#89f7fe", 8 | shimmerSize = "0.10em", 9 | shimmerDuration = "4s", 10 | borderRadius = "110px", 11 | background = "rgba(0, 0, 0, 1)", 12 | className, 13 | children, 14 | ...props 15 | }, 16 | ref, 17 | ) => { 18 | return ( 19 | () 70 | ); 71 | }); 72 | 73 | ShimmerButton.displayName = "ShimmerButton"; 74 | 75 | export default ShimmerButton; 76 | -------------------------------------------------------------------------------- /src/Components/ui/Abouttext.jsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import React from 'react'; 3 | import { TextGenerateEffect } from "../ui/text-generate-effect"; 4 | 5 | const words = ` 6 | Welcome to NoteX, the ultimate note-taking application designed to enhance your productivity and streamline your workflow. 7 | Whether you're looking to organize your thoughts, get AI-powered assistance, or access your notes from anywhere, NoteX has got you covered. 8 | With features like Gemini Pro insights, Speech-to-Text, and Smart Semantic Search, NoteX offers a seamless and innovative experience. 9 | Crafted with care by Soumyaranjan Panda, NoteX is here to revolutionize the way you take notes. 10 | 11 | `; 12 | 13 | export function TextGenerateEffectDemo() { 14 | return ( 15 |
16 | 17 |
18 | ); 19 | } 20 | 21 | export default TextGenerateEffectDemo; -------------------------------------------------------------------------------- /src/Components/ui/Features.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { MacbookScroll } from "../ui/macbook-scroll"; 3 | import { FaGithub, FaLinkedin } from "react-icons/fa"; 4 | import { FaSquareXTwitter } from "react-icons/fa6"; 5 | 6 | const SocialLink = ({ href, icon: Icon }) => ( 7 | 13 | 14 | 15 | ); 16 | 17 | const Badge = () => ( 18 |
19 | 20 | 21 | 22 |
23 | ); 24 | 25 | export function Feature() { 26 | return ( 27 |
28 | 31 | AI-Enhanced Note-Taking Revolution 32 | 33 | } 34 | badge={} 35 | src={[ 36 | { src: "/Featurevid.webm", type: "video/webm" }, 37 | { src: "/Featurevid.mkv", type: "video/mp4" }, 38 | { src: "/Featurevid.mp4", type: "video/mp4" } 39 | ]} 40 | showGradient={false} 41 | className="scale-[1.75] md:scale-150 lg:scale-[1.75]" 42 | isVideo={true} 43 | /> 44 |
45 | ); 46 | } 47 | 48 | export default Feature; -------------------------------------------------------------------------------- /src/Components/ui/Geminie.jsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { useScroll, useTransform } from "framer-motion"; 3 | import React from "react"; 4 | import { GoogleGeminiEffect } from "../ui/google-gemini-effect"; 5 | 6 | export function GoogleGeminiEffectDemo() { 7 | const ref = React.useRef(null); 8 | const { scrollYProgress } = useScroll({ 9 | target: ref, 10 | offset: ["start start", "end start"], 11 | }); 12 | 13 | const pathLengthFirst = useTransform(scrollYProgress, [0, 0.8], [0.2, 1.2]); 14 | const pathLengthSecond = useTransform(scrollYProgress, [0, 0.8], [0.15, 1.2]); 15 | const pathLengthThird = useTransform(scrollYProgress, [0, 0.8], [0.1, 1.2]); 16 | const pathLengthFourth = useTransform(scrollYProgress, [0, 0.8], [0.05, 1.2]); 17 | const pathLengthFifth = useTransform(scrollYProgress, [0, 0.8], [0, 1.2]); 18 | 19 | return ( 20 |
24 | 33 |
34 | ); 35 | } 36 | 37 | export default GoogleGeminiEffectDemo; -------------------------------------------------------------------------------- /src/Components/ui/ReviewCard.jsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import React from "react"; 4 | import { InfiniteMovingCards } from "./infinite-moving-cards"; 5 | 6 | export function InfiniteMovingCardsDemo() { 7 | return ( 8 |
9 | 10 |
11 | ); 12 | } 13 | 14 | const testimonials = [ 15 | { 16 | quote: 17 | "The secure cloud storage is a huge plus. I can access my notes from anywhere and never worry about losing them..", 18 | name: "Siri Nana", 19 | title: "Producthunt User", 20 | }, 21 | { 22 | quote: 23 | "This promising notes APP. I'll try it. Glad to see AI powered notes. Congrats on this launch @soumyaranjan2000", 24 | name: "Rupi", 25 | title: "Producthunt User", 26 | }, 27 | { 28 | quote: "As it's AI-powered, it gives you an advantage and makes it unique over the other apps. Keep it up bro..", 29 | name: "Sumit Sharma", 30 | title: "Producthunt User", 31 | }, 32 | { 33 | quote: 34 | "I’m excited to see if NoteX can handle my chaotic notes as well as it claims my idea pile needs a superhero!", 35 | name: "Shawn Idrees", 36 | title: "Producthunt User", 37 | }, 38 | { 39 | quote: 40 | "Love how the app combines simplicity with powerful AI features. The integration of Gemini Pro makes the note taking experience more efficient, and with TailwindCSS, the interface looks incredibly friendly. Everything about NoteX feels geared toward making productivity a breeze..", 41 | name: "Ayla Reynolds", 42 | title: "Producthunt User", 43 | }, 44 | ]; 45 | 46 | export default InfiniteMovingCardsDemo; -------------------------------------------------------------------------------- /src/Components/ui/alert-dialog.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import * as AlertDialogPrimitive from "@radix-ui/react-alert-dialog" 3 | 4 | import { cn } from "../../lib/utils" 5 | import { buttonVariants } from "./button" 6 | 7 | const AlertDialog = AlertDialogPrimitive.Root 8 | 9 | const AlertDialogTrigger = AlertDialogPrimitive.Trigger 10 | 11 | const AlertDialogPortal = AlertDialogPrimitive.Portal 12 | 13 | const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => ( 14 | 21 | )) 22 | AlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName 23 | 24 | const AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => ( 25 | 26 | 27 | 34 | 35 | )) 36 | AlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName 37 | 38 | const AlertDialogHeader = ({ 39 | className, 40 | ...props 41 | }) => ( 42 |
45 | ) 46 | AlertDialogHeader.displayName = "AlertDialogHeader" 47 | 48 | const AlertDialogFooter = ({ 49 | className, 50 | ...props 51 | }) => ( 52 |
55 | ) 56 | AlertDialogFooter.displayName = "AlertDialogFooter" 57 | 58 | const AlertDialogTitle = React.forwardRef(({ className, ...props }, ref) => ( 59 | 60 | )) 61 | AlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName 62 | 63 | const AlertDialogDescription = React.forwardRef(({ className, ...props }, ref) => ( 64 | 68 | )) 69 | AlertDialogDescription.displayName = 70 | AlertDialogPrimitive.Description.displayName 71 | 72 | const AlertDialogAction = React.forwardRef(({ className, ...props }, ref) => ( 73 | 74 | )) 75 | AlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName 76 | 77 | const AlertDialogCancel = React.forwardRef(({ className, ...props }, ref) => ( 78 | 82 | )) 83 | AlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName 84 | 85 | export { 86 | AlertDialog, 87 | AlertDialogPortal, 88 | AlertDialogOverlay, 89 | AlertDialogTrigger, 90 | AlertDialogContent, 91 | AlertDialogHeader, 92 | AlertDialogFooter, 93 | AlertDialogTitle, 94 | AlertDialogDescription, 95 | AlertDialogAction, 96 | AlertDialogCancel, 97 | } 98 | -------------------------------------------------------------------------------- /src/Components/ui/alert.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import { cva } from "class-variance-authority"; 3 | 4 | import { cn } from "../../lib/utils" 5 | 6 | const alertVariants = cva( 7 | "relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground", 8 | { 9 | variants: { 10 | variant: { 11 | default: "bg-background text-foreground", 12 | destructive: 13 | "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive", 14 | }, 15 | }, 16 | defaultVariants: { 17 | variant: "default", 18 | }, 19 | } 20 | ) 21 | 22 | const Alert = React.forwardRef(({ className, variant, ...props }, ref) => ( 23 |
28 | )) 29 | Alert.displayName = "Alert" 30 | 31 | const AlertTitle = React.forwardRef(({ className, ...props }, ref) => ( 32 |
36 | )) 37 | AlertTitle.displayName = "AlertTitle" 38 | 39 | const AlertDescription = React.forwardRef(({ className, ...props }, ref) => ( 40 |
44 | )) 45 | AlertDescription.displayName = "AlertDescription" 46 | 47 | export { Alert, AlertTitle, AlertDescription } 48 | -------------------------------------------------------------------------------- /src/Components/ui/aurora-background.jsx: -------------------------------------------------------------------------------- 1 | 'use client' 2 | 3 | import { cn } from "../../lib/utils" 4 | import React from "react" 5 | 6 | export default function AuroraBackground({ className, children, ...props }) { 7 | return ( 8 |
9 |
16 |
17 |
37 |
38 |
39 |
40 | {children} 41 |
42 |
43 |
44 | ) 45 | } -------------------------------------------------------------------------------- /src/Components/ui/avatar.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import * as AvatarPrimitive from "@radix-ui/react-avatar" 3 | 4 | import { cn } from "../../lib/utils" 5 | 6 | const Avatar = React.forwardRef(({ className, ...props }, ref) => ( 7 | 11 | )) 12 | Avatar.displayName = AvatarPrimitive.Root.displayName 13 | 14 | const AvatarImage = React.forwardRef(({ className, ...props }, ref) => ( 15 | 19 | )) 20 | AvatarImage.displayName = AvatarPrimitive.Image.displayName 21 | 22 | const AvatarFallback = React.forwardRef(({ className, ...props }, ref) => ( 23 | 30 | )) 31 | AvatarFallback.displayName = AvatarPrimitive.Fallback.displayName 32 | 33 | export { Avatar, AvatarImage, AvatarFallback } 34 | -------------------------------------------------------------------------------- /src/Components/ui/badge.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import { cva } from "class-variance-authority"; 3 | 4 | import { cn } from "../../lib/utils" 5 | 6 | const badgeVariants = cva( 7 | "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", 8 | { 9 | variants: { 10 | variant: { 11 | default: 12 | "border-transparent bg-primary text-primary-foreground hover:bg-primary/80", 13 | secondary: 14 | "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80", 15 | destructive: 16 | "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80", 17 | outline: "text-foreground", 18 | }, 19 | }, 20 | defaultVariants: { 21 | variant: "default", 22 | }, 23 | } 24 | ) 25 | 26 | function Badge({ 27 | className, 28 | variant, 29 | ...props 30 | }) { 31 | return (
); 32 | } 33 | 34 | export { Badge, badgeVariants } 35 | -------------------------------------------------------------------------------- /src/Components/ui/button.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import { Slot } from "@radix-ui/react-slot" 3 | import { cva } from "class-variance-authority"; 4 | 5 | import { cn } from "../../lib/utils" 6 | 7 | const buttonVariants = cva( 8 | "inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50", 9 | { 10 | variants: { 11 | variant: { 12 | default: "bg-primary text-primary-foreground hover:bg-primary/90", 13 | destructive: 14 | "bg-destructive text-destructive-foreground hover:bg-destructive/90", 15 | outline: 16 | "border border-input bg-background hover:bg-accent hover:text-accent-foreground", 17 | secondary: 18 | "bg-secondary text-secondary-foreground hover:bg-secondary/80", 19 | ghost: "hover:bg-accent hover:text-accent-foreground", 20 | link: "text-primary underline-offset-4 hover:underline", 21 | }, 22 | size: { 23 | default: "h-10 px-4 py-2", 24 | sm: "h-9 rounded-md px-3", 25 | lg: "h-11 rounded-md px-8", 26 | icon: "h-10 w-10", 27 | }, 28 | }, 29 | defaultVariants: { 30 | variant: "default", 31 | size: "default", 32 | }, 33 | } 34 | ) 35 | 36 | const Button = React.forwardRef(({ className, variant, size, asChild = false, ...props }, ref) => { 37 | const Comp = asChild ? Slot : "button" 38 | return ( 39 | () 43 | ); 44 | }) 45 | Button.displayName = "Button" 46 | 47 | export { Button, buttonVariants } 48 | -------------------------------------------------------------------------------- /src/Components/ui/card.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "../../lib/utils" 4 | 5 | const Card = React.forwardRef(({ className, ...props }, ref) => ( 6 |
10 | )) 11 | Card.displayName = "Card" 12 | 13 | const CardHeader = React.forwardRef(({ className, ...props }, ref) => ( 14 |
18 | )) 19 | CardHeader.displayName = "CardHeader" 20 | 21 | const CardTitle = React.forwardRef(({ className, ...props }, ref) => ( 22 |

26 | )) 27 | CardTitle.displayName = "CardTitle" 28 | 29 | const CardDescription = React.forwardRef(({ className, ...props }, ref) => ( 30 |

34 | )) 35 | CardDescription.displayName = "CardDescription" 36 | 37 | const CardContent = React.forwardRef(({ className, ...props }, ref) => ( 38 |

39 | )) 40 | CardContent.displayName = "CardContent" 41 | 42 | const CardFooter = React.forwardRef(({ className, ...props }, ref) => ( 43 |
47 | )) 48 | CardFooter.displayName = "CardFooter" 49 | 50 | export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } 51 | -------------------------------------------------------------------------------- /src/Components/ui/cover.jsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import React, { useEffect, useId, useState } from "react"; 3 | import { AnimatePresence, motion } from "framer-motion"; 4 | import { useRef } from "react"; 5 | import { cn } from "../../lib/utils" 6 | import { SparklesCore } from "./sparkles"; 7 | 8 | export const Cover = ({ 9 | children, 10 | className 11 | }) => { 12 | const [hovered, setHovered] = useState(false); 13 | 14 | const ref = useRef(null); 15 | 16 | const [containerWidth, setContainerWidth] = useState(0); 17 | const [beamPositions, setBeamPositions] = useState([]); 18 | 19 | useEffect(() => { 20 | if (ref.current) { 21 | setContainerWidth(ref.current?.clientWidth ?? 0); 22 | 23 | const height = ref.current?.clientHeight ?? 0; 24 | const numberOfBeams = Math.floor(height / 10); // Adjust the divisor to control the spacing 25 | const positions = Array.from( 26 | { length: numberOfBeams }, 27 | (_, i) => (i + 1) * (height / (numberOfBeams + 1)) 28 | ); 29 | setBeamPositions(positions); 30 | } 31 | }, [ref.current]); 32 | 33 | return ( 34 | (
setHovered(true)} 36 | onMouseLeave={() => setHovered(false)} 37 | ref={ref} 38 | className="relative hover:bg-neutral-900 group/cover inline-block dark:bg-neutral-900 bg-neutral-100 px-2 py-2 transition duration-200 rounded-sm"> 39 | 40 | {hovered && ( 41 | 51 | 63 | 70 | 77 | 78 | 79 | )} 80 | 81 | {beamPositions.map((position, index) => ( 82 | 91 | ))} 92 | 128 | {children} 129 | 130 | 131 | 132 | 133 | 134 |
) 135 | ); 136 | }; 137 | 138 | export const Beam = ({ 139 | className, 140 | delay, 141 | duration, 142 | hovered, 143 | width = 600, 144 | ...svgProps 145 | }) => { 146 | const id = useId(); 147 | 148 | return ( 149 | ( 157 | 158 | 159 | 182 | 183 | 184 | 185 | 186 | 187 | ) 188 | ); 189 | }; 190 | 191 | export const CircleIcon = ({ 192 | className, 193 | delay 194 | }) => { 195 | return ( 196 | (
) 201 | ); 202 | }; 203 | -------------------------------------------------------------------------------- /src/Components/ui/dialog.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import * as DialogPrimitive from "@radix-ui/react-dialog" 3 | import { X } from "lucide-react" 4 | 5 | import { cn } from "../../lib/utils" 6 | 7 | const Dialog = DialogPrimitive.Root 8 | 9 | const DialogTrigger = DialogPrimitive.Trigger 10 | 11 | const DialogPortal = DialogPrimitive.Portal 12 | 13 | const DialogClose = DialogPrimitive.Close 14 | 15 | const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => ( 16 | 23 | )) 24 | DialogOverlay.displayName = DialogPrimitive.Overlay.displayName 25 | 26 | const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => ( 27 | 28 | 29 | 36 | {children} 37 | 39 | 40 | Close 41 | 42 | 43 | 44 | )) 45 | DialogContent.displayName = DialogPrimitive.Content.displayName 46 | 47 | const DialogHeader = ({ 48 | className, 49 | ...props 50 | }) => ( 51 |
54 | ) 55 | DialogHeader.displayName = "DialogHeader" 56 | 57 | const DialogFooter = ({ 58 | className, 59 | ...props 60 | }) => ( 61 |
64 | ) 65 | DialogFooter.displayName = "DialogFooter" 66 | 67 | const DialogTitle = React.forwardRef(({ className, ...props }, ref) => ( 68 | 72 | )) 73 | DialogTitle.displayName = DialogPrimitive.Title.displayName 74 | 75 | const DialogDescription = React.forwardRef(({ className, ...props }, ref) => ( 76 | 80 | )) 81 | DialogDescription.displayName = DialogPrimitive.Description.displayName 82 | 83 | export { 84 | Dialog, 85 | DialogPortal, 86 | DialogOverlay, 87 | DialogClose, 88 | DialogTrigger, 89 | DialogContent, 90 | DialogHeader, 91 | DialogFooter, 92 | DialogTitle, 93 | DialogDescription, 94 | } 95 | -------------------------------------------------------------------------------- /src/Components/ui/dropdown-menu.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu" 3 | import { Check, ChevronRight, Circle } from "lucide-react" 4 | import { cn } from "../../lib/utils" 5 | 6 | 7 | const DropdownMenu = DropdownMenuPrimitive.Root 8 | 9 | const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger 10 | 11 | const DropdownMenuGroup = DropdownMenuPrimitive.Group 12 | 13 | const DropdownMenuPortal = DropdownMenuPrimitive.Portal 14 | 15 | const DropdownMenuSub = DropdownMenuPrimitive.Sub 16 | 17 | const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup 18 | 19 | const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, children, ...props }, ref) => ( 20 | 28 | {children} 29 | 30 | 31 | )) 32 | DropdownMenuSubTrigger.displayName = 33 | DropdownMenuPrimitive.SubTrigger.displayName 34 | 35 | const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => ( 36 | 43 | )) 44 | DropdownMenuSubContent.displayName = 45 | DropdownMenuPrimitive.SubContent.displayName 46 | 47 | const DropdownMenuContent = React.forwardRef(({ className, sideOffset = 4, ...props }, ref) => ( 48 | 49 | 57 | 58 | )) 59 | DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName 60 | 61 | const DropdownMenuItem = React.forwardRef(({ className, inset, ...props }, ref) => ( 62 | 70 | )) 71 | DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName 72 | 73 | const DropdownMenuCheckboxItem = React.forwardRef(({ className, children, checked, ...props }, ref) => ( 74 | 82 | 83 | 84 | 85 | 86 | 87 | {children} 88 | 89 | )) 90 | DropdownMenuCheckboxItem.displayName = 91 | DropdownMenuPrimitive.CheckboxItem.displayName 92 | 93 | const DropdownMenuRadioItem = React.forwardRef(({ className, children, ...props }, ref) => ( 94 | 101 | 102 | 103 | 104 | 105 | 106 | {children} 107 | 108 | )) 109 | DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName 110 | 111 | const DropdownMenuLabel = React.forwardRef(({ className, inset, ...props }, ref) => ( 112 | 116 | )) 117 | DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName 118 | 119 | const DropdownMenuSeparator = React.forwardRef(({ className, ...props }, ref) => ( 120 | 124 | )) 125 | DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName 126 | 127 | const DropdownMenuShortcut = ({ 128 | className, 129 | ...props 130 | }) => { 131 | return ( 132 | () 135 | ); 136 | } 137 | DropdownMenuShortcut.displayName = "DropdownMenuShortcut" 138 | 139 | export { 140 | DropdownMenu, 141 | DropdownMenuTrigger, 142 | DropdownMenuContent, 143 | DropdownMenuItem, 144 | DropdownMenuCheckboxItem, 145 | DropdownMenuRadioItem, 146 | DropdownMenuLabel, 147 | DropdownMenuSeparator, 148 | DropdownMenuShortcut, 149 | DropdownMenuGroup, 150 | DropdownMenuPortal, 151 | DropdownMenuSub, 152 | DropdownMenuSubContent, 153 | DropdownMenuSubTrigger, 154 | DropdownMenuRadioGroup, 155 | } 156 | -------------------------------------------------------------------------------- /src/Components/ui/flip-words.jsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import React, { useCallback, useEffect, useState } from "react"; 3 | import { AnimatePresence, motion } from "framer-motion"; 4 | import { cn } from "../../lib/utils"; 5 | 6 | export const FlipWords = ({ words, duration = 3000, className }) => { 7 | const [currentWord, setCurrentWord] = useState(words[0]); 8 | const [isAnimating, setIsAnimating] = useState(false); 9 | 10 | const startAnimation = useCallback(() => { 11 | const word = words[words.indexOf(currentWord) + 1] || words[0]; 12 | setCurrentWord(word); 13 | setIsAnimating(true); 14 | }, [currentWord, words]); 15 | 16 | useEffect(() => { 17 | if (!isAnimating) 18 | setTimeout(() => { 19 | startAnimation(); 20 | }, duration); 21 | }, [isAnimating, duration, startAnimation]); 22 | 23 | return ( 24 | { 26 | setIsAnimating(false); 27 | }} 28 | > 29 | 57 | {currentWord.split(" ").map((word, wordIndex) => ( 58 | 68 | {word.split("").map((letter, letterIndex) => ( 69 | 79 | {letter} 80 | 81 | ))} 82 |   83 | 84 | ))} 85 | 86 | 87 | ); 88 | }; -------------------------------------------------------------------------------- /src/Components/ui/google-gemini-effect.jsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { cn } from "../../lib/utils"; 3 | import { motion } from "framer-motion"; 4 | import React from "react"; 5 | 6 | const transition = { 7 | duration: 0, 8 | ease: "linear", 9 | }; 10 | 11 | export const GoogleGeminiEffect = ({ 12 | pathLengths, 13 | title, 14 | description, 15 | className 16 | }) => { 17 | return ( 18 | (
19 |

21 | {title || `Powered by Google Gemini Pro`} 22 |

23 |

25 | {description || 26 | `Experience the power of AI-powered note-taking with noteX`} 27 |

28 |
30 | 34 |
35 | 41 | 53 | 65 | 77 | 89 | 101 | 102 | {/* Gaussian blur for the background paths */} 103 | 104 | 111 | 118 | 125 | 132 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 |
) 147 | ); 148 | }; -------------------------------------------------------------------------------- /src/Components/ui/infinite-moving-cards.jsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | 3 | import { cn } from "../../lib/utils"; 4 | import React, { useEffect, useState } from "react"; 5 | 6 | export const InfiniteMovingCards = ({ 7 | items, 8 | direction = "left", 9 | speed = "fast", 10 | pauseOnHover = true, 11 | className 12 | }) => { 13 | const containerRef = React.useRef(null); 14 | const scrollerRef = React.useRef(null); 15 | 16 | useEffect(() => { 17 | addAnimation(); 18 | }, []); 19 | 20 | const [start, setStart] = useState(false); 21 | 22 | function addAnimation() { 23 | if (containerRef.current && scrollerRef.current) { 24 | const scrollerContent = Array.from(scrollerRef.current.children); 25 | 26 | scrollerContent.forEach((item) => { 27 | const duplicatedItem = item.cloneNode(true); 28 | if (scrollerRef.current) { 29 | scrollerRef.current.appendChild(duplicatedItem); 30 | } 31 | }); 32 | 33 | getDirection(); 34 | getSpeed(); 35 | setStart(true); 36 | } 37 | } 38 | 39 | const getDirection = () => { 40 | if (containerRef.current) { 41 | if (direction === "left") { 42 | containerRef.current.style.setProperty("--animation-direction", "forwards"); 43 | } else { 44 | containerRef.current.style.setProperty("--animation-direction", "reverse"); 45 | } 46 | } 47 | }; 48 | 49 | const getSpeed = () => { 50 | if (containerRef.current) { 51 | if (speed === "fast") { 52 | containerRef.current.style.setProperty("--animation-duration", "20s"); 53 | } else if (speed === "normal") { 54 | containerRef.current.style.setProperty("--animation-duration", "40s"); 55 | } else { 56 | containerRef.current.style.setProperty("--animation-duration", "80s"); 57 | } 58 | } 59 | }; 60 | 61 | return ( 62 |
69 |
    77 | {items.map((item, idx) => ( 78 |
  • 86 |
    87 | 91 | 92 | {item.quote} 93 | 94 |
    95 | 96 | 97 | {item.name} 98 | 99 | 100 | {item.title} 101 | 102 | 103 |
    104 |
    105 |
  • 106 | ))} 107 |
108 |
109 | ); 110 | }; -------------------------------------------------------------------------------- /src/Components/ui/input.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "../../lib/utils" 4 | 5 | const Input = React.forwardRef(({ className, type, ...props }, ref) => { 6 | return ( 7 | () 15 | ); 16 | }) 17 | Input.displayName = "Input" 18 | 19 | export { Input } 20 | -------------------------------------------------------------------------------- /src/Components/ui/label.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import * as LabelPrimitive from "@radix-ui/react-label" 3 | import { cva } from "class-variance-authority"; 4 | 5 | import { cn } from "../../lib/utils" 6 | 7 | const labelVariants = cva( 8 | "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" 9 | ) 10 | 11 | const Label = React.forwardRef(({ className, ...props }, ref) => ( 12 | 13 | )) 14 | Label.displayName = LabelPrimitive.Root.displayName 15 | 16 | export { Label } 17 | -------------------------------------------------------------------------------- /src/Components/ui/mode-toggle.jsx: -------------------------------------------------------------------------------- 1 | import React from "react" 2 | import { Moon, Sun } from "lucide-react" 3 | import { useTheme } from "next-themes" 4 | 5 | import { Button } from "./button" 6 | import { 7 | DropdownMenu, 8 | DropdownMenuContent, 9 | DropdownMenuItem, 10 | DropdownMenuTrigger, 11 | } from "./dropdown-menu" 12 | 13 | export function ModeToggle() { 14 | const { theme, setTheme } = useTheme() 15 | 16 | return ( 17 | 18 | 19 | 24 | 25 | 26 | setTheme("light")}> 27 | Light 28 | 29 | setTheme("dark")}> 30 | Dark 31 | 32 | setTheme("system")}> 33 | System 34 | 35 | 36 | 37 | ) 38 | } -------------------------------------------------------------------------------- /src/Components/ui/popover.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import * as PopoverPrimitive from "@radix-ui/react-popover" 3 | 4 | import { cn } from "../../lib/utils"; 5 | 6 | const Popover = PopoverPrimitive.Root 7 | 8 | const PopoverTrigger = PopoverPrimitive.Trigger 9 | 10 | const PopoverContent = React.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => ( 11 | 12 | 21 | 22 | )) 23 | PopoverContent.displayName = PopoverPrimitive.Content.displayName 24 | 25 | export { Popover, PopoverTrigger, PopoverContent } 26 | -------------------------------------------------------------------------------- /src/Components/ui/progress.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import * as ProgressPrimitive from "@radix-ui/react-progress" 3 | 4 | import { cn } from "../../lib/utils" 5 | 6 | const Progress = React.forwardRef(({ className, value, ...props }, ref) => ( 7 | 11 | 14 | 15 | )) 16 | Progress.displayName = ProgressPrimitive.Root.displayName 17 | 18 | export { Progress } 19 | -------------------------------------------------------------------------------- /src/Components/ui/scroll-area.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area" 3 | 4 | import { cn } from "../../lib/utils" 5 | 6 | const ScrollArea = React.forwardRef(({ className, children, ...props }, ref) => ( 7 | 11 | 12 | {children} 13 | 14 | 15 | 16 | 17 | )) 18 | ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName 19 | 20 | const ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...props }, ref) => ( 21 | 33 | 34 | 35 | )) 36 | ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName 37 | 38 | export { ScrollArea, ScrollBar } 39 | -------------------------------------------------------------------------------- /src/Components/ui/select.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import * as SelectPrimitive from "@radix-ui/react-select" 3 | import { Check, ChevronDown, ChevronUp } from "lucide-react" 4 | 5 | import { cn } from "../../lib/utils" 6 | 7 | const Select = SelectPrimitive.Root 8 | 9 | const SelectGroup = SelectPrimitive.Group 10 | 11 | const SelectValue = SelectPrimitive.Value 12 | 13 | const SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => ( 14 | span]:line-clamp-1", 18 | className 19 | )} 20 | {...props}> 21 | {children} 22 | 23 | 24 | 25 | 26 | )) 27 | SelectTrigger.displayName = SelectPrimitive.Trigger.displayName 28 | 29 | const SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => ( 30 | 34 | 35 | 36 | )) 37 | SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName 38 | 39 | const SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => ( 40 | 44 | 45 | 46 | )) 47 | SelectScrollDownButton.displayName = 48 | SelectPrimitive.ScrollDownButton.displayName 49 | 50 | const SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => ( 51 | 52 | 62 | 63 | 66 | {children} 67 | 68 | 69 | 70 | 71 | )) 72 | SelectContent.displayName = SelectPrimitive.Content.displayName 73 | 74 | const SelectLabel = React.forwardRef(({ className, ...props }, ref) => ( 75 | 79 | )) 80 | SelectLabel.displayName = SelectPrimitive.Label.displayName 81 | 82 | const SelectItem = React.forwardRef(({ className, children, ...props }, ref) => ( 83 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | {children} 97 | 98 | )) 99 | SelectItem.displayName = SelectPrimitive.Item.displayName 100 | 101 | const SelectSeparator = React.forwardRef(({ className, ...props }, ref) => ( 102 | 106 | )) 107 | SelectSeparator.displayName = SelectPrimitive.Separator.displayName 108 | 109 | export { 110 | Select, 111 | SelectGroup, 112 | SelectValue, 113 | SelectTrigger, 114 | SelectContent, 115 | SelectLabel, 116 | SelectItem, 117 | SelectSeparator, 118 | SelectScrollUpButton, 119 | SelectScrollDownButton, 120 | } 121 | -------------------------------------------------------------------------------- /src/Components/ui/separator.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import * as SeparatorPrimitive from "@radix-ui/react-separator" 3 | 4 | import { cn } from "../../lib/utils" 5 | 6 | const Separator = React.forwardRef(( 7 | { className, orientation = "horizontal", decorative = true, ...props }, 8 | ref 9 | ) => ( 10 | 20 | )) 21 | Separator.displayName = SeparatorPrimitive.Root.displayName 22 | 23 | export { Separator } 24 | -------------------------------------------------------------------------------- /src/Components/ui/skeleton.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { cn } from "../../lib/utils"; 3 | 4 | function Skeleton({ className, ...props }) { 5 | return ( 6 |
7 | ); 8 | } 9 | 10 | export { Skeleton }; -------------------------------------------------------------------------------- /src/Components/ui/slider.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import * as SliderPrimitive from "@radix-ui/react-slider" 3 | 4 | import { cn } from "../../lib/utils"; 5 | 6 | const Slider = React.forwardRef(({ className, ...props }, ref) => ( 7 | 11 | 13 | 14 | 15 | 17 | 18 | )) 19 | Slider.displayName = SliderPrimitive.Root.displayName 20 | 21 | export { Slider } 22 | -------------------------------------------------------------------------------- /src/Components/ui/sparkles.jsx: -------------------------------------------------------------------------------- 1 | "use client";; 2 | import React, { useId } from "react"; 3 | import { useEffect, useState } from "react"; 4 | import Particles, { initParticlesEngine } from "@tsparticles/react"; 5 | import { loadSlim } from "@tsparticles/slim"; 6 | import { cn } from "../../lib/utils" 7 | import { motion, useAnimation } from "framer-motion"; 8 | 9 | export const SparklesCore = (props) => { 10 | const { 11 | id, 12 | className, 13 | background, 14 | minSize, 15 | maxSize, 16 | speed, 17 | particleColor, 18 | particleDensity, 19 | } = props; 20 | const [init, setInit] = useState(false); 21 | useEffect(() => { 22 | initParticlesEngine(async (engine) => { 23 | await loadSlim(engine); 24 | }).then(() => { 25 | setInit(true); 26 | }); 27 | }, []); 28 | const controls = useAnimation(); 29 | 30 | const particlesLoaded = async (container) => { 31 | if (container) { 32 | console.log(container); 33 | controls.start({ 34 | opacity: 1, 35 | transition: { 36 | duration: 1, 37 | }, 38 | }); 39 | } 40 | }; 41 | 42 | const generatedId = useId(); 43 | return ( 44 | ( 45 | {init && ( 46 | 419 | )} 420 | ) 421 | ); 422 | }; 423 | -------------------------------------------------------------------------------- /src/Components/ui/spotlight.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import { cn } from "../../lib/utils"; 3 | 4 | export const Spotlight = ({ 5 | className, 6 | fill 7 | }) => { 8 | return ( 9 | ( 17 | 18 | 26 | 27 | 28 | 36 | 37 | 38 | 39 | 40 | 41 | ) 42 | ); 43 | }; 44 | -------------------------------------------------------------------------------- /src/Components/ui/switch.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import * as SwitchPrimitives from "@radix-ui/react-switch" 3 | 4 | import { cn } from "../../lib/utils" 5 | 6 | const Switch = React.forwardRef(({ className, ...props }, ref) => ( 7 | 14 | 18 | 19 | )) 20 | Switch.displayName = SwitchPrimitives.Root.displayName 21 | 22 | export { Switch } 23 | -------------------------------------------------------------------------------- /src/Components/ui/tabs.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import * as TabsPrimitive from "@radix-ui/react-tabs" 3 | 4 | import { cn } from "../../lib/utils" 5 | 6 | const Tabs = TabsPrimitive.Root 7 | 8 | const TabsList = React.forwardRef(({ className, ...props }, ref) => ( 9 | 16 | )) 17 | TabsList.displayName = TabsPrimitive.List.displayName 18 | 19 | const TabsTrigger = React.forwardRef(({ className, ...props }, ref) => ( 20 | 27 | )) 28 | TabsTrigger.displayName = TabsPrimitive.Trigger.displayName 29 | 30 | const TabsContent = React.forwardRef(({ className, ...props }, ref) => ( 31 | 38 | )) 39 | TabsContent.displayName = TabsPrimitive.Content.displayName 40 | 41 | export { Tabs, TabsList, TabsTrigger, TabsContent } 42 | -------------------------------------------------------------------------------- /src/Components/ui/text-generate-effect.jsx: -------------------------------------------------------------------------------- 1 | "use client"; 2 | import { useEffect } from "react"; 3 | import { motion, stagger, useAnimate } from "framer-motion"; 4 | 5 | import { cn } from "../../lib/utils"; 6 | 7 | export const TextGenerateEffect = ({ 8 | words, 9 | className, 10 | filter = true, 11 | duration = 0.5 12 | }) => { 13 | const [scope, animate] = useAnimate(); 14 | let wordsArray = words.split(" "); 15 | 16 | useEffect(() => { 17 | animate( 18 | "span", 19 | { 20 | opacity: 1, 21 | filter: filter ? "blur(0px)" : "none", 22 | scale: [0.8, 1], 23 | }, 24 | { 25 | duration: duration ? duration : 1, 26 | delay: stagger(0.2), 27 | ease: "easeOut", 28 | } 29 | ); 30 | }, [scope.current]); 31 | 32 | const renderWords = () => { 33 | return ( 34 | 35 | {wordsArray.map((word, idx) => { 36 | return ( 37 | 44 | {word}{" "} 45 | 46 | ); 47 | })} 48 | 49 | ); 50 | }; 51 | 52 | return ( 53 |
54 |
55 |
56 | {renderWords()} 57 |
58 |
59 |
60 | ); 61 | }; -------------------------------------------------------------------------------- /src/Components/ui/textarea.jsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "../../lib/utils" 4 | 5 | const Textarea = React.forwardRef(({ className, ...props }, ref) => { 6 | return ( 7 | (