86 86. Step 12: Run the Application
As of Oct 22, 2026 · Official docs: Next.js
Now that the back end is set up, you can run the Next.js app on your own computer and try every feature. In Classes 10–12, this is (I) Try the app.
86.1 Start the Development Server
Claude starts the app by running this command in the terminal. To start it yourself, type it in VS Code’s terminal, in the task-app folder, and press Enter:
npm run devnpm run runs a script listed in package.json, and dev is the script that starts Next.js’s development server: a web server on your own computer, at the address localhost:3000 (localhost means “this computer”, and 3000 is the port, a numbered door on your computer that the server listens at). It keeps running, and updates the page when the code changes, until you stop it: click in the terminal and press Ctrl+C (Ctrl, not Cmd, also on a Mac).
The packages must already be installed with npm install (Step 2). Then open http://localhost:3000.
86.2 Test Core Functionality
Walk through the main user flow to confirm everything is wired up correctly.
1. Sign up or sign in
- Sign up with an email and a password, or click Login with Google.
- Ensure you’re taken to the dashboard.
- In the Supabase dashboard, Authentication > Users, verify your user was created.
2. Create a task
- From the dashboard, create a new task (title and description).
- Confirm:
- The task appears in your list.
- After a moment, an AI label appears.
- Check the
taskstable in the Supabase Table Editor to see the new row.
3. Attach an image
- Open the task and attach an image.
- Confirm:
- The file appears in the
task-attachmentsbucket (Supabase dashboard, Storage). - The image is displayed in the app.
- The file appears in the
- Try uploading a file that isn’t an image, or one larger than 1 MB, to see the error handling.
4. Upgrade to Premium
- Open your profile page. It shows your current plan and how many tasks you created out of your limit.
- Click Manage Subscription. For a free user, this opens a Stripe-hosted checkout page. Check that the product and price are right.
- Pay with the Stripe test card
4242 4242 4242 4242, any future expiration date (such as 12/34), and any three-digit CVC. No real money moves. - Complete checkout and return to the app.
- Verify that your plan changed to Premium: on the profile page, and in the Supabase Table Editor, where your row in the
profilestable hassubscription_planset topremium.
5. Manage the subscription
- Click Manage Subscription again. For a premium user, it opens Stripe’s customer portal, where a subscriber can manage or cancel the subscription. Look around, then return to the app.
6. Sign out
- On the profile page, click Sign Out.
- Confirm:
- You’re back on the login page.
- Protected pages, such as the dashboard, are no longer accessible without signing in again.
86.3 If Something Fails
Tell Claude exactly what you clicked and what you saw. Claude can read the server output in the terminal, and each Edge Function’s logs are in the Supabase dashboard under Edge Functions.
If creating a task or upgrading fails, open the function’s logs in the Supabase dashboard (Edge Functions) and show Claude what they say. One known fix, which Claude can make with you: for an “Invalid JWT” (401) error, turn off Verify JWT with legacy secret for that function (Edge Functions > the function > Details). This is safe here: the functions check the user’s login themselves. See Step 11.
Practice Questions
Easy
Question 1 · Short answer
What does each of these two commands do?
npm install
npm run devQuestion 2 · Short answer
Once the development server is running, which address do you usually open in your browser? What does localhost in that address mean?
Question 3 · Multiple choice
You reach the Stripe checkout page while testing. What should you enter?
- Your own credit card - the amount is small
- The card number
4242 4242 4242 4242, any future expiry date and any 3-digit CVC - The card number
1234 5678 9012 3456and any past expiry date - Nothing - checkout can’t be tested on
localhost
Question 4 · True or false
Once you have signed in with Google and landed on the dashboard, there is nothing else to check for sign-in.
Question 5 · Short answer
The development server is running in VS Code’s terminal, and you want to stop it. What do you press? Does Maria, on a Mac, press something different?
Medium
Question 6 · Matching
After each test action, where can you confirm in Supabase that it worked? One place on the right is not used.
| Test action | Where to check | |
|---|---|---|
| 1. Sign in with Google | A. The tasks table |
|
| 2. Create a task | B. The storage bucket that holds task images | |
| 3. Upload an image to a task | C. The Users list under Authentication | |
| D. The Google Cloud Console |
Question 7 · Ordering
Put the steps for testing a subscription in the right order:
- A. Enter the test card
4242 4242 4242 4242, a future expiry date and any 3-digit CVC - B. Click “Manage Subscription”
- C. Check that your plan changed to Premium
- D. Confirm you are on a Stripe-hosted checkout page that shows the right product and price
- E. Complete checkout and return to the app
Question 8 · Short answer
What is a protected route, and how would you check that signing out really protects it?
Question 9 · Short answer
Why does the page ask you to try uploading an invalid file type or a very large file on purpose?
Question 10 · Multiple choice
Sam has just upgraded to Premium. He clicks Manage Subscription on his profile page again. What happens?
- He gets a second Stripe checkout page and pays again
- Stripe’s customer portal opens, where he can manage or cancel his subscription
- Nothing: the button works only for free users
- The app signs him out
Hard
Question 11 · Scenario
You create a task. It shows up in your list and as a new row in the tasks table, but even after you refresh the page, no AI label ever appears. Which part of the system is the most likely problem, and what would you check?
Question 12 · Scenario
Checkout on Stripe’s page succeeds and you are sent back to the app, but your plan stays free. Which part of the system is responsible for recording the payment in your database? Name three things you would check.
Question 13 · Long answer
You are “running the app locally”, yet signing in, saving tasks and paying all work. Explain which parts of the system run on your computer and which run somewhere else while you test at http://localhost:3000.