Skip to main content

What We’re Building

In this tutorial, we’ll create a Weather Dashboard that:
  • Shows current weather for a city
  • Displays a 5-day forecast
  • Lets users search for different locations
This will introduce you to Constants’ core features including prompting and iteration.

Prerequisites

  • A Constants account (sign up here)
  • About 10 minutes of your time

Step 1: Start with a Clear Prompt

From your dashboard, click Create new App. In the prompt input, enter:
Create a weather dashboard app. It should:
- Have a search box where users can enter a city name
- Display the current temperature, conditions, and humidity
- Show a 5-day forecast with high/low temperatures
- Use a clean, modern design with weather icons
Notice how we’re specific about the features we want. This helps Constants generate exactly what you need.

Step 2: Watch Generation

Click Generate and watch as Constants builds your app. You’ll see:
  1. Analyzing - Constants understands your requirements
  2. Generating - The app code is being written
  3. Complete - Your app is ready!
The entire process typically takes 30-60 seconds.

Step 3: Explore Your App

Once generated, you’ll see your Weather Dashboard. Try it out:
  1. Enter a city name in the search box
  2. Click search or press Enter
  3. View the current conditions and forecast
The weather data is simulated by default. For real weather data, you can describe that in your prompt and Constants will handle the integration.

Step 4: Modify Your App

Let’s make some improvements. Click Modify and enter:
Add a dark mode toggle in the top right corner. Also add 
the current date and time below the city name.
Constants will update your app with the new features while preserving everything that was already working.

Step 5: Save and Access Later

Your Worker is automatically saved to My Apps. You can:
  • Run it anytime from your dashboard
  • Modify it with new instructions
  • Export it to GitHub for further development
  • Share it with others via a unique link

Understanding the Interface

Executes your Worker and displays the output. Each run uses compute resources, so you’ll see a brief loading state.
Opens a prompt input where you can describe changes. Constants will update your app accordingly.
See the generated Python code. This is helpful for learning or if you want to export and modify it yourself.
Push your Worker to a GitHub repository. You’ll need to connect your GitHub account first.

Best Practices

Start Simple

Begin with core functionality, then add features through modifications. This leads to better results than complex initial prompts.

Be Descriptive

Use specific terms and describe the user experience you want. “Clean design” is good, but “minimal white background with subtle shadows” is better.

Iterate Often

Don’t try to get everything perfect in one prompt. Use the modify feature to refine your app step by step.

Check the Code

Looking at generated code helps you understand what’s possible and can inform better prompts.

Next Steps

Now that you’ve built your first app, explore more: