Skip to content

Commit dbb53ef

Browse files
committed
fixed the bugs and edited some content
1 parent bdd9cc3 commit dbb53ef

File tree

12 files changed

+118
-95
lines changed

12 files changed

+118
-95
lines changed

docs/architecture/technology.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
Below is a **clean, corrected, and professional version** of your document with the **Analytics** and **Security tooling (Snyk + Dependabot)** sections properly added.
2-
I’ve kept the tone suitable for **2025, a student-driven volunteer project**, and something you can confidently include in **reports, approvals, and resumes**.
31

4-
---
52

63
# 🧱 Technology Stack & Rationale
74

File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/introduction/mission.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,4 @@ Gecian Hub exists to ensure that no student feels left behind due to lack of inf
1212
**Our vision is to create a connected, tech-enabled student community where every student has equal access to opportunities, resources, and collaboration.**
1313
We aim to transform traditional college experiences by introducing modern digital solutions, encouraging innovation, and ensuring that no student ever feels their institution is outdated or lacking in technological support.
1414

15-
---
16-
17-
### ✨ Short & Simple Version ()
18-
19-
**Mission:**
20-
To help students succeed by centralizing college resources, improving communication, and making campus life more efficient through technology.
21-
22-
**Vision:**
23-
A future where every student is digitally empowered, well-informed, and confident that their college supports innovation and modern learning.
24-
2515

docs/setup/envlocal.md

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
# ===============================
21
# Database Configuration
3-
# ===============================
2+
43
DATABASE_URL="postgresql://USERNAME:PASSWORD@HOST:PORT/DATABASE?sslmode=require"
54

65

7-
# ===============================
6+
87
# Firebase Client Configuration
9-
# (Public – used in frontend)
10-
# ===============================
8+
119
NEXT_PUBLIC_FIREBASE_API_KEY="your_firebase_api_key"
1210
NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN="your_project_id.firebaseapp.com"
1311
NEXT_PUBLIC_FIREBASE_PROJECT_ID="your_project_id"
@@ -16,15 +14,8 @@ NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID="your_messaging_sender_id"
1614
NEXT_PUBLIC_FIREBASE_APP_ID="your_app_id"
1715

1816

19-
# ===============================
2017
# Firebase Admin SDK (Server Only)
21-
# ❌ NEVER expose to frontend
22-
# ❌ NEVER commit real values
23-
# ===============================
24-
25-
2618

27-
# Option 2 (ONLY if platform requires single var)
2819
FIREBASE_ADMIN_SDK_KEY='{
2920
"type": "service_account",
3021
"project_id": "your_project_id",

docs/setup/firebase.md

Lines changed: 44 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,22 @@
11

2-
32
# 🔥 Firebase Setup & Admin Access Documentation
43

54
This document explains how to:
65

76
1. Obtain Firebase **client (public) configuration**
87
2. Obtain Firebase **Admin SDK credentials**
98
3. Securely store environment variables
10-
4. Manually bootstrap the **first admin user** in Firestore
9+
4. Manually bootstrap the **first admin user**
1110
5. Define the required Firestore collections and structure
1211

1312
---
1413

1514
## 1️⃣ Create a Firebase Project
1615

17-
1. Go to **Firebase Console**
18-
👉 [https://console.firebase.google.com](https://console.firebase.google.com)
16+
1. Go to the Firebase Console
17+
https://console.firebase.google.com
1918
2. Click **Add Project**
20-
3. Enter project name (e.g. `gecian-hub`)
19+
3. Enter a project name (e.g. `gecian-hub`)
2120
4. Disable Google Analytics (optional)
2221
5. Click **Create Project**
2322

@@ -31,11 +30,11 @@ These values are used on the **frontend (Next.js)**.
3130

3231
1. Firebase Console → **Project Settings**
3332
2. Scroll to **Your Apps**
34-
3. Click **Add App → Web (</>)**
33+
3. Click **Add App → Web**
3534
4. Register the app
3635
5. Copy the generated config
3736

38-
Example:
37+
### Example
3938

4039
```js
4140
const firebaseConfig = {
@@ -46,11 +45,11 @@ const firebaseConfig = {
4645
messagingSenderId: "1234567890",
4746
appId: "1:1234567890:web:abcdef"
4847
};
49-
```
48+
````
5049

5150
---
5251

53-
### Environment Variables (Client)
52+
## 3️⃣ Client Environment Variables
5453

5554
```env
5655
NEXT_PUBLIC_FIREBASE_API_KEY=AIza...
@@ -61,32 +60,32 @@ NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID=1234567890
6160
NEXT_PUBLIC_FIREBASE_APP_ID=1:1234567890:web:abcdef
6261
```
6362

64-
🔐 These are **public by design** and safe to expose.
63+
> 🔐 These values are **public by design** and safe to expose.
6564

6665
---
6766

68-
## 3️⃣ Enable Required Firebase Services
67+
## 4️⃣ Enable Required Firebase Services
6968

7069
### Authentication
7170

72-
* Enable **Email/Password**
71+
* Enable **Email / Password**
7372
* Optional: Google Sign-In
7473

7574
### Firestore
7675

7776
* Create Firestore database
7877
* Start in **Production Mode**
79-
* Choose correct region
78+
* Choose the correct region
8079

8180
---
8281

83-
## 4️⃣ Firebase Admin SDK (Server-Side – SECRET)
82+
## 5️⃣ Firebase Admin SDK (Server Side – SECRET)
8483

85-
The **Admin SDK is REQUIRED** for:
84+
The Admin SDK is required for:
8685

8786
* Admin management
88-
* Firestore writes bypassing rules
89-
* Secure backend APIs
87+
* Secure Firestore writes
88+
* Backend-only APIs
9089

9190
### Steps
9291

@@ -95,69 +94,54 @@ The **Admin SDK is REQUIRED** for:
9594
3. Click **Generate new private key**
9695
4. Download the JSON file
9796

98-
Example:
99-
100-
```json
101-
{
102-
"type": "service_account",
103-
"project_id": "project-id",
104-
"private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
105-
"client_email": "firebase-adminsdk@project-id.iam.gserviceaccount.com"
106-
}
107-
```
108-
10997
---
11098

111-
## 5️⃣ Storing Firebase Admin Credentials
112-
99+
## 6️⃣ Storing Firebase Admin Credentials (Recommended)
113100

114-
### : FULL Admin SDK JSON (ONLY if needed)
101+
### Option A: Individual Environment Variables (Best)
115102

116103
```env
117-
FIREBASE_ADMIN_SDK_KEY='{
118-
"type": "service_account",
119-
"project_id": "project-id",
120-
"private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
121-
"client_email": "firebase-adminsdk@project-id.iam.gserviceaccount.com"
122-
}'
104+
FIREBASE_PROJECT_ID=project-id
105+
FIREBASE_CLIENT_EMAIL=firebase-adminsdk@project-id.iam.gserviceaccount.com
106+
FIREBASE_PRIVATE_KEY=-----BEGIN_PRIVATE_KEY-----\n...\n-----END_PRIVATE_KEY-----
123107
```
124108

125-
109+
> ✅ This avoids multiline parsing issues and is production-safe.
126110

127111
---
128112

129-
## 6️⃣ Firestore Admin Bootstrap (CRITICAL)
113+
## 7️⃣ Firestore Admin Bootstrap (Critical)
130114

131-
Since no admin exists initially, **the first admin MUST be added manually** from the Firebase Console.
115+
Since no admin exists initially, the **first admin must be added manually**.
132116

133117
---
134118

135-
## 7️⃣ ✅ CORRECT Firestore Collection Structure
119+
## 8️⃣ Firestore Collection Structure
136120

137-
### ✔ YES — THIS STRUCTURE IS CORRECT
121+
### Correct Structure
138122

139123
```text
140124
adminemail (collection)
141-
── {autoDocId}
142-
├── email: string
143-
├── role: "admin" or "superadmin"
144-
├── addedBy: string
145-
── timestamp: Timestamp
125+
── auto-generated-doc-id
126+
├── email: string
127+
├── role: "admin" | "superadmin"
128+
├── addedBy: string
129+
── timestamp: timestamp
146130
```
147131

148-
### 🔴 Important Notes
132+
### Important Notes
149133

150-
* **Document ID should be Auto-ID**
151-
* Do **NOT** use email as document ID (causes problems later)
134+
* Use **Auto-ID** for documents
135+
* Do **NOT** use email as document ID
152136
* `role` must be controlled by backend only
153137

154138
---
155139

156-
## 8️⃣ Manually Add First Admin (Bootstrap)
140+
## 9️⃣ Add First Admin Manually
157141

158142
### Steps
159143

160-
1. Firebase Console → **Firestore Database**
144+
1. Firebase Console → Firestore Database
161145
2. Click **Start Collection**
162146
3. Collection ID: `adminemail`
163147
4. Document ID: **Auto-ID**
@@ -166,28 +150,29 @@ adminemail (collection)
166150

167151
| Field | Type | Value |
168152
| --------- | --------- | --------------------------------------------------------------------- |
169-
| email | string | [musthafalmukthar907@gmail.com]| role | string | admin |
170-
| addedBy | string | emailid |
153+
| email | string | [musthafalmukthar907@gmail.com](mailto:musthafalmukthar907@gmail.com) |
154+
| role | string | admin |
155+
| addedBy | string | system |
171156
| timestamp | timestamp | current time |
172157

173-
✅ This user is now the **initial system admin**
158+
✅ This user is now the initial system admin.
174159

175160
---
176161

177-
## 9️⃣ Example Admin Document
162+
## 10️⃣ Example Admin Document
178163

179164
```json
180165
{
181166
"email": "psabhidram5600@gmail.com",
182167
"role": "admin",
183-
"addedBy": "psabhidram5000@gmail.com",
168+
"addedBy": "system",
184169
"timestamp": "2025-09-04T11:51:19Z"
185170
}
186171
```
187172

188173
---
189174

190-
## 🔐 Security Rules (Recommended)
175+
## 🔐 Recommended Firestore Security Rules
191176

192177
```js
193178
rules_version = '2';
@@ -196,7 +181,7 @@ service cloud.firestore {
196181
197182
match /adminemail/{doc} {
198183
allow read: if request.auth != null;
199-
allow write: if false; // Admin SDK only
184+
allow write: if false;
200185
}
201186
202187
match /{document=**} {
@@ -205,4 +190,3 @@ service cloud.firestore {
205190
}
206191
}
207192
}
208-
```

docs/setup/project_git.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
Got it 👍
2-
You want **pure Markdown**, **no `.sh` file**, **just copy-paste terminal commands** that contributors can run step by step.
3-
4-
Below is a **clean, strict, copy-paste–friendly MkDocs section**.
5-
6-
---
71

82
# 🚀 Gecian Hub – Complete Local Setup (Copy-Paste Ready)
93

docs/succession/onboarding-new-leads.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
* GitHub activity
8282
* Google Forms
8383
* Official email inbox
84+
* Google analytics
8485
* Ask seniors or previous leads if unsure—**no guesswork**.
8586

8687
---

0 commit comments

Comments
 (0)