feat: DevPath Bharat branding and legal upgrade - #766
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the DevPath Web codebase to the “DevPath Bharat” brand identity and adds/links several legal & governance pages, alongside a change to how admin registration keys are validated via Firestore.
Changes:
- Rebrands copy/docs/configuration from “DevPath India” to “DevPath Bharat” (README, license, templates, chatbot KB, architecture docs).
- Adds new legal/community pages (Copyright Notice, Community Guidelines, License, Code of Conduct) and links them from the footer.
- Updates admin-key verification flow and Firestore rules to prevent listing keys while allowing direct key lookups.
Reviewed changes
Copilot reviewed 20 out of 21 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| SUPPORT.md | Adds support/getting-help guidance for the community |
| src/lib/firebaseAdmin.ts | Introduces Firebase Admin SDK initialization helper |
| src/components/layout/Footer.tsx | Adds legal links + expanded copyright/legal footer copy |
| src/components/auth/AdminKeyModal.tsx | Switches admin-key verification to key-as-doc-id lookup |
| src/app/signup/page.tsx | Switches admin signup key verification to key-as-doc-id lookup |
| src/app/license/page.tsx | Adds License page rendering LICENSE content |
| src/app/guidelines/page.tsx | Adds Community Guidelines page |
| src/app/copyright/page.tsx | Adds Copyright Notice page |
| src/app/conduct/page.tsx | Adds Code of Conduct page rendering CODE_OF_CONDUCT.md |
| SECURITY.md | Adds security policy + disclosure/contact info |
| scripts/setup-project.ts | Seeds an admin key doc (new scheme) during setup |
| README.md | Updates README branding/structure and onboarding content |
| public/sw.js | Updates service worker precache manifest/build output |
| LICENSE | Updates license branding references |
| GOVERNANCE.md | Adds governance structure document |
| firestore.rules | Restricts admin_keys listing while allowing direct get |
| backend/src/config/chatbotConfig.js | Updates chatbot knowledge base branding text |
| ARCHITECTURE.md | Updates architecture doc branding text |
| .github/pull_request_template.md | Updates branding checkbox |
| .github/ISSUE_TEMPLATE/feature_request.md | Updates branding in template metadata |
| .github/ISSUE_TEMPLATE/bug_report.md | Updates branding in template metadata |
Files not reviewed (1)
- public/sw.js: Generated file
Comments suppressed due to low confidence (1)
src/components/auth/AdminKeyModal.tsx:38
doc(db, 'admin_keys', key)uses the raw user input as a Firestore document ID. If the key contains leading/trailing spaces or an invalid character like "/", Firestore will throw and the modal will show a generic network error. Normalize/validate the key before creating the doc ref to avoid false negatives and unexpected exceptions.
// Verify the key securely by attempting to read a document with the key as the ID
const docRef = doc(db, 'admin_keys', key);
const docSnap = await getDoc(docRef);
if (docSnap.exists()) {
verifyAdmin();
onVerified();
} else {
setError('Invalid Admin Key. Please try again.');
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| If you need help using the DevPath Bharat platform or have questions about a specific feature, there are several ways to get support: | ||
|
|
||
| 1. **Check the FAQ**: We have a comprehensive FAQ section on our website at [devpath.org/faq](https://devpath.org/faq). | ||
| 2. **Community Wiki**: Browse our [Wiki](/wiki) for in-depth documentation and guides. |
Comment on lines
155
to
162
| if (!adminKey.trim()) { | ||
| throw new Error('Admin key is required for admin registration.'); | ||
| } | ||
|
|
||
| if (adminKey !== currentAdminKey) { | ||
| const keyDoc = await getDoc(doc(db, 'admin_keys', adminKey)); | ||
| if (!keyDoc.exists()) { | ||
| throw new Error('Invalid Admin Key. Please contact the Super Admin.'); | ||
| } |
Comment on lines
+62
to
+65
| await setDoc(doc(db, 'admin_keys', process.env.ADMIN_REGISTRATION_KEY as string), { | ||
| updatedAt: new Date().toISOString(), | ||
| description: 'Standard admin registration key' | ||
| }); |
Comment on lines
+158
to
+160
| <p className="font-semibold text-gray-900 dark:text-gray-300"> | ||
| © 2026 DevPath Bharat Community. All Rights Reserved. | ||
| </p> |
Comment on lines
+1
to
+21
| import * as admin from 'firebase-admin'; | ||
|
|
||
| if (!admin.apps.length) { | ||
| try { | ||
| admin.initializeApp({ | ||
| credential: admin.credential.cert({ | ||
| projectId: process.env.FIREBASE_PROJECT_ID, | ||
| clientEmail: process.env.FIREBASE_CLIENT_EMAIL, | ||
| // Handle newlines in the private key | ||
| privateKey: process.env.FIREBASE_PRIVATE_KEY?.replace(/\\n/g, '\n'), | ||
| }), | ||
| }); | ||
| } catch (error: any) { | ||
| console.error('Firebase admin initialization error', error.stack); | ||
| } | ||
| } | ||
|
|
||
| const adminDb = admin.firestore(); | ||
| const adminAuth = admin.auth(); | ||
|
|
||
| export { adminDb, adminAuth }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates DevPath branding and adds required legal pages.