Skip to main content

Bruno and auth mini documentation

More Details on Requests and Endpoints Using Bruno and Swagger

When working on the frontend, you may need to check details about an API request — such as the payload, query parameters, or the response structure.

To help with this, we use a few tools:

  • Bruno: an API client for testing and exploring requests.
  • Swagger: interactive documentation for quickly reviewing endpoints and schemas.
  • Redoc: interactive documentation for quickly reviewing endpoints and schemas.

Bruno

Bruno is an API client where we maintain a collection of requests for our backend.

How to set up Bruno:

  1. Clone the backend repository.
  2. Inside the repo, locate the Bruno folder (this contains the request collection).
  3. Open the Bruno application.
  4. In Bruno, click the three dots in the top-left corner → Open Collection.
  5. Select the Bruno folder and click Open.

✅ You now have access to predefined requests and environments. This allows you to test endpoints, switch environments (e.g., dev, staging), and explore request/response details.

Swagger

Swagger provides live API documentation directly from the backend.

How to access Swagger:

  1. Open the project’s server URL in your browser.
  2. Append /swagger/ to the URL.

Example: Template docs

Redoc

Redoc provides live API documentation directly from the backend.

How to access Redoc:

  1. Open the project’s server URL in your browser.
  2. Append /swagger/ to the URL.

Example: Template docs


Creating a Profile Using Bruno

Sometimes a project is already running but authentication is not yet implemented in the frontend. In this case, you can create a user profile manually through Firebase and Bruno.

Step 1: Create a User in Firebase

  1. Go to the project’s Firebase Console.
  2. In the left menu, click AuthenticationUsers.
  3. Click the Add User button.
  4. Enter the user’s email and password, then save.

✅ At this point, a user exists in Firebase Authentication. Note the generated UID — you’ll need it in the next step.

Step 2: Create a User in the Database (via Bruno)

  1. Open Bruno.
  2. In the API collection, find the request for creating a user (usually under the users or auth folder).
  3. Send a payload that includes the same email, password, and UID you just created in Firebase.

Note: The exact request or endpoint for creating a user may vary depending on the project. Always check the project’s Bruno collection for the correct endpoint and payload structure. Or ask the project’s techlead

Example payload:

{
"email": "newuser@example.com",
"password": "securepassword123",
"uid": "firebase-generated-uid"
}

✅ Now the user is created both in Firebase Authentication and in our database, and can be used for testing or development.