๐ง Firebase Setup Guide
Follow these steps to connect your portal to Firebase โ takes about 20 minutes total.
1
Create a Firebase Project
Go to console.firebase.google.com โ Click "Add project" โ Name it energy-deregulator โ Disable Analytics โ Create project
2
Enable Google Authentication
In Firebase Console โ Authentication โ Get Started โ Sign-in method โ Google โ Enable โ Save
Then go to Authorized domains โ Add energyderegulator.com and portal.energyderegulator.com
Then go to Authorized domains โ Add energyderegulator.com and portal.energyderegulator.com
3
Create Firestore Database
In Firebase Console โ Firestore Database โ Create database โ Start in test mode โ Choose server location (us-central recommended) โ Done
4
Get Your Config Keys
Project Settings (gear icon) โ Your apps โ Click web icon (</>) โ Register app โ Copy the firebaseConfig block
const firebaseConfig = {
apiKey: "AIza...",
authDomain: "your-project.firebaseapp.com",
projectId: "your-project",
...
};
apiKey: "AIza...",
authDomain: "your-project.firebaseapp.com",
projectId: "your-project",
...
};
5
Paste Keys Into This File
Open energy-deregulator-portal.html in a text editor (Notepad, VS Code) โ Find the section marked PASTE YOUR CONFIG HERE near the top โ Replace each placeholder value โ Save the file
6
Upload to Hostinger
hpanel.hostinger.com โ Websites โ Manage โ File Manager โ Navigate to /public_html โ Create folder named portal โ Upload file โ Rename to index.html
Then in Hostinger โ Domains โ Subdomains โ Add portal โ points to /public_html/portal
Then in Hostinger โ Domains โ Subdomains โ Add portal โ points to /public_html/portal
7
Add Yourself as First Admin
After logging in for the first time, go to Firestore โ users collection โ find your document โ change role field to Admin โ Save. Then all future agents can be managed from inside the portal.
$0
Revenue (MTD)
Loading...
0
Active Deals
Loading...
0
Total Customers
Live from Firebase
$0
Commissions Pending
Loading...
Sales This Week
Recent Activity
โก
Portal connected โ Firebase ready
Just now
โ
Google Auth enabled โ Agents can sign in
Active
๐๏ธ
Firestore database โ Storing live data
Active
Top Agents โ This Month
Welcome, Agent ๐
Your personal performance dashboard
0
My Deals
$0
Commission Earned
0
My Customers
โ
kWh Rate
โ
Therm Rate
My Recent Deals
| Deal | Customer | Type | Volume | Commission | Status |
|---|---|---|---|---|---|
| Loading deals... | |||||
Commission Summary
$0
Paid Out
$0
Pending Approval
Your Assigned Rates
Rates assigned by your manager will appear here.
Rates assigned by your manager will appear here.
| Deal # | Customer | Agent | Type | Volume | Rate | Value | Status | Commission | |
|---|---|---|---|---|---|---|---|---|---|
| Loading deals from Firebase... | |||||||||
$0
Total (MTD)
$0
Paid Out
$0
Pending
Commission by Agent
| Agent | kWh Rate | Therm Rate | kWh Sold | Therms Sold | Earned | Paid | Pending | % |
|---|---|---|---|---|---|---|---|---|
| Loading from Firebase... | ||||||||
โณ Pending Approvals
| Deal # | Agent | Customer | Volume | Commission | Date | Action |
|---|---|---|---|---|---|---|
| No pending approvals | ||||||
โ
Approved History
| Deal # | Agent | Customer | Commission | Approved By | Date |
|---|---|---|---|---|---|
| No approved deals yet | |||||
| Name | Type | Energy | State | Agent | Status | Enrolled | |
|---|---|---|---|---|---|---|---|
| Loading customers... | |||||||
| Agent | Role | kWh Rate | Therm Rate | Deals | Status | ||
|---|---|---|---|---|---|---|---|
| Loading agents from Firebase... | |||||||
โก
Energy Deregulator
Customer Enrollment Form
$0
Revenue MTD
0
kWh Sold
0
Therms Sold
$0
Commissions Paid
All Deals This Month
| Deal | Agent | Customer | Type | Volume | Value | Commission | Status |
|---|---|---|---|---|---|---|---|
| Loading... | |||||||