Complete Walkthrough: Streamlit App with GitHub.dev (No IDE Required)
Step 1: Create a GitHub Account
- Go to https://github.com
- Click “Sign up” (top right)
- Enter your email address
- Create a password and username (e.g.,
john-student-2025
) - Verify you’re human
- Check your email and enter the verification code
- Click “Create account”
- You can skip the personalization questions or answer them
Step 2: Create a New Repository
- After logging in, click the green “New” button (top left, or go to https://github.com/new)
- Fill in the details:
- Choose a Repository name: for instance
my-streamlit-app
(no spaces!) - Description: “A Streamlit data visualization app”
- Select “Public” (required for free Streamlit deployment)
- ✅ Check “Add a README file”
- Click “Create repository”
- Choose a Repository name: for instance
Step 3: Open GitHub.dev (Web-Based Editor)
- You’re now on your repository page:
https://github.com/YOUR-USERNAME/my-streamlit-app
(change the last part of the URL to your repo name if different) - Press the
.
key (period/dot) on your keyboard- OR change
.com
to.dev
in the URL:https://github.dev/YOUR-USERNAME/my-streamlit-app
- OR change
- A VS Code-like editor opens in your browser!
This is where you are going to edit your code.
Everytime you edit your code you need to save it and commit it to github. Then wait a few seconds and your app will be deployed with the changes you made.
Step 4: Create Your Data File
- In the left sidebar (Explorer), click the “New File” icon (📄+ symbol)
- Name it:
data.csv
- Paste this sample data:
Month,Sales,Expenses
January,12000,8000
February,15000,9000
March,13000,8500
April,17000,10000
May,19000,11000
June,21000,12000
- Press
Ctrl+S
(Windows) orCmd+S
(Mac) to save
Step 5: Create requirements.txt
- Click “New File” again
- Name it:
requirements.txt
- Add this content:
streamlit
pandas
plotly
- Press
Ctrl+S
/Cmd+S
to save
Step 6: Create Your Streamlit App
- Click “New File” again
- Name it:
app.py
- Paste this complete code:
import streamlit as st
import pandas as pd
import plotly.express as px
# Page configuration
st.set_page_config(page_title="Sales Dashboard", page_icon="📊", layout="wide")
# Title
st.title("📊 Monthly Sales Dashboard")
st.markdown("---")
# Load data
@st.cache_data
def load_data():
df = pd.read_csv('data.csv')
return df
df = load_data()
# Display the data
st.subheader("📋 Raw Data")
st.dataframe(df, use_container_width=True)
st.markdown("---")
# Create two columns
col1, col2 = st.columns(2)
with col1:
st.subheader("📈 Sales vs Expenses")
fig1 = px.line(df, x='Month', y=['Sales', 'Expenses'],
title='Monthly Trend',
markers=True)
st.plotly_chart(fig1, use_container_width=True)
with col2:
st.subheader("💰 Profit Analysis")
df['Profit'] = df['Sales'] - df['Expenses']
fig2 = px.bar(df, x='Month', y='Profit',
title='Monthly Profit',
color='Profit',
color_continuous_scale='RdYlGn')
st.plotly_chart(fig2, use_container_width=True)
# Interactive filters
st.markdown("---")
st.subheader("🔍 Filter Data")
selected_month = st.selectbox("Select a month:", df['Month'].tolist())
month_data = df[df['Month'] == selected_month].iloc[0]
st.metric("Sales", f"${month_data['Sales']:,}")
st.metric("Expenses", f"${month_data['Expenses']:,}")
st.metric("Profit", f"${month_data['Profit']:,}")
- Press
Ctrl+S
/Cmd+S
to save
Step 7: Commit and Push Your Code to GitHub
- Click the Source Control icon in the left sidebar (looks like a branch/fork symbol, usually 3rd icon)
- You’ll see 3 files listed as changes
- In the text box at the top (says “Message”), type:
Initial commit - Streamlit app
- Click the ✓ Commit & Push button (or the dropdown arrow and select “Commit & Push”)
- If asked to stage changes, click “Yes” or “Always”
- Your code is now on GitHub!
Step 8: Verify Files on GitHub
- Go back to your repository:
https://github.com/YOUR-USERNAME/my-streamlit-app
- You should see 4 files:
README.md
app.py
data.csv
requirements.txt
Step 9: Create Streamlit Cloud Account
- Go to https://share.streamlit.io
- Click “Sign up”
- Click “Continue with GitHub”
- Log in to GitHub if prompted
- Click “Authorize streamlit” to allow Streamlit to access your repositories
Step 10: Deploy Your App
- On Streamlit Cloud, click “New app”
- Fill in the deployment form:
- Repository: Select
YOUR-USERNAME/my-streamlit-app
- Branch:
main
(should be default) - Main file path:
app.py
- Repository: Select
- Click “Deploy!”
- Wait 2-3 minutes while your app builds
- You’ll see logs scrolling - this is normal!
Step 11: Your App is Live! 🎉
- Once deployment completes, your app will automatically open
- Your app URL will be:
https://YOUR-USERNAME-my-streamlit-app-app-RANDOM.streamlit.app
- You can share this URL with anyone!
What you’ll see:
- A dashboard with your sales data
- Interactive line and bar charts
- A dropdown to filter by month
- Metrics updating based on selection
Step 12: Making Changes Later
To update your app:
- Go to
https://github.dev/YOUR-USERNAME/my-streamlit-app
- Edit
app.py
ordata.csv
- Save the file (
Ctrl+S
/Cmd+S
) - Click Source Control icon
- Type a commit message (e.g., “Updated data” or “Added new chart”)
- Click Commit & Push
- Streamlit Cloud will automatically redeploy your app in 1-2 minutes!
Troubleshooting
App won’t deploy?
- Check that repository is Public
- Verify all 3 files exist:
app.py
,data.csv
,requirements.txt
- Look at the deployment logs for error messages
Can’t push code?
- Make sure you’re signed into GitHub in github.dev
- Try refreshing the page and committing again
App crashes?
- Check the logs in Streamlit Cloud
- Most common issue: typo in
app.py
or missing file
Summary of What Students Created
✅ GitHub account and public repository ✅ Web-based code editor (github.dev) ✅ CSV data file ✅ Python Streamlit app with interactive visualizations ✅ Deployed live web application ✅ Shareable URL for their project
All without installing anything on their computer!