You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added new GitHub Actions workflows for deploying to Firebase on merge and pull request events.
- Updated README.md to reflect the transition from GitHub Pages to Firebase Hosting, including installation instructions for Firebase CLI and configuration steps.
- Fixed missing newlines in .firebaserc and firebase.json files.
Signed-off-by: Pete Cheslock <[email protected]>
**⚠️ Important**: The `.env` file is automatically ignored by Git for security. Never commit your Firebase credentials to the repository.
103
96
104
-
### 4. Update GitHub Pages Configuration
97
+
### 5. Initialize Firebase
105
98
106
-
1. Update `package.json` homepage field to match your GitHub username:
107
-
```json
108
-
"homepage": "https://yourgithubuser.github.io"
109
-
```
99
+
```bash
100
+
firebase login
101
+
firebase init
102
+
```
110
103
111
-
2. In your GitHub repository settings:
112
-
- Go to **Settings**→**Pages**
113
-
- Set **Source** to "Deploy from a branch"
114
-
- Set **Branch** to "main" and **Folder** to "/ (root)"
115
-
116
-
**Note**: This configuration serves from your main GitHub Pages domain (`petecheslock.github.io`). If you want to serve from a subdirectory like `/handstack`, you can create a repository named `handstack` and it will be available at `petecheslock.github.io/handstack`.
104
+
During initialization:
105
+
- Select **Hosting**and**Realtime Database**
106
+
- Choose **Use an existing project** and select your Firebase project
107
+
- Set `dist` as your public directory
108
+
- Configure as a single-page app (Yes)
109
+
- Don't overwrite `dist/index.html` if it exists
117
110
118
-
### 5. Test Locally
111
+
### 6. Test Locally
119
112
120
113
```bash
121
114
npm run dev
@@ -129,37 +122,26 @@ Visit `http://localhost:5173` to test the application. You should see the Handst
129
122
3. Open a new browser tab/window and join the room with the code
130
123
4. Test raising/lowering hands and queue management
131
124
132
-
## 🚀 Deployment to GitHub Pages
133
-
134
-
### GitHub Secrets Configuration
135
-
136
-
Before deploying, you need to add your Firebase configuration as GitHub Secrets:
125
+
## 🚀 Deployment to Firebase
137
126
138
-
1. Go to your GitHub repository Settings > Secrets and variables > Actions
139
-
2. Add the following secrets with your Firebase config values:
140
-
-`VITE_FIREBASE_API_KEY`
141
-
-`VITE_FIREBASE_AUTH_DOMAIN`
142
-
-`VITE_FIREBASE_DATABASE_URL`
143
-
-`VITE_FIREBASE_PROJECT_ID`
144
-
-`VITE_FIREBASE_STORAGE_BUCKET`
145
-
-`VITE_FIREBASE_MESSAGING_SENDER_ID`
146
-
-`VITE_FIREBASE_APP_ID`
127
+
### Database Rules
147
128
148
-
### Option 1: Automatic Deployment (Recommended)
129
+
The database security rules are stored in `database.rules.json` and will be automatically deployed with your project. The rules are configured to allow read/write access to room data.
149
130
150
-
1. Push your code to GitHub
151
-
2. Go to your repository Settings > Pages
152
-
3. Choose "GitHub Actions" as the source
153
-
4. The workflow in `.github/workflows/deploy.yml` will automatically deploy on push to main
154
-
5. Your app will be available at `https://petecheslock.github.io`
155
-
156
-
### Option 2: Manual Deployment
131
+
### Deploy to Firebase
157
132
158
133
```bash
159
-
npm run build
160
134
npm run deploy
161
135
```
162
136
137
+
This command will:
138
+
1. Build the application
139
+
2. Deploy to Firebase Hosting
140
+
3. Update database rules
141
+
4. Provide you with a live URL
142
+
143
+
Your app will be available at `https://your-project-id.web.app`
144
+
163
145
## 📱 How to Use
164
146
165
147
### For Meeting Hosts (Admins)
@@ -183,7 +165,7 @@ npm run deploy
183
165
-**Frontend**: React 18 + Vite
184
166
-**Styling**: Tailwind CSS
185
167
-**Database**: Firebase Realtime Database
186
-
-**Hosting**: GitHub Pages
168
+
-**Hosting**: Firebase Hosting
187
169
-**Routing**: React Router
188
170
189
171
## 📈 Scaling Considerations
@@ -216,22 +198,23 @@ MIT License - feel free to use this for your meetings!
216
198
- Ensure database rules allow read/write access to `rooms`
217
199
218
200
2.**Deployment issues**:
219
-
- Verify all GitHub Secrets are added to your repository
220
-
- Check that your GitHub Pages settings use "GitHub Actions" as source
201
+
- Verify Firebase CLI is installed: `firebase --version`
202
+
- Check that you're logged in: `firebase login`
203
+
- Ensure your project is initialized: `firebase init`
221
204
222
205
3.**Room not found**: Ensure the room code is correct (4 alphanumeric characters).
223
206
224
207
4.**Environment variable errors**:
225
208
- Local development: Check your `.env` file
226
-
- Deployment: Check your GitHub repository secrets
209
+
- Deployment: Firebase will use your project configuration
227
210
228
211
**Need Help?** Create an issue on GitHub if you encounter problems or have suggestions for improvements.
229
212
230
213
---
231
214
232
215
## 🎉 Ready to Use!
233
216
234
-
Once you complete the Firebase setup, your Handstack will be ready to host on GitHub Pages at zero cost. The application will handle multiple concurrent rooms and real-time updates seamlessly.
217
+
Once you complete the Firebase setup, your Handstack will be ready to host on Firebase at zero cost. The application will handle multiple concurrent rooms and real-time updates seamlessly.
235
218
236
219
**Perfect for**: Classrooms, conferences, team meetings, workshops, and any event where you need organized hand raising!
0 commit comments