Grading (100 points)

Each app is worth 25 points, and your Capstone page is worth 25.

What is gradedPoints
Each app (25 points, three apps = 75)
Runs locally with no errors, has the required files, and has at least 3 HTML pages linked by a main navigation bar6
Works when visited on Render6
README explains the app and exactly how you used AI, with your prompts5
Its own GitHub repository, synced, with at least 3 commits4
Your own idea, with at least one feature that responds to the user4
Capstone page (25 points)
All three apps added, each with live link, code link, screenshot, and description15
Page made public, with a headline in your profile5
Page address submitted on Canvas5

What every app needs

Each app lives in its own folder, with its own GitHub repository and its own Render site. Each one must have:

Every app uses this folder layout. The files marked optional are up to you.

my-tip-calculator/
    app.py                the Flask app: routes and logic
    requirements.txt      the packages Render installs
    .gitignore            files that never go to GitHub
    README.md             what the app is and how you used AI
    templates/
        base.html         the layout: navigation bar, footer, {% block content %}
        index.html        the home page, extends base.html
        page1.html        a second page, extends base.html
        page2.html        a third page, extends base.html
    static/               optional: style.css, images
    data/                 optional: .json or .csv files the app reads

Name the page files after what they show (results.html, history.html), not page1 and page2.

Part 1. Set up your computer and accounts (one time)

You probably have most of this from earlier labs. Skip anything you already have.

  1. Python. Install it from python.org/downloads. On Windows, check Add python.exe to PATH on the first screen of the installer.
  2. Git. Install it from git-scm.com/downloads. The default choice on every screen is fine.
  3. VS Code. Install it from code.visualstudio.com.
  4. The Python extension. In VS Code, click the Extensions icon on the left (four squares), search for Python, and install the one by Microsoft.
  5. Check them. In VS Code, open Terminal, then New Terminal, and run these. Each should print a version number (on a Mac, type python3):
    python --version
    git --version
  6. Tell Git who you are, with your own name and the email you use for GitHub:
    git config --global user.name "Your Name"
    git config --global user.email "[email protected]"
  7. A GitHub account at github.com. Pick a professional username; employers may see it.
  8. A Render account. Go to render.com, click Get Started, and sign up with GitHub, so one login works for both.
  9. A ChatGPT or Claude account, free, at chatgpt.com or claude.ai.
  10. A projects folder. Make a folder named capstone in your OneDrive (or Documents). All three apps go inside it, each in its own folder.

Part 2. Plan your apps and prompt the AI

Use ChatGPT or Claude as a helper for each app, in a different way each time, so you practice three kinds of prompting:

AppYour idea (examples)Use the AI to
App 1Timesheet, to do list, reading logGenerate the whole starting structure: files, folders, and routes
App 2Tip calculator, unit converter, recipe scalerWrite one Python function that does the app's main calculation
App 3Simple blog, club page, travel request formWrite the HTML templates: the layout with a navigation bar, and the pages

Start every app with this prompt

Copy it into ChatGPT or Claude and replace the part in brackets. The details at the end make the app run on Render with no changes.

I am a beginner learning Python and Flask. Build a small Flask app:
[describe your app in 2 or 3 sentences: what it does, who uses it,
and what the user can type in or click].

Requirements:
- app.py with app = Flask(__name__) and one route per page
- templates/base.html with a main navigation bar linking every page
  and a footer; every other page extends it with {% block content %}
- at least 3 HTML pages: index.html plus at least two more
- at least one HTML form that the app processes and responds to
- Bootstrap 5 from a CDN for styling, no other frameworks
- no database: keep data in a Python list or read it from a JSON file
- requirements.txt containing Flask and gunicorn
- end app.py with: if __name__ == "__main__": app.run(debug=True)

Show every file with its full path, and explain each file in one
or two sentences.

Then use follow up prompts to shape it, for example:

Rules for using AI

What your README needs

Replace the README's contents with these headings, filled in:

# Tip Calculator
Live site: https://your-app.onrender.com

## What it does
Two or three sentences, and who would use it.

## How I used AI
Which tool I used, the prompts I gave it (copied here), what it got
right, and what I had to fix or change myself.

## How to run it
pip install -r requirements.txt
python app.py

Part 3. Build and run your first app in VS Code

Make the folder and open it

  1. Inside your capstone folder, make a folder for the app. Use lowercase letters and dashes, like tip-calculator. This name becomes your GitHub repository's name.
  2. In VS Code, choose File, then Open Folder, and pick that folder. If VS Code asks whether you trust the authors, click Yes.

Add the files

  1. In the Explorer on the left, hover over the folder name and use the New File and New Folder icons to make each file the AI gave you, with exactly the same name and path (for example, a templates folder with base.html inside it). Paste each file's code in and save (Ctrl + S).
  2. Make sure requirements.txt holds exactly these two lines (replace what the AI wrote):
    Flask==3.1.3
    gunicorn==26.2.0
  3. Make a file named .gitignore (with the dot) holding these lines. It keeps your environment and secrets off GitHub:
    .venv/
    venv/
    __pycache__/
    .env
  4. Check app.py: it must contain the line app = Flask(__name__), with the variable named app. Render looks for that exact name.

Set up the Python environment

A virtual environment is a private copy of Python for this one app, with Flask installed in it. Each app gets its own.

  1. Press Ctrl + Shift + P (Cmd + Shift + P on a Mac) to open the Command Palette.
  2. Type Python: Create Environment and press Enter. Choose Venv, then your Python version.
  3. When asked about dependencies, check requirements.txt and click OK. Wait for it to finish. A .venv folder appears.

Run it

  1. Open app.py and click the Run Python File button (the triangle at the top right).
  2. The terminal shows Running on http://127.0.0.1:5000. Hold Ctrl and click it to open your app in the browser.
  3. While it runs, saving a change to a .py file restarts the app by itself. Refresh the browser to see it. Changes to an HTML file show with a refresh.
  4. To stop the app, click in the terminal and press Ctrl + C.

Got an error? Copy the whole red message from the terminal into the AI with the prompt from Part 2, or see Troubleshooting.

Part 4. Test your app

With the app running, go through this list in the browser. Fix anything that fails before moving on: it is much easier to fix now than after it is on Render.

If the app saves data while it runs (an added task, a new post), know that on Render's free tier it is lost whenever the app restarts. That is fine for this project; mention it in your README.

Part 5. Publish the app to GitHub

VS Code can create the GitHub repository and upload your app in one step. Do this once per app.

  1. Stop the app (Ctrl + C in the terminal) and save all files (File, then Save All).
  2. Check that .gitignore exists (Part 3, step 5). Without it, the large .venv folder gets uploaded.
  3. Click the Source Control icon on the left (Ctrl + Shift + G).
  4. Click Publish to GitHub. (If you see Initialize Repository instead, click it, then type a message such as First version in the box, click Commit, and choose Yes if asked to stage all changes. The button then reads Publish Branch: click it.)
  5. If VS Code asks to sign in to GitHub, click Allow and sign in in the browser, then return to VS Code.
  6. Choose Publish to GitHub public repository. The name it suggests is your folder's name; keep it.
  7. If it lists files to include, check that .venv is not checked, then click OK.
  8. When it finishes, click Open on GitHub (or go to github.com, then your repositories). Your files should be there, without a .venv folder.

The repository must be public, so Render and your instructor can see it.

Part 6. Deploy the app on Render

Render copies your app from GitHub, installs Flask, and runs it at an address like https://tip-calculator-ab12.onrender.com. Do this once per app.

  1. Go to dashboard.render.com and sign in with GitHub.
  2. Click New, then Web Service.
  3. Under source code, choose GitHub and pick the app's repository. If it isn't listed, click Configure GitHub, give Render access to that repository, save, and come back.
  4. Fill in the settings:
    SettingValue
    NameThe app's name, like tip-calculator (it becomes part of the address)
    LanguagePython 3
    Branchmain
    Root Directoryleave empty
    Build Commandpip install -r requirements.txt
    Start Commandgunicorn app:app
    Instance TypeFree
  5. Click Deploy Web Service. Render shows a log while it builds; it takes 2 to 5 minutes.
  6. When the log says Your service is live, click the address at the top of the page and test the app again with the Part 4 list.
  7. Copy the address into your README's Live site line, then commit and sync (Part 7).

Render's labels change from time to time; pick the closest match. Things to know about the free tier:

Part 7. Repeat for apps 2 and 3, and save changes

Apps 2 and 3

Repeat Parts 2 through 6 for each app, starting from a new folder opened in VS Code (File, then Open Folder). Never put one app inside another app's folder: each needs its own .venv, its own repository, and its own Render service. When you finish you will have three folders, three GitHub repositories, and three Render addresses.

Saving changes after the first upload

Every time you finish a change, commit and sync. Render redeploys by itself.

  1. Save your files and click Source Control (Ctrl + Shift + G).
  2. Type a short message about what changed, such as Add results page.
  3. Click Commit. If asked to stage all changes, choose Yes (or Always).
  4. Click Sync Changes.
  5. Check that the change shows on GitHub, and a few minutes later on your Render site.

Commit often. Each app needs at least 3 commits, and small commits make it easy to undo a mistake.

Part 8. Add your apps to your Capstone page

The class site gives you a Capstone page to showcase your work. You need an authenticator app on your phone (Google Authenticator, Microsoft Authenticator, or Authy) and the join code given in class.

Take a screenshot of each app

  1. Open the app's Render address and go to its best looking page.
  2. Windows: press Windows + Shift + S, drag a box around the page, click the notice that appears, and save the picture. Mac: press Cmd + Shift + 4 and drag a box.

Sign in

  1. Open Capstone Projects (in the menu: Python, then Capstone Projects, just under CIS 2020).
  2. Click Student sign in, enter your email, and click Email me a sign in link. There is no password.
  3. Open the email, click the link, then click Continue. The link works once and expires after 15 minutes.
  4. First time only: enter your name, scan the QR code with your authenticator app, type the 6 digit code it shows, and click Verify & Finish Setup. Every time after: type the current code and click Verify.

Join your course

  1. On My Capstone, find the My courses box, type the join code, and click Join. Capitals and the dash don't matter. You only do this once.

Add each app

  1. Click Add a project and fill in the form:
    BoxWhat to enter
    CourseYour CIS 2020 course
    Project titleThe app's name
    One line summaryOne sentence for the project card
    Live project linkThe app's Render address
    Code linkThe app's GitHub repository address
    DescriptionWhat the app does, who it is for, how you used AI, and one thing you learned
    ScreenshotThat app's screenshot
  2. Click Save project. Repeat steps 8 and 9 for the other two apps.

Finish your page

  1. Click My profile and add a headline (for example, CIS student at CSU Stanislaus). A photo, About me, and LinkedIn are optional.
  2. Click Make public. Your page starts private, visible only to you and your instructor.
  3. Click View my page. Your three apps show as cards, and each opens to its full details.

What to submit

Submit one thing on Canvas: the address of your Capstone page. Click View my page and copy the address from your browser. It looks like https://www.cruzjohal.com/capstone/u/your-name.

Before you submit, check it:

  • Open the address in a private browser window. Your page loads, so it is public.
  • All three apps are on it, each with a screenshot.
  • Each app's live link opens the working app (allow up to a minute for it to wake).
  • Each app's code link opens a public GitHub repository with a README that explains your use of AI.

Troubleshooting

What you seeWhat to do
python is not recognized (Windows)Run the Python installer again, choose Modify, turn on adding Python to the PATH, then close and reopen VS Code.
No module named flaskVS Code is using the wrong Python. Press Ctrl + Shift + P, run Python: Select Interpreter, and pick the one that says .venv.
running scripts is disabled on this systemClick the arrow beside the + on the terminal panel, choose Command Prompt, and use that terminal.
TemplateNotFound: index.htmlThe HTML files must be inside a folder named exactly templates, next to app.py.
Address already in useThe app is already running in another terminal. Stop it with Ctrl + C, or close that terminal.
Render: Failed to find attribute 'app'The Start Command must be gunicorn app:app, and app.py must contain app = Flask(__name__).
Render: No module named ...That package is missing from requirements.txt. Add it, then commit and sync.
Render: the build failsOpen the Logs tab and read the first red line. Paste it into the AI with your question.
My change doesn't show on RenderCommit and sync it, then wait a few minutes. Check the Events tab on Render.
The Render page takes a minute to loadNormal on the free tier: the app was asleep.
The sign in link says it expiredRequest a new one from the sign in page. It works once, for 15 minutes.
Add a project is missingEnter your class's join code in the My courses box first.

Try a quick idea in the Python Playground · Back to CIS 2020