Skip to main content
Follow these guidelines to build better apps faster.

Planning Your App

Start with a Clear Vision

Before opening Kleap:
  1. Define your goal - What problem does this app solve?
  2. List core features - What must it do? (Start with 3-5)
  3. Sketch the flow - How will users navigate?
  4. Identify data - What information needs storing?

Choose the Right Template

Templates give you a head start:
  • SaaS Template - User auth, dashboard, billing
  • Portfolio - Personal sites, portfolios
  • Landing Page - Marketing, product launches
  • E-commerce - Product sales, checkout
Or start blank if you have a unique idea.

Building Incrementally

Small Steps Win

Do this

Build one feature at a time, test it, then add the next

Not this

Try to build everything at once in one long prompt
1

Layout

Header, footer, navigation structure
2

Pages

Create main pages with placeholder content
3

Components

Build reusable components (cards, forms, etc.)
4

Styling

Refine colors, typography, spacing
5

Content

Add real content; enable Kleap Database if you need saved data or logins
6

Functionality

Add interactions, forms, features
7

Polish

Responsive fixes, loading states, error handling

Code Organization

Let AI Follow Conventions

Kleap uses a standard Astro project structure:
Don’t fight this structure. Let AI organize code appropriately.

Component Reusability

Ask for reusable components:
Then reference them:

Styling Guidelines

Consistent Design

Establish design tokens early:

Mobile First

Always consider mobile:

Database Best Practices

Plan Your Schema

Before asking AI to create tables:
  1. List what data you need
  2. Define relationships
  3. Consider what queries you’ll run

Enable Security

Always ask for per-user data access:

Performance Tips

Optimize Images

Kleap optimizes images for you — just use normal <img> tags or Astro’s asset handling. There’s no next/image component.

Keep It Static

Astro renders static HTML by default. Only add interactivity where you actually need it, using React islands.

Add Loading States

Testing Your App

Test as You Build

After each change:
  1. Check the preview
  2. Test on mobile view
  3. Click through the flow
  4. Look for errors in console

Test Edge Cases

  • Empty states (no data)
  • Error states (failed requests)
  • Loading states
  • Long content
  • Many items

Before Publishing

Checklist

  • All pages load without errors
  • Forms work and validate
  • Mobile layout looks good
  • Links and buttons work
  • Images load properly
  • Auth flow works (if applicable)
  • Database queries work
  • Environment variables set

Configuration & Secrets

Kleap sites are static, so any value baked into the site is public. Use Astro build-time config for non-secret values only:
Never put a real secret (a private API key, token, or password) in a static site — it ships to the browser. Secrets belong in an external backend or serverless function. For payments use Stripe payment links (publishable key only); for form emails use built-in Forms.

Common Mistakes to Avoid

Break large features into smaller prompts. Test after each change.
Always test mobile view. Many users browse on phones.
Use database or props instead of hardcoded content for dynamic data.
Always handle what happens when things fail (no data, API errors).
Templates save hours of work. Start with one when possible.

Getting Help

When stuck:
  1. Check the docs - Answer might be here
  2. Ask AI to explain - “Why isn’t this working?”
  3. Use version history - Roll back if needed
  4. Join Discord - Community can help

Troubleshooting

Solutions to common problems