hazo_notify 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cursor/rules/db_schema.mdc +0 -0
- package/.cursor/rules/design.mdc +16 -0
- package/.cursor/rules/general.mdc +49 -0
- package/README.md +765 -0
- package/components/emailer-html-editor.tsx +94 -0
- package/components/ui/button.tsx +53 -0
- package/components/ui/card.tsx +78 -0
- package/components/ui/input.tsx +24 -0
- package/components/ui/label.tsx +21 -0
- package/components/ui/sidebar.tsx +121 -0
- package/components/ui/spinner.tsx +54 -0
- package/components/ui/textarea.tsx +23 -0
- package/components/ui/tooltip.tsx +30 -0
- package/components.json +20 -0
- package/hazo_notify_config.ini +153 -0
- package/jest.config.js +27 -0
- package/jest.setup.js +1 -0
- package/next.config.js +22 -0
- package/package.json +72 -0
- package/postcss.config.js +6 -0
- package/src/app/api/hazo_notify/emailer/send/__tests__/route.test.ts +227 -0
- package/src/app/api/hazo_notify/emailer/send/route.ts +537 -0
- package/src/app/editor-00/page.tsx +47 -0
- package/src/app/globals.css +69 -0
- package/src/app/hazo_notify/emailer_test/layout.tsx +53 -0
- package/src/app/hazo_notify/emailer_test/page.tsx +369 -0
- package/src/app/hazo_notify/layout.tsx +77 -0
- package/src/app/hazo_notify/page.tsx +12 -0
- package/src/app/layout.tsx +26 -0
- package/src/app/page.tsx +14 -0
- package/src/components/blocks/editor-00/editor.tsx +61 -0
- package/src/components/blocks/editor-00/nodes.ts +11 -0
- package/src/components/blocks/editor-00/plugins.tsx +36 -0
- package/src/components/editor/editor-ui/content-editable.tsx +34 -0
- package/src/components/editor/themes/editor-theme.css +91 -0
- package/src/components/editor/themes/editor-theme.ts +130 -0
- package/src/components/ui/button.tsx +53 -0
- package/src/components/ui/card.tsx +78 -0
- package/src/components/ui/input.tsx +24 -0
- package/src/components/ui/label.tsx +21 -0
- package/src/components/ui/sidebar.tsx +121 -0
- package/src/components/ui/spinner.tsx +54 -0
- package/src/components/ui/textarea.tsx +23 -0
- package/src/components/ui/tooltip.tsx +30 -0
- package/src/lib/emailer/__tests__/emailer.test.ts +200 -0
- package/src/lib/emailer/emailer.ts +263 -0
- package/src/lib/emailer/index.ts +11 -0
- package/src/lib/emailer/providers/__tests__/zeptomail_provider.test.ts +196 -0
- package/src/lib/emailer/providers/index.ts +33 -0
- package/src/lib/emailer/providers/pop3_provider.ts +30 -0
- package/src/lib/emailer/providers/smtp_provider.ts +30 -0
- package/src/lib/emailer/providers/zeptomail_provider.ts +299 -0
- package/src/lib/emailer/types.ts +119 -0
- package/src/lib/emailer/utils/constants.ts +24 -0
- package/src/lib/emailer/utils/index.ts +9 -0
- package/src/lib/emailer/utils/logger.ts +71 -0
- package/src/lib/emailer/utils/validation.ts +84 -0
- package/src/lib/index.ts +6 -0
- package/src/lib/utils.ts +6 -0
- package/tailwind.config.ts +65 -0
- package/tsconfig.json +27 -0
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
alwaysApply: true
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
[Behaviour]
|
|
6
|
+
- for any alerts, error, information messages where the user should acknowledge, don't use the standard javascript alert. Instead use the shadcn alert dialog component with just the ok button. For messages where the user does not need to acknowledge, use a shadcn sonnen instead.
|
|
7
|
+
- for any notifications or updates where the user should be notified but not necessarily need to acknowledge, use the shadcn sonner component
|
|
8
|
+
|
|
9
|
+
[Edit_Field_Behaviour]
|
|
10
|
+
- For a given single field that is to be editable, have a lucide icon pencil next to the field , then when in editing mode, show a green lucide circle-check for the save/submit button, and a red lucide circle-x for the cancel button.
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
[Style]
|
|
14
|
+
- include seo friendly alt text for all images and components and buttons
|
|
15
|
+
- when any pages are loading, then show a shadcn spinner
|
|
16
|
+
- in dialog boxes, action buttons, etc, always have the positive action on the left and negative action on the right. For example, the "save" button should be on the left and "cancel" button on the right.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: General rules always to be used
|
|
3
|
+
globs: *
|
|
4
|
+
alwaysApply: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
[General]
|
|
8
|
+
- Start all chats wtih 🐸
|
|
9
|
+
- Only implement if you're 90% sure of requirement or the fix. Otherwise ask questions or things for me to check.
|
|
10
|
+
- Continuously update the detailed technical design of the application in a file called techdoc.md in the root directory. In this file include a section for Overall (general technical details including file architecture, key files), a section for each major component, API routes and their use, example code, constraints. This is an internal document to help with maintainability.
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
[Style]
|
|
14
|
+
- Always use snake_case
|
|
15
|
+
- Include a description of purpose of file at top of each new file
|
|
16
|
+
- Include comments at the top of each function or major section of code
|
|
17
|
+
- Add comments for each file and also major section
|
|
18
|
+
- Add a class name identifier for div tags prefixed with "cls_" so that they can be easily identified and searched. Reused divs should have the same name.
|
|
19
|
+
|
|
20
|
+
[UI_Behaviour]
|
|
21
|
+
- All data input fields (not interaction fields), it should be non-editable but there is a lucide pencil icon next to it. When pressed, it'll allow to edit the inptu field, and a lucide circle-check-big will be used for the "Submit"/"save"/"update" button, and a lucide circle-x will be used for the cancel button.
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
[Technology]
|
|
25
|
+
- use the following tech stack:
|
|
26
|
+
- React
|
|
27
|
+
- Next.js
|
|
28
|
+
- TailwindCSS
|
|
29
|
+
- TypeScript
|
|
30
|
+
- Shadcn/UI
|
|
31
|
+
- use npm shadcn@latest add * to add components. Do not use shadcn-ui
|
|
32
|
+
|
|
33
|
+
[Architecture]
|
|
34
|
+
- store all configuration values in hazo_notify_config.ini file. Always put hard coded values that have chance to change in config.ini
|
|
35
|
+
- store any sensitive data in .env file (to be excluded in git)
|
|
36
|
+
- create reusable components to prevent having redundant code and to improve maintainability
|
|
37
|
+
- Ensure you have a minimum of one file per route
|
|
38
|
+
- Group pages into directories for maintainability
|
|
39
|
+
|
|
40
|
+
[Database]
|
|
41
|
+
- database schema can be gound on .cursor/rules/db_schema.md
|
|
42
|
+
|
|
43
|
+
[Logging]
|
|
44
|
+
- use main app logging service for backend logging
|
|
45
|
+
- When there's an error that happens, always log on the serverside.
|
|
46
|
+
- Use the config.
|
|
47
|
+
- In the logging, always include the filename, line number, message and relevant data to help troubleshoot in future in the json log entry
|
|
48
|
+
- When error messages are shown to the user, they should always be logged verbatem in the serverside log file as well
|
|
49
|
+
- don't import the logger in the client side code
|