@arun-syngrid/hippaguard 0.1.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/README.md ADDED
@@ -0,0 +1,206 @@
1
+ # HIPPAGuard ๐Ÿ”’
2
+
3
+ Secure form handling with client-side encryption for React applications - HIPAA-compliant form components with built-in security.
4
+
5
+ <p align="center">
6
+ <img src="assets/logo.svg" width="64" height="64" alt="HIPPAGuard Logo" />
7
+ </p>
8
+
9
+ [![npm version](https://badge.fury.io/js/@hippaguard%2Freact.svg)](https://badge.fury.io/js/@hippaguard%2Freact)
10
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
11
+ [![Test Coverage](https://img.shields.io/badge/coverage-87%25-green.svg)](https://github.com/Anas-debug/HIPPAGuard)
12
+
13
+ ## Overview
14
+
15
+ HIPPAGuard provides secure form components for handling sensitive healthcare data in React applications. It includes built-in encryption, data protection, and HIPAA compliance features.
16
+
17
+ ## Key Features
18
+
19
+ - ๐Ÿ”’ Client-side AES-256-GCM encryption
20
+ - โš•๏ธ HIPAA & PHI/PII data protection
21
+ - ๐Ÿ›ก๏ธ Form validation & sanitization
22
+ - ๐Ÿ”„ Simple React hooks API
23
+ - ๐Ÿ“ Full TypeScript support
24
+ - โœ… Extensive test coverage
25
+ - ๐Ÿš€ Lightweight with minimal dependencies
26
+ - ๐Ÿ’ช Built for production use
27
+
28
+ ## Getting Started
29
+
30
+ ### Installation
31
+
32
+ ```sh
33
+ npm install @hippaguard/react
34
+ ```
35
+
36
+ ### Basic Usage
37
+
38
+ ```tsx
39
+ import { SecureForm, SecureField } from '@hippaguard/react';
40
+
41
+ function PatientForm() {
42
+ const handleSubmit = async (data) => {
43
+ // Data is automatically encrypted
44
+ console.log('Encrypted form data:', data);
45
+ };
46
+
47
+ return (
48
+ <SecureForm onSubmit={handleSubmit}>
49
+ <SecureField
50
+ name="firstName"
51
+ label="First Name"
52
+ required
53
+ sensitivityLevel="PHI"
54
+ />
55
+
56
+ <SecureTextArea
57
+ name="symptoms"
58
+ label="Current Symptoms"
59
+ sensitivityLevel="PHI"
60
+ />
61
+
62
+ <button type="submit">
63
+ Submit
64
+ </button>
65
+ </SecureForm>
66
+ );
67
+ }
68
+ ```
69
+
70
+ ## Core Components
71
+
72
+ ### SecureField
73
+ Standard input field with encryption and validation.
74
+
75
+ ```tsx
76
+ <SecureField
77
+ name="ssn"
78
+ label="Social Security Number"
79
+ type="text"
80
+ sensitivityLevel="PII"
81
+ validateFn={validateSSN}
82
+ required
83
+ />
84
+ ```
85
+
86
+ ### SecureTextArea
87
+ Multiline text input with encryption.
88
+
89
+ ```tsx
90
+ <SecureTextArea
91
+ name="notes"
92
+ label="Medical Notes"
93
+ rows={4}
94
+ sensitivityLevel="PHI"
95
+ />
96
+ ```
97
+
98
+ ### SecureCheckbox
99
+ Secure checkbox component.
100
+
101
+ ```tsx
102
+ <SecureCheckbox
103
+ name="consent"
104
+ label="I consent to treatment"
105
+ sensitivityLevel="PHI"
106
+ />
107
+ ```
108
+
109
+ ### SecureRadioGroup
110
+ Radio button group with encryption.
111
+
112
+ ```tsx
113
+ <SecureRadioGroup
114
+ name="gender"
115
+ label="Gender"
116
+ options={['Male', 'Female', 'Other']}
117
+ sensitivityLevel="PHI"
118
+ />
119
+ ```
120
+
121
+ ## Validation
122
+
123
+ Built-in validation helpers:
124
+
125
+ ```tsx
126
+ import { validators } from '@hippaguard/react';
127
+
128
+ <SecureField
129
+ name="email"
130
+ validateFn={validators.combine([
131
+ validators.required(),
132
+ validators.email()
133
+ ])}
134
+ />
135
+ ```
136
+
137
+ ## Context & Hooks
138
+
139
+ ### SecurityProvider
140
+ Provides encryption context.
141
+
142
+ ```tsx
143
+ import { SecurityProvider } from '@hippaguard/react';
144
+
145
+ function App() {
146
+ return (
147
+ <SecurityProvider>
148
+ <YourApp />
149
+ </SecurityProvider>
150
+ );
151
+ }
152
+ ```
153
+
154
+ ### useSecurity
155
+ Access encryption functions.
156
+
157
+ ```tsx
158
+ const { encrypt, decrypt } = useSecurity();
159
+ ```
160
+
161
+ ## Security Features
162
+
163
+ - ๐Ÿ” AES-256-GCM encryption
164
+ - ๐Ÿ”‘ Unique IV per encryption
165
+ - ๐Ÿ›ก๏ธ PBKDF2 key derivation
166
+ - ๐Ÿงน Auto key cleanup
167
+ - ๐Ÿ”’ Zero plaintext storage
168
+ - โœ… Input sanitization
169
+
170
+ ## Contributing
171
+
172
+ We welcome contributions! Please check our [Contributing Guide](CONTRIBUTING.md).
173
+
174
+ ### Development
175
+
176
+ 1. Clone repo
177
+ ```sh
178
+ git clone https://github.com/Anas-debug/HIPPAGuard.git
179
+ ```
180
+
181
+ 2. Install dependencies
182
+ ```sh
183
+ npm install
184
+ ```
185
+
186
+ 3. Run tests
187
+ ```sh
188
+ npm test
189
+ ```
190
+
191
+ ### Testing
192
+ - Unit tests
193
+ - Integration tests
194
+ - Security tests
195
+ - Edge cases
196
+ - Current coverage: ~87%
197
+
198
+ ## Support
199
+
200
+ - ๐Ÿ“ [Documentation](https://github.com/Anas-debug/HIPPAGuard)
201
+ - ๐Ÿ› [Issues](https://github.com/Anas-debug/HIPPAGuard/issues)
202
+ - โœ‰๏ธ [Email](mailto:security@hippaguard.dev)
203
+
204
+ ## License
205
+
206
+ [MIT](LICENSE) ยฉ [Anas Saoui](https://github.com/Anas-debug)