Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ node_modules/
# Google OAuth credentials (SECURITY CRITICAL)
settings.json

# Firebase configuration (project-specific, should be downloaded from Firebase Console)
google-services.json

# Logs
*.log
npm-debug.log*
Expand Down
1 change: 1 addition & 0 deletions .meteor/cordova-plugins
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cordova-plugin-push@https://github.com/havesource/cordova-plugin-push.git#f075ed481f60ec57431373d7597600d08479c141
4 changes: 3 additions & 1 deletion .meteor/platforms
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
server
android
browser
ios
server
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,30 @@ Quick start: [click here](./HOW_TO_USE.md)
meteor npm install
```

3. **Run the application:**
3. **Configure settings:**
Copy `settings.json` and add your OAuth credentials and VAPID keys:
```json
{
"public": {
"vapidPublicKey": "YOUR_VAPID_PUBLIC_KEY"
},
"private": {
"GOOGLE_CLIENT_ID": "YOUR_GOOGLE_CLIENT_ID",
"GOOGLE_CLIENT_SECRET": "YOUR_GOOGLE_CLIENT_SECRET",
"HUB_CLIENT_ID": "YOUR_GITHUB_CLIENT_ID",
"HUB_CLIENT_SECRET": "YOUR_GITHUB_CLIENT_SECRET",
"VAPID_PRIVATE_KEY": "YOUR_VAPID_PRIVATE_KEY",
"VAPID_PUBLIC_KEY": "YOUR_VAPID_PUBLIC_KEY"
}
}
```

4. **Run the application:**
```bash
meteor
meteor run --settings settings.json
```

4. **Access the app:**
5. **Access the app:**
Open your browser and navigate to `http://localhost:3000`

---
Expand Down
3 changes: 1 addition & 2 deletions client/components/auth/AuthPage.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ <h2 class="text-2xl font-bold text-center mb-6">Create Account</h2>
<div class="form-control w-full">
<label for="{{id}}" class="label"><span class="label-text">{{label}}</span></label>
<input type="{{type}}" id="{{id}}" name="{{name}}" placeholder="{{placeholder}}"
class="input input-bordered w-full" required
pattern="{{emailPattern}}" title="{{emailTitle}}" />
class="input input-bordered w-full" />
</div>
</template>
10 changes: 1 addition & 9 deletions client/components/auth/AuthPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,7 @@ Template.authPage.helpers({
});

Template.formField.helpers({
emailPattern() {
return this.type === 'email' ? '[^@]+@[^@]+\\.[^@]+' : '';
},
emailTitle() {
return this.type === 'email' ? 'Please enter a valid email with domain (e.g., user@example.com)' : '';
}
// No patterns needed
});

Template.authPage.events({
Expand Down Expand Up @@ -80,9 +75,6 @@ Template.authPage.events({
event.preventDefault();
const { email, password, confirmPassword } = event.target;

if (password.value !== confirmPassword.value) return alert('Passwords do not match');
if (password.value.length < 6) return alert('Password too short');

Accounts.createUser({
email: email.value.trim(),
password: password.value
Expand Down
11 changes: 9 additions & 2 deletions client/components/notifications/NotificationSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,16 @@ Template.notificationSettings.events({
let errorMessage = '❌ Failed to enable notifications. ';

if (error.message.includes('permission denied')) {
errorMessage += 'Please allow notifications in your browser settings.';
errorMessage += 'Please allow notifications in your device settings.';
} else if (error.message.includes('not supported')) {
errorMessage += 'Your browser does not support push notifications.';
// Check if it's Cordova
const isCordova = typeof window !== 'undefined' &&
(window.cordova || window.PhoneGap || window.phonegap);
if (isCordova) {
errorMessage += 'Push notification plugin may not be installed. Please rebuild the app.';
} else {
errorMessage += 'Your browser does not support push notifications.';
}
} else {
errorMessage += 'Error: ' + error.message;
}
Expand Down
Loading