{"id":23272341,"url":"https://github.com/letsdeepchat/pyjamahr-assignment","last_synced_at":"2025-04-06T09:52:37.980Z","repository":{"id":251592204,"uuid":"836581720","full_name":"letsdeepchat/PyjamaHR-Assignment","owner":"letsdeepchat","description":"React component for creating and editing notes with features like image upload, background color customization, and Redux integration.","archived":false,"fork":false,"pushed_at":"2024-08-04T18:29:25.000Z","size":83,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T15:40:56.372Z","etag":null,"topics":["deepak-chaudhari","deepak14ri","google-keep-clone","notes-app","pyjamahr-assignment","react-redux"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/letsdeepchat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-01T06:40:50.000Z","updated_at":"2024-08-04T18:29:28.000Z","dependencies_parsed_at":"2024-08-04T10:24:13.219Z","dependency_job_id":"7a78e2dc-19b1-4449-b3d2-0928a726427b","html_url":"https://github.com/letsdeepchat/PyjamaHR-Assignment","commit_stats":null,"previous_names":["deepak14ri/pyjamahr-assignment","letsdeepchat/pyjamahr-assignment"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsdeepchat%2FPyjamaHR-Assignment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsdeepchat%2FPyjamaHR-Assignment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsdeepchat%2FPyjamaHR-Assignment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/letsdeepchat%2FPyjamaHR-Assignment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/letsdeepchat","download_url":"https://codeload.github.com/letsdeepchat/PyjamaHR-Assignment/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247463933,"owners_count":20942950,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deepak-chaudhari","deepak14ri","google-keep-clone","notes-app","pyjamahr-assignment","react-redux"],"created_at":"2024-12-19T19:14:48.950Z","updated_at":"2025-04-06T09:52:37.962Z","avatar_url":"https://github.com/letsdeepchat.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"**PyjamaHR Assignment**\n\n## Getting Started\n\nThis document guides you through setting up and running the project.\n\n### Prerequisites\n\nEnsure you have the following installed:\n\n- **Node.js** (LTS version recommended): [https://nodejs.org/en](https://nodejs.org/en)\n- **npm** (bundled with Node.js) or **yarn**: [https://www.npmjs.com/](https://www.npmjs.com/), [https://classic.yarnpkg.com/lang/en/docs/install/](https://classic.yarnpkg.com/lang/en/docs/install/)\n\n### Installation\n\n1. **Clone the repository:**\n\n   ```bash\n   git clone https://github.com/deepak14ri/PyjamaHR-Assignment.git\n   cd PyjamaHR-Assignment\n   ```\n\n2. **Install dependencies:**\n\n   ```bash\n   npm install\n   # or\n   yarn install\n   ```\n\n3. **Start development server:**\n\n   ```bash\n   npm run dev\n   # or\n   yarn dev\n   ```\n\n   This initiates the Vite development server and opens your application in the default web browser.\n## Previews\n# 1\n\u003cimg width=\"931\" alt=\"image\" src=\"https://github.com/user-attachments/assets/e46322dc-a7e1-432c-8e68-da3e6aaa319e\"\u003e\n\n# 2\n\u003cimg width=\"943\" alt=\"image\" src=\"https://github.com/user-attachments/assets/158a8f5e-f032-4528-87aa-6b74dbd79ba1\"\u003e\n\n## About the CreateArea Component\n\nThe `CreateArea` component in this project offers a user interface for creating and managing notes. It includes functionalities like image uploads and background color customization.\n\n### Features and Functionalities\n\n**Note Interface:**\n\n- Defines the structure of a note with properties like:\n    - `title`: The note's title.\n    - `content`: The note's content.\n    - `pinned`: Boolean indicating if the note is pinned.\n    - `image`: URL or base64 encoded string of the image.\n    - `backgroundColor`: The background color of the note.\n\n**State Management:**\n\n- Utilizes `useState` to manage the component's local state:\n    - `note`: Object representing the current note being edited or created.\n    - `isExpanded`: Boolean indicating whether the note input area is expanded.\n    - `isEditModalOpen`: Boolean indicating whether the edit modal is open.\n    - `currentNoteIndex`: Index of the note currently being edited.\n\n**Redux Integration:**\n\n- Employs `useDispatch` to dispatch actions to the Redux store.\n- Utilizes `useSelector` to select notes from the store.\n\n**Handle Change:**\n\n- Updates the note state when the title or content input fields are modified.\n\n**Handle Expanded:**\n\n- Expands the note input area upon clicking the textarea.\n\n**Submit Button:**\n\n- Manages the submission of a note:\n    - Dispatches an `addNote` action to add the new note to the Redux store.\n    - Resets the note state and collapses the input area after submission.\n\n**Handle Image Change:**\n\n- Processes the uploaded image file:\n    - Reads the file using a FileReader and updates the note state with the image data.\n\n**Handle Background Color Change:**\n\n- Updates the note state with the chosen background color.\n\n**Handle Edit Save:**\n\n- Saves the edited note:\n    - Updates the note state with the new values while preserving the pinned state.\n    - Dispatches an `updateNote` action to update the note in the Redux store.\n    - Resets the `currentNoteIndex` and closes the edit modal after saving.\n\n**Form and Input Elements:**\n\n- Renders the form with input fields for title and content:\n    - Displays the image if it exists.\n    - Provides file input for image upload and color input for background color selection.\n\n**CSS Classes:**\n\n- Applies CSS classes for styling the form and input elements:\n    - Ensures that the image width is limited to 200px with auto height for maintaining aspect ratio.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletsdeepchat%2Fpyjamahr-assignment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fletsdeepchat%2Fpyjamahr-assignment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fletsdeepchat%2Fpyjamahr-assignment/lists"}