Skip to content

Commit 56dd9dc

Browse files
authored
docs: Add setup guide for UI and authenticated endpoints (#78)
1 parent 0e940a3 commit 56dd9dc

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,21 @@ You can start developing by editing the files inside the **app** directory. This
104104
```bash
105105
uvicorn main:app --reload
106106
```
107-
107+
#### Proof-of-Concept UI (Streamlit)
108+
109+
This project includes a Streamlit UI for demonstration purposes, available on the `ui-poc` branch.
110+
111+
1. **Switch Branch**: Ensure you are on the `ui-poc` branch (`git checkout ui-poc`).
112+
2. **Start Backend**: Make sure the backend server is running.
113+
3. **Install Dependencies**: Navigate to the UI directory and install its requirements:
114+
```bash
115+
cd ui
116+
pip install -r requirements.txt
117+
```
118+
4. **Run UI**: Start the Streamlit app:
119+
```bash
120+
streamlit run app.py
121+
```
108122
## 📱 Features in Detail
109123

110124
### Authentication & Security

backend/README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,17 @@ The following authentication endpoints are available:
4747
- `POST /auth/password/reset/request` - Request password reset
4848
- `POST /auth/password/reset/confirm` - Confirm password reset
4949

50+
### Using Authenticated Endpoints
51+
52+
To test protected endpoints that require a user to be logged in, follow these steps:
53+
54+
1. **Sign Up**: Create a user account using the `POST /auth/signup/email` endpoint.
55+
2. **Log In**: Use the `POST /auth/login/email` endpoint with the same credentials.
56+
3. **Copy Token**: From the successful login response, copy the `access_token` value.
57+
4. **Authorize**: In the FastAPI docs (`/docs`), click the top-right "Authorize" button. In the popup, paste your token in the format `Bearer <your_token>`.
58+
5. **Test**: You can now successfully test any protected endpoint (e.g., `GET /users/me`).
59+
60+
5061
## Database
5162

5263
The application uses MongoDB for data storage. Make sure MongoDB is running and accessible via the connection string in your `.env` file.

0 commit comments

Comments
 (0)