@titas_mallick/wedding-site-gen 1.0.5 → 1.0.6

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 CHANGED
@@ -127,6 +127,24 @@ Automatically populated when guests confirm attendance.
127
127
  ### `guestbook` & `wishes` (Collections)
128
128
  Store guest memories and text blessings respectively.
129
129
 
130
+ ### 🔒 Recommended Firestore Rules
131
+ Paste these into your Firebase Console to secure your data (also available in `firestore.rules`):
132
+ ```javascript
133
+ rules_version = '2';
134
+ service cloud.firestore {
135
+ match /databases/{database}/documents {
136
+ match /wishes/{wishId} { allow read, write: if true; }
137
+ match /song_requests/{requestId} { allow read, write: if true; }
138
+ match /guestbook/{entryId} { allow read, write: if true; }
139
+ match /rsvps/{rsvpId} { allow read, write: if true; }
140
+ match /{document=**} {
141
+ allow read: if true;
142
+ allow write: if request.auth != null;
143
+ }
144
+ }
145
+ }
146
+ ```
147
+
130
148
  ---
131
149
 
132
150
  ## 🎨 Customization & Development
@@ -161,6 +179,7 @@ This project uses **Tailwind CSS** and **HeroUI**.
161
179
  5. Copy the `firebaseConfig` values into your `.env.local`:
162
180
  - `NEXT_PUBLIC_APIKEY`, `NEXT_PUBLIC_AUTHDOMAIN`, `NEXT_PUBLIC_PROJECTID`, etc.
163
181
  6. **Admin SDK**: Go to **Project Settings > Service accounts**, click "Generate new private key", and use those values for the `FIREBASE_ADMIN_*` variables in `.env.local`.
182
+ 7. **Security Rules**: Go to the **Rules** tab in Firestore and paste the contents of `firestore.rules` found in this project.
164
183
 
165
184
  ### 2. Google Gemini (AI Concierge)
166
185
  1. Go to the [Google AI Studio](https://aistudio.google.com/).
package/cli.mjs CHANGED
@@ -112,7 +112,7 @@ export default adminCred;
112
112
 
113
113
  // Only process text files for replacements
114
114
  const ext = path.extname(srcPath).toLowerCase();
115
- const textExtensions = ['.ts', '.tsx', '.js', '.jsx', '.json', '.md', '.css', '.html'];
115
+ const textExtensions = ['.ts', '.tsx', '.js', '.jsx', '.json', '.md', '.css', '.html', '.rules'];
116
116
 
117
117
  if (textExtensions.includes(ext)) {
118
118
  let content = await fs.readFile(srcPath, 'utf8');
@@ -0,0 +1,26 @@
1
+ rules_version = '2';
2
+ service cloud.firestore {
3
+ match /databases/{database}/documents {
4
+ // Wishes collection - anyone can read and write
5
+ match /wishes/{wishId} {
6
+ allow read, write: if true;
7
+ }
8
+ // Song requests collection - anyone can read and write
9
+ match /song_requests/{requestId} {
10
+ allow read, write: if true;
11
+ }
12
+ // Guestbook collection - anyone can read and write
13
+ match /guestbook/{entryId} {
14
+ allow read, write: if true;
15
+ }
16
+ // RSVPs collection - anyone can read and write
17
+ match /rsvps/{rsvpId} {
18
+ allow read, write: if true;
19
+ }
20
+ // All other documents - read public, write authenticated only
21
+ match /{document=**} {
22
+ allow read: if true;
23
+ allow write: if request.auth != null;
24
+ }
25
+ }
26
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@titas_mallick/wedding-site-gen",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "bin": {
5
5
  "wedding-gen": "./cli.mjs"
6
6
  },