Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions test-apps/01-streamlit-ui/.streamlit/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[theme]
primaryColor = "#1f77b4"
backgroundColor = "#ffffff"
secondaryBackgroundColor = "#f0f2f6"
textColor = "#262730"
font = "sans serif"

[server]
headless = true
port = 8501
enableCORS = false
enableXsrfProtection = true

[browser]
gatherUsageStats = false
85 changes: 85 additions & 0 deletions test-apps/01-streamlit-ui/DEPLOYMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Streamlit UI Deployment Guide

## 🚀 Deploy to Streamlit Community Cloud

This interactive RBAC Algorithm validator is ready to deploy!

### Quick Deploy Steps

1. **Visit Streamlit Cloud**
- Go to https://share.streamlit.io
- Sign in with your GitHub account

2. **Create New App**
- Click "New app" button
- Repository: `Maneesh-Relanto/RBAC-algorithm`
- Branch: `main` (or your preferred branch)
- Main file path: `test-apps/01-streamlit-ui/app.py`
- App URL: Choose your custom subdomain

3. **Deploy**
- Click "Deploy"
- Wait 2-3 minutes for initial deployment
- Your app will be live at: `https://[your-app-name].streamlit.app`

### Files for Deployment

✅ `app.py` - Main Streamlit application (722 lines)
✅ `requirements.txt` - Dependencies (streamlit + rbac library)
✅ `.streamlit/config.toml` - Configuration and theming
✅ `README.md` - Documentation

### What Users Can Do

- 👥 Create and manage users
- 🔑 Create and assign roles
- 🛡️ Define permissions and test authorization
- 📊 View permissions matrix
- 🔍 Real-time RBAC validation
- 🎯 Interactive testing without any data persistence

### Security Notes

- ✅ **Safe**: In-memory storage only (resets on refresh)
- ✅ **No Authentication**: Public demo, no login required
- ✅ **No Data Storage**: All changes are temporary
- ✅ **Read-only Library**: Uses RBAC library in demo mode

### Post-Deployment

1. **Add to GitHub Pages**
```html
<a href="https://your-app.streamlit.app" class="btn btn-primary">
🚀 Try Interactive Demo
</a>
```

2. **Add to README.md**
```markdown
## 🎮 Live Demo

Try the interactive RBAC validator: [Launch Demo](https://your-app.streamlit.app)
```

3. **Share URL**
- Update documentation with live demo link
- Add badge to README
- Include in PyPI package description

### Monitoring

- **Streamlit Cloud Dashboard**: Monitor app health and usage
- **Logs**: View real-time logs in Streamlit Cloud console
- **Analytics**: Track visitor count and usage patterns

### Updating

- Push changes to GitHub
- Streamlit Cloud auto-deploys from the branch
- Changes go live automatically after push

---

**Need Help?**
- Streamlit Docs: https://docs.streamlit.io/streamlit-community-cloud
- Support: https://discuss.streamlit.io
1 change: 1 addition & 0 deletions test-apps/01-streamlit-ui/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
streamlit>=1.28.0
../.. # Install the RBAC library from the repository root
Loading