CMU 15-113: Effective Coding with AI
Goal: Build a mobile app capable of running on an actual phone or simulator. You'll use React Native with Expo, a framework that lets you build real iOS and Android apps using JavaScript. To do this assignment successfully in a reasonable amount of time, you must leverage AI thoughtfully. We strongly recommend an agentic workflow similar to what you did in HW8. By the end of this assignment, you'll be able to show off a real app that you created.
Why This Matters: Mobile apps are everywhere, and "I built a mobile app" is one of the most impressive things you can put on a portfolio. Mobile development has traditionally had a very steep learning curve, including specialized languages and complex build tools that differ between Android and iOS. After setting up your environment, using AI tools and React Native with Expo will allow you to build a working app on your phone in as little as an hour. This is still a challenging project, however, and you will be unlikely to succeed unless you practice attention to detail and use the strategies you have learned in class so far.
Examples of what you might build:
You're welcome to come up with your own idea! The key is that it should be something you'd actually want on your phone as more than just a webpage or webapp, and something you'd be excited to show other people. Start simple for this assignment! If you have a bigger idea, that could be a perfect choice for your capstone project.
npm install, and then npx expo start. (More info on these commands below.)prompt_log.txt or prompt_log.md): Which AI tools you used, and the key prompts that shaped your work. Remember, share your actual prompts, verbatim, and not just summaries (AI generated or otherwise).For this assignment, we especially want to see prompts where you asked AI to explain React Native concepts—not just "build me a screen," but "what does useState do?" or "why do I need SafeAreaView?"| Grade | (Roughly) What We're Looking For |
|---|---|
| A (90-100) | App can be demoed and has at least 2 screens with navigation, meaningful user input, and data persistence. Looks intentional and polished. Clean README and prompt log that meet the assignment specifications and show learning (asking AI to explain, not just generate). Evidence of 3-4 hours of effort and some creativity in the concept. Video clearly demonstrates the app. |
| B (80-89) | App runs and has most core features working (screens, input, persistence). Functional but may look rough around the edges. README and prompt log present but less detailed. Video might be a little unclear. |
| C (70-79) | App runs but may be missing one core feature (e.g., no persistence, or only one screen). Basic README, prompt log, and video. Limited evidence of the learning process. |
| Below C | App does not run, or submission is incomplete. |
Follow these steps in order, and read carefully. Each one builds on the last, and this sequence is designed to minimize the time you spend stuck. If any step takes significantly longer than the time listed, please ask on Ed or come to office hours!
If you're on a Mac, you'll need to install XCode on your laptop from the App Store, and this may take about an hour to download. You should start doing that right now.
For Android:Search for "Expo Go" in the Google Play Store and install it. Alternatively you can download a beta version of the Expo Go app if you wish to use the very latest version, but we don't recommend this since you'll probably have to unlock dev options on your phone.
For Everyone:You need Node.js on your computer, and an AI-enabled code editor (you probably already have VS Code or Cursor).
node --version in your terminal. You should see a version number (18 or higher).npx create-expo-app@latest --template default@sdk-54npx expo start in your terminal, it will take a moment to load, and then it will show a QR code in your terminal. If you are developing on an Android phone: Make sure your phone is on the same wifi network. Scan the code with your phone camera or the Expo Go app (Android). You should see a default "Welcome to Expo" screen appear on your phone. If you are developing on an iPhone sim: As long as you have XCode and the simulator installed, you should be able to press 'i' to open the simulator with your app.npm run reset-project since this will remove the demo code.s to switch to Expo Go, then try pressing shift+t to switch the connection to tunnel mode. Ask on Ed if you're stuck—this is a common setup hiccup.
Before you reset the project and start building, spend a few minutes getting oriented. Open the App.js (or App.tsx) file that was generated and ask AI some questions:
View different from a div?"useState hook."Try making a small change to the app, like changing the text or a color, and watch it update on your phone in real time. (If it does not update immediately, you can go to your terminal and press 'r' to reload the app.)
Before you write any code, review the agentic process you used in HW8. If you choose to use an agentic process for this assignment (which we recommend), write a detailed specification for your app in a file called SPEC.md. This is the most important step. As before, write this spec yourself and be thorough. This will help ensure that the app matches your vision and works well.
Keep your app idea simple: two screens, one or two key interactions, and one type of data to persist is plenty.
Assuming you use an agentic process (which is a very good idea) you'll now hand your spec to your agent of choice (Copilot, Claude Code, Cursor, etc.) and let it build. Refer to HW8 for guidance on the agentic process.
SPEC.md into the project folder, add the folder to Github (in Github Desktop, click the current repository, click add, and click "add existing repository", and select your project folder) and make your first commit and push. Verify that you can see the app on github.com before proceeding.You might want to set your Agent to its most powerful setting for this step (bearing your usage limits in mind). Give your agent a prompt like this (adapt it to your actual spec):
Read SPEC.md in this project. Implement the full mobile app exactly as specified. Create all necessary files, components, and navigation. Make sure that appropriate data is persistent. Avoid security risks for sensitive data. Include proper error handling. Make sure the app starts without errors and displays the home screen correctly.
npx expo start (or press 'r' to refresh the app if it is already running) and test the app on your phone."Raw agentic build output". Don't fix anything before that commit. We want to see what the agent produced.Give this new agent a prompt like:
Review the React Native/Expo code in this project against the spec in SPEC.md. For each acceptance criterion in the spec, verify whether the code actually implements it correctly. Also check for: - Bugs or logic errors - Missing error handling - Code quality issues (unclear naming, repeated code, etc.) - Best practices for React Native or other technologies Format your review as a numbered list of findings, each marked as [PASS], [FAIL], or [WARN]. Be specific. Reference file names and line numbers. Export the review as REVIEW.md at the root of the project.
"Fixes after AI review".With the core features working, now polish your app:
"Polish and final adjustments".Write your README and prompt log, record your video, add the project to your portfolio, push to GitHub, and fill out the Google form.
For the video, the easiest approach is to screen-record your phone or simulator, or to simply record your phone screen with another device. Walk through each screen, show the user interactions, and demonstrate data persistence.
Important: Your prompt log should include actual prompts, verbatim. Some recommended examples include:
Here's a reference for the new concepts in this assignment. AI will help you with all of these, but it's useful to know what you're working with.
<div> and <p>, you use <View> and <Text>.View (a container, like a <div>), Text (displays text), TextInput (text field), Button (a button), FlatList (a scrollable list), Image (displays images), etc.useState): The way React Native tracks data that can change. When state updates, the screen automatically re-renders to reflect the new data. Example: const [count, setCount] = useState(0); creates a count variable and a setCount function to update it.<Text style={{color: 'red'}}>Hello</Text>, style is a prop being passed to the Text component.localStorage in web browsers. Data survives app restarts.npx expo start. Also try shaking your phone in Expo Go to access the developer menu, where you can reload the app.shift+t in the Expo terminal. On campus, use CMU-SECURE.node_modules folder and package-lock.json file, then running npm install again. If that doesn't work, ask on Ed with the exact error message.