Skip to content

Commit 9b06323

Browse files
committed
docs: update contributing guide and README
- Update CONTRIBUTING.md with current bun (>=1.3.7) and node (>=24.11.0) versions - Add bun run doctor step for environment verification - Add bun run check command (combines lint, format, types) - Update project structure to include admin-dashboard and workflows - Add security reference to SECURITY.md
1 parent 5d2c0e4 commit 9b06323

2 files changed

Lines changed: 42 additions & 54 deletions

File tree

CONTRIBUTING.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ By participating in this project, you agree to maintain a respectful and inclusi
2525
Before you begin, ensure you have:
2626

2727
- 🐳 **Docker** & **Docker Compose** v2+ - [Install](https://docs.docker.com/get-docker/)
28-
- 🚀 **Bun** >=1.3.2 - [Install](https://bun.sh/docs/installation)
28+
- 🚀 **Bun** >=1.3.7 - [Install](https://bun.sh/docs/installation)
29+
- 📦 **Node.js** >=24.11.0 (for some tooling)
2930
- 🗄️ **Supabase CLI** - [Install](https://supabase.com/docs/guides/cli/installation)
3031
- **Git** - [Install](https://git-scm.com/downloads)
3132

@@ -50,6 +51,14 @@ Before you begin, ensure you have:
5051
bun install
5152
```
5253

54+
### 1.5 Run Doctor (Optional)
55+
56+
Check your environment is correctly set up:
57+
58+
```bash
59+
bun run doctor
60+
```
61+
5362
### 2. Environment Configuration
5463

5564
```bash
@@ -232,12 +241,20 @@ Aim for good test coverage, especially for:
232241
git rebase main
233242
```
234243

235-
3. **Run tests**:
244+
3. **Run checks** (lint + format + types):
245+
246+
```bash
247+
bun run check
248+
```
249+
250+
Or individually:
236251

237252
```bash
238253
bun run lint
239254
bun run format:check
240-
bun run build
255+
bun run typecheck:webapp
256+
bun run typecheck:admin
257+
bun run typecheck:backend
241258
```
242259

243260
4. **Test locally**:
@@ -288,13 +305,16 @@ docs.plus/
288305
│ │ └── cypress/ # E2E tests
289306
│ ├── hocuspocus.server/ # ⚡ REST API, WebSocket, Workers
290307
│ │ ├── src/
291-
│ │ │ ├── api/ # API routes
292-
│ │ │ ├── lib/ # Shared libraries
293-
│ │ │ └── middleware/ # Middleware
294-
│ │ └── tests/ # Unit & integration tests
295-
│ ├── supabase/ # 🗄️ Database migrations
296-
│ │ └── scripts/ # SQL scripts
308+
│ │ │ ├── api/ # REST API routes & controllers
309+
│ │ │ ├── lib/ # Shared libraries (email, push, etc.)
310+
│ │ │ ├── middleware/ # Hono middleware
311+
│ │ │ └── config/ # Configuration & env schemas
312+
│ │ └── prisma/ # Prisma schema & migrations
313+
│ ├── admin-dashboard/ # 🛠️ Admin interface (Next.js)
314+
│ ├── supabase/ # 🗄️ Supabase configuration
315+
│ │ └── scripts/ # SQL migration scripts
297316
│ └── extension-*/ # 🔌 TipTap extensions
317+
├── .github/workflows/ # 🔄 CI/CD pipelines
298318
├── docker-compose.dev.yml # 🐳 Development setup
299319
├── docker-compose.prod.yml # 🚀 Production setup
300320
└── Makefile # 🛠️ Build commands
@@ -316,6 +336,7 @@ We welcome contributions in all areas:
316336

317337
- 💬 **Discord**: [Join our server](https://discord.com/invite/25JPG38J59) for real-time help
318338
- 🐛 **Issues**: [GitHub Issues](https://github.com/docs-plus/docs.plus/issues) for bug reports
339+
- 🔒 **Security**: See [SECURITY.md](SECURITY.md) for reporting vulnerabilities
319340
- 📧 **Email**: [contact@newspeak.house](mailto:contact@newspeak.house)
320341

321342
## 🙏 Thank You!

README.md

Lines changed: 12 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -203,55 +203,22 @@ You still need to configure your cloud project:
203203
- Run SQL scripts from `packages/supabase/scripts/` in order via SQL Editor
204204
- Configure queues and permissions (same as local setup)
205205

206-
**Step 4: Configure Push Notifications (Vault)** 🔔
206+
**Backend Environment Variables:**
207207

208-
Push notifications require configuration stored in Supabase Vault. Run these SQL commands in the **SQL Editor**:
208+
```env
209+
# Supabase connection (for pgmq polling)
210+
SUPABASE_URL=https://your-project.supabase.co
211+
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key
209212
210-
```sql
211-
-- Add secrets to Vault
212-
SELECT vault.create_secret(
213-
'https://your-backend-url.com', -- Your Hocuspocus backend URL
214-
'hocuspocus_url',
215-
'Hocuspocus backend URL for push notifications'
216-
);
217-
218-
SELECT vault.create_secret(
219-
'your-service-role-key-here', -- From Settings → API → service_role
220-
'service_role_key',
221-
'Supabase service role key'
222-
);
223-
224-
-- Update the push config function to read from Vault
225-
CREATE OR REPLACE FUNCTION internal.get_push_config()
226-
RETURNS table (edge_url text, service_key text)
227-
LANGUAGE plpgsql
228-
SECURITY DEFINER
229-
AS $$
230-
DECLARE
231-
v_hocuspocus_url text;
232-
v_service_key text;
233-
BEGIN
234-
SELECT decrypted_secret INTO v_hocuspocus_url
235-
FROM vault.decrypted_secrets WHERE name = 'hocuspocus_url';
236-
237-
SELECT decrypted_secret INTO v_service_key
238-
FROM vault.decrypted_secrets WHERE name = 'service_role_key';
239-
240-
IF v_hocuspocus_url IS NULL OR v_service_key IS NULL THEN
241-
RETURN;
242-
END IF;
243-
244-
RETURN QUERY SELECT
245-
v_hocuspocus_url || '/api/push/send',
246-
v_service_key;
247-
END;
248-
$$;
249-
250-
-- Verify configuration
251-
SELECT * FROM internal.get_push_config();
213+
# VAPID keys for Web Push
214+
VAPID_PUBLIC_KEY=your-vapid-public-key
215+
VAPID_PRIVATE_KEY=your-vapid-private-key
216+
VAPID_SUBJECT=mailto:support@yourdomain.com
252217
```
253218

254-
**Note:** Supabase Cloud doesn't allow `ALTER DATABASE SET` for custom parameters, so we use Vault for secure secret storage.
219+
Generate VAPID keys: `npx web-push generate-vapid-keys`
220+
221+
See `docs/PUSH_NOTIFICATION_PGMQ.md` for detailed architecture.
255222

256223
**Step 5: Configure OAuth Redirect URLs** 🔐
257224

0 commit comments

Comments
 (0)