|
|
|
|
|
import streamlit as st |
|
import os |
|
from landing import show_landing |
|
from dashboard.logs import show_logs |
|
from agent_manager import AgentManager |
|
from stripe_checkout import create_stripe_session |
|
|
|
st.set_page_config(page_title="AutoExec AI", layout="wide") |
|
|
|
|
|
mode = st.query_params.get("mode", ["app"])[0] |
|
|
|
|
|
st.sidebar.header("AutoExec AI") |
|
selection = st.sidebar.radio( |
|
"Go to", |
|
["π Home", "π Launch", "π Logs", "βοΈ Settings"], |
|
index=0 if mode in ("app", "landing") else None |
|
) |
|
|
|
|
|
if mode == "landing" or selection == "π Home": |
|
show_landing() |
|
|
|
|
|
elif selection == "π Launch": |
|
st.header("π Launch a New AI Business") |
|
niche = st.text_input("Niche (e.g. fitness)") |
|
business_type = st.selectbox("Business Type", ["Dropshipping", "Print-on-Demand", "Newsletter", "Course"]) |
|
if st.button("Generate & Deploy"): |
|
manager = AgentManager(niche, business_type) |
|
result = manager.run_all() |
|
st.success("β
Business Launched!") |
|
st.json(result) |
|
|
|
|
|
elif selection == "π Logs": |
|
show_logs() |
|
|
|
|
|
elif selection == "βοΈ Settings": |
|
st.header("βοΈ Settings & Billing") |
|
if st.button("Create Stripe Checkout Session"): |
|
url = create_stripe_session() |
|
st.markdown(f"[Pay & Activate]({url})") |
|
st.markdown( |
|
""" |
|
**Secrets in use**: |
|
- `OPENAI_API_KEY` |
|
- `GEMINI_API_KEY` |
|
- `STRIPE_API_KEY` |
|
- `API_KEY` (for protected API routes) |
|
""" |
|
) |
|
|