A Streamlit-based web application for handling DMAP SaaS offering cloud resource requests. This application collects user information, creates a GitHub branch, and updates terraform configuration with user details.
- User-friendly web form for collecting resource request information
- Automatic GitHub branch creation with standardized naming convention
- Terraform variables update automation
- Email notification system for administrators
- Environment variable based configuration
- Secure credential management
- Python 3.8 or higher
- GitHub Personal Access Token with repository access
- SMTP-enabled email account for notifications
-
Clone the repository:
git clone https://github.com/yourusername/DMAP-saas-user.git cd DMAP-saas-user
-
Install dependencies:
pip install -r requirements.txt
-
Set up environment variables:
cp .env.example .env
Edit
.env
file with your credentials:SENDER_EMAIL=your-email@example.com SENDER_PASSWORD=your-email-password ADMIN_EMAIL=admin@example.com GITHUB_TOKEN=your-github-pat-token
-
Start the Streamlit application:
streamlit run main.py
-
Fill out the resource request form with:
- Full Name
- Office Email
- Phone Number (optional)
- Company Name
- Designation
-
Submit the form to:
- Send an email notification to administrators
- Create a new GitHub branch (format:
firstname-lastname-saas-offer-terraform
) - Update terraform variables with user information
The application automatically creates GitHub branches following this format:
- Input: "John Peter"
- Output: "john-peter-saas-offer-terraform"
Features:
- Converts to lowercase
- Replaces spaces with hyphens
- Removes special characters
- Ensures GitHub naming compliance
- Store sensitive credentials in
.env
file - Never commit
.env
file to version control - Use fine-grained GitHub PAT with minimal permissions
- Regularly rotate credentials
- Environment variable validation on startup
DMAP-saas-user/
├── main.py # Main application file
├── requirements.txt # Python dependencies
├── .env.example # Environment variables template
├── .gitignore # Git ignore rules
└── README.md # This file
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request