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:**