From cfa2da8037a0277a19f3d8ec060d5a2d2c14a439 Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Tue, 27 Jan 2026 14:28:26 -0500 Subject: [PATCH] docs: Add API testing section to README - Document Bruno API testing collection with organized structure - Include comprehensive setup and usage instructions - Add reference to role-based registration restrictions - Explain admin-only endpoints and authentication requirements --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 1f684a3..0bc0674 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,35 @@ nano .env # or your preferred editor - `JWT_SECRET` - Secure random string for JWT authentication - `DBPASS` - PostgreSQL database password +### API Testing + +The `bruno/` directory contains a comprehensive API testing collection organized into logical subfolders for testing all endpoints: + +#### **Collection Structure** +``` +bruno/user/ +├── auth/ # Authentication requests +│ ├── Login User.bru # POST /api/auth/login +│ └── Register User.bru # POST /api/auth/register (with restrictions) +├── admin/ # Admin-only management +│ ├── List Users.bru # GET /api/auth/users (admin only) +│ ├── Delete Account.bru # DELETE /api/auth/account (admin override) +│ └── Register Admin User.bru # POST /api/auth/register (admin creation) +└── profile/ # Profile management + ├── Get Profile.bru # GET /api/auth/profile + ├── Update Profile.bru # PUT /api/auth/profile + ├── Update Email.bru # PUT /api/auth/email + ├── Update Password.bru # PUT /api/auth/password + ├── Update Theme.bru # PUT /api/auth/theme + └── Update Username.bru # PUT /api/auth/username +``` + +#### **Usage** +1. Install Bruno: https://www.usebruno.com/ +2. Import Collection: Open Bruno and import the `bruno/` folder +3. Select Environment: Choose the "Bookmann" environment +4. Authentication Flow: Register → Login → Use Bearer token for protected routes + ### Generating Secure Values **Generate JWT Secret:**