awel 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/README.md +8 -0
  2. package/README.zh-CN.md +8 -0
  3. package/dist/cli/agent.d.ts +2 -1
  4. package/dist/cli/agent.js +3 -2
  5. package/dist/cli/awel-config.d.ts +10 -0
  6. package/dist/cli/awel-config.js +28 -0
  7. package/dist/cli/babel-setup.js +2 -19
  8. package/dist/cli/create.d.ts +1 -0
  9. package/dist/cli/create.js +136 -0
  10. package/dist/cli/index.js +60 -4
  11. package/dist/cli/onboarding.d.ts +1 -0
  12. package/dist/cli/onboarding.js +58 -0
  13. package/dist/cli/providers/registry.d.ts +12 -0
  14. package/dist/cli/providers/registry.js +41 -0
  15. package/dist/cli/providers/types.d.ts +2 -0
  16. package/dist/cli/providers/vercel.js +44 -1
  17. package/dist/cli/proxy.d.ts +1 -1
  18. package/dist/cli/proxy.js +40 -7
  19. package/dist/cli/server.d.ts +2 -1
  20. package/dist/cli/server.js +14 -3
  21. package/dist/cli/templates/blank/AGENT.md +24 -0
  22. package/dist/cli/templates/blank/src/app/page.tsx +10 -0
  23. package/dist/cli/templates/blog/AGENT.md +26 -0
  24. package/dist/cli/templates/blog/src/app/blog/[slug]/page.tsx +38 -0
  25. package/dist/cli/templates/blog/src/app/page.tsx +35 -0
  26. package/dist/cli/templates/blog/src/lib/posts.ts +42 -0
  27. package/dist/cli/templates/dashboard/AGENT.md +26 -0
  28. package/dist/cli/templates/dashboard/src/app/layout.tsx +28 -0
  29. package/dist/cli/templates/dashboard/src/app/page.tsx +30 -0
  30. package/dist/cli/templates/dashboard/src/components/Sidebar.tsx +31 -0
  31. package/dist/cli/templates/dashboard/src/components/StatsCard.tsx +24 -0
  32. package/dist/cli/templates/landing/AGENT.md +26 -0
  33. package/dist/cli/templates/landing/src/app/page.tsx +13 -0
  34. package/dist/cli/templates/landing/src/components/CTA.tsx +23 -0
  35. package/dist/cli/templates/landing/src/components/Features.tsx +46 -0
  36. package/dist/cli/templates/landing/src/components/Hero.tsx +26 -0
  37. package/dist/cli/templates/portfolio/AGENT.md +24 -0
  38. package/dist/cli/templates/portfolio/src/app/page.tsx +50 -0
  39. package/dist/cli/templates/portfolio/src/components/ProjectCard.tsx +30 -0
  40. package/dist/cli/templates/saas/AGENT.md +28 -0
  41. package/dist/cli/templates/saas/src/app/dashboard/page.tsx +10 -0
  42. package/dist/cli/templates/saas/src/app/page.tsx +37 -0
  43. package/dist/cli/templates/saas/src/app/pricing/page.tsx +53 -0
  44. package/dist/cli/templates/saas/src/components/Navbar.tsx +25 -0
  45. package/dist/cli/templates/saas/src/components/PricingCard.tsx +46 -0
  46. package/dist/cli/templates/templates/blank/AGENT.md +24 -0
  47. package/dist/cli/templates/templates/blank/src/app/page.tsx +10 -0
  48. package/dist/cli/templates/templates/blog/AGENT.md +26 -0
  49. package/dist/cli/templates/templates/blog/src/app/blog/[slug]/page.tsx +38 -0
  50. package/dist/cli/templates/templates/blog/src/app/page.tsx +35 -0
  51. package/dist/cli/templates/templates/blog/src/lib/posts.ts +42 -0
  52. package/dist/cli/templates/templates/dashboard/AGENT.md +26 -0
  53. package/dist/cli/templates/templates/dashboard/src/app/layout.tsx +28 -0
  54. package/dist/cli/templates/templates/dashboard/src/app/page.tsx +30 -0
  55. package/dist/cli/templates/templates/dashboard/src/components/Sidebar.tsx +31 -0
  56. package/dist/cli/templates/templates/dashboard/src/components/StatsCard.tsx +24 -0
  57. package/dist/cli/templates/templates/landing/AGENT.md +26 -0
  58. package/dist/cli/templates/templates/landing/src/app/page.tsx +13 -0
  59. package/dist/cli/templates/templates/landing/src/components/CTA.tsx +23 -0
  60. package/dist/cli/templates/templates/landing/src/components/Features.tsx +46 -0
  61. package/dist/cli/templates/templates/landing/src/components/Hero.tsx +26 -0
  62. package/dist/cli/templates/templates/portfolio/AGENT.md +24 -0
  63. package/dist/cli/templates/templates/portfolio/src/app/page.tsx +50 -0
  64. package/dist/cli/templates/templates/portfolio/src/components/ProjectCard.tsx +30 -0
  65. package/dist/cli/templates/templates/saas/AGENT.md +28 -0
  66. package/dist/cli/templates/templates/saas/src/app/dashboard/page.tsx +10 -0
  67. package/dist/cli/templates/templates/saas/src/app/page.tsx +37 -0
  68. package/dist/cli/templates/templates/saas/src/app/pricing/page.tsx +53 -0
  69. package/dist/cli/templates/templates/saas/src/components/Navbar.tsx +25 -0
  70. package/dist/cli/templates/templates/saas/src/components/PricingCard.tsx +46 -0
  71. package/dist/dashboard/assets/index-3djfaQxV.js +323 -0
  72. package/dist/dashboard/assets/index-BQNq3kAP.css +1 -0
  73. package/dist/dashboard/index.html +2 -2
  74. package/dist/host/host.js +2 -8
  75. package/package.json +2 -1
  76. package/dist/dashboard/assets/index-B374_cjZ.css +0 -1
  77. package/dist/dashboard/assets/index-BJ6wUfxa.js +0 -318
@@ -0,0 +1,10 @@
1
+ export default function Dashboard() {
2
+ return (
3
+ <div className="flex min-h-screen flex-col items-center justify-center p-8">
4
+ <h1 className="text-3xl font-bold">Dashboard</h1>
5
+ <p className="mt-4 text-gray-600 dark:text-gray-400">
6
+ Welcome to your dashboard. Ask Awel to build out the features you need.
7
+ </p>
8
+ </div>
9
+ );
10
+ }
@@ -0,0 +1,37 @@
1
+ import { Navbar } from '@/components/Navbar';
2
+
3
+ export default function Home() {
4
+ return (
5
+ <>
6
+ <Navbar />
7
+ <main>
8
+ <section className="flex flex-col items-center px-6 py-24 text-center">
9
+ <span className="rounded-full bg-blue-100 px-4 py-1 text-sm font-medium text-blue-700 dark:bg-blue-900 dark:text-blue-300">
10
+ Now in beta
11
+ </span>
12
+ <h1 className="mt-6 max-w-3xl text-5xl font-bold tracking-tight sm:text-6xl">
13
+ The platform for modern teams
14
+ </h1>
15
+ <p className="mt-6 max-w-xl text-lg text-gray-600 dark:text-gray-400">
16
+ Streamline your workflow with our all-in-one SaaS platform. Built for
17
+ teams that move fast.
18
+ </p>
19
+ <div className="mt-10 flex gap-4">
20
+ <a
21
+ href="/dashboard"
22
+ className="rounded-lg bg-blue-600 px-6 py-3 text-sm font-semibold text-white shadow-sm hover:bg-blue-500"
23
+ >
24
+ Get started free
25
+ </a>
26
+ <a
27
+ href="/pricing"
28
+ className="rounded-lg border border-gray-300 px-6 py-3 text-sm font-semibold text-gray-900 hover:bg-gray-50 dark:border-gray-700 dark:text-white dark:hover:bg-gray-800"
29
+ >
30
+ View pricing
31
+ </a>
32
+ </div>
33
+ </section>
34
+ </main>
35
+ </>
36
+ );
37
+ }
@@ -0,0 +1,53 @@
1
+ import { Navbar } from '@/components/Navbar';
2
+ import { PricingCard } from '@/components/PricingCard';
3
+
4
+ const plans = [
5
+ {
6
+ name: 'Free',
7
+ price: '$0',
8
+ period: 'forever',
9
+ description: 'For individuals getting started.',
10
+ features: ['1 project', '100 API calls/day', 'Community support'],
11
+ cta: 'Get started',
12
+ highlighted: false,
13
+ },
14
+ {
15
+ name: 'Pro',
16
+ price: '$29',
17
+ period: '/month',
18
+ description: 'For growing teams.',
19
+ features: ['Unlimited projects', '10,000 API calls/day', 'Priority support', 'Advanced analytics'],
20
+ cta: 'Start free trial',
21
+ highlighted: true,
22
+ },
23
+ {
24
+ name: 'Enterprise',
25
+ price: 'Custom',
26
+ period: '',
27
+ description: 'For large organizations.',
28
+ features: ['Unlimited everything', 'Dedicated support', 'Custom integrations', 'SLA guarantee'],
29
+ cta: 'Contact sales',
30
+ highlighted: false,
31
+ },
32
+ ];
33
+
34
+ export default function Pricing() {
35
+ return (
36
+ <>
37
+ <Navbar />
38
+ <main className="px-6 py-24">
39
+ <div className="mx-auto max-w-5xl text-center">
40
+ <h1 className="text-4xl font-bold tracking-tight">Simple, transparent pricing</h1>
41
+ <p className="mt-4 text-gray-600 dark:text-gray-400">
42
+ Choose the plan that works for your team.
43
+ </p>
44
+ </div>
45
+ <div className="mx-auto mt-16 grid max-w-5xl gap-8 lg:grid-cols-3">
46
+ {plans.map((plan) => (
47
+ <PricingCard key={plan.name} {...plan} />
48
+ ))}
49
+ </div>
50
+ </main>
51
+ </>
52
+ );
53
+ }
@@ -0,0 +1,25 @@
1
+ import Link from 'next/link';
2
+
3
+ export function Navbar() {
4
+ return (
5
+ <nav className="flex items-center justify-between px-6 py-4">
6
+ <Link href="/" className="text-lg font-bold">
7
+ SaaSApp
8
+ </Link>
9
+ <div className="flex items-center gap-6">
10
+ <Link
11
+ href="/pricing"
12
+ className="text-sm text-gray-600 hover:text-gray-900 dark:text-gray-400 dark:hover:text-white"
13
+ >
14
+ Pricing
15
+ </Link>
16
+ <Link
17
+ href="/dashboard"
18
+ className="rounded-lg bg-blue-600 px-4 py-2 text-sm font-semibold text-white hover:bg-blue-500"
19
+ >
20
+ Dashboard
21
+ </Link>
22
+ </div>
23
+ </nav>
24
+ );
25
+ }
@@ -0,0 +1,46 @@
1
+ interface PricingCardProps {
2
+ name: string;
3
+ price: string;
4
+ period: string;
5
+ description: string;
6
+ features: string[];
7
+ cta: string;
8
+ highlighted: boolean;
9
+ }
10
+
11
+ export function PricingCard({ name, price, period, description, features, cta, highlighted }: PricingCardProps) {
12
+ return (
13
+ <div
14
+ className={`rounded-xl border p-8 ${
15
+ highlighted
16
+ ? 'border-blue-600 ring-2 ring-blue-600 dark:border-blue-400 dark:ring-blue-400'
17
+ : 'border-gray-200 dark:border-gray-800'
18
+ }`}
19
+ >
20
+ <h3 className="text-lg font-semibold">{name}</h3>
21
+ <p className="mt-1 text-sm text-gray-600 dark:text-gray-400">{description}</p>
22
+ <p className="mt-6">
23
+ <span className="text-4xl font-bold">{price}</span>
24
+ {period && <span className="text-sm text-gray-500">{period}</span>}
25
+ </p>
26
+ <ul className="mt-8 space-y-3">
27
+ {features.map((feature) => (
28
+ <li key={feature} className="flex items-center gap-2 text-sm">
29
+ <span className="text-green-600 dark:text-green-400">&#10003;</span>
30
+ {feature}
31
+ </li>
32
+ ))}
33
+ </ul>
34
+ <a
35
+ href="/dashboard"
36
+ className={`mt-8 block rounded-lg py-2.5 text-center text-sm font-semibold ${
37
+ highlighted
38
+ ? 'bg-blue-600 text-white hover:bg-blue-500'
39
+ : 'border border-gray-300 text-gray-900 hover:bg-gray-50 dark:border-gray-700 dark:text-white dark:hover:bg-gray-800'
40
+ }`}
41
+ >
42
+ {cta}
43
+ </a>
44
+ </div>
45
+ );
46
+ }
@@ -0,0 +1,24 @@
1
+ # Project Guide
2
+
3
+ ## Overview
4
+
5
+ This is a blank Next.js project created with Awel. It uses the App Router, TypeScript, and Tailwind CSS.
6
+
7
+ ## Structure
8
+
9
+ - `src/app/page.tsx` — Home page
10
+ - `src/app/layout.tsx` — Root layout with metadata and fonts
11
+ - `src/app/globals.css` — Global styles and Tailwind imports
12
+
13
+ ## Conventions
14
+
15
+ - Use server components by default; add `'use client'` only when needed
16
+ - Style with Tailwind CSS utility classes
17
+ - Keep components in `src/components/`
18
+ - Use TypeScript for all files
19
+
20
+ ## Example Prompts
21
+
22
+ - "Add a navigation bar with links to Home and About pages"
23
+ - "Create an About page at /about with a brief bio section"
24
+ - "Add a dark mode toggle using Tailwind's dark: variant"
@@ -0,0 +1,10 @@
1
+ export default function Home() {
2
+ return (
3
+ <main className="flex min-h-screen flex-col items-center justify-center p-8">
4
+ <h1 className="text-4xl font-bold tracking-tight">Welcome to your new project</h1>
5
+ <p className="mt-4 text-lg text-gray-600 dark:text-gray-400">
6
+ Open the Awel overlay to start building with AI.
7
+ </p>
8
+ </main>
9
+ );
10
+ }
@@ -0,0 +1,26 @@
1
+ # Project Guide
2
+
3
+ ## Overview
4
+
5
+ A blog application built with Next.js, TypeScript, and Tailwind CSS. Features a post listing page and dynamic post pages.
6
+
7
+ ## Structure
8
+
9
+ - `src/app/page.tsx` — Blog listing page showing all posts
10
+ - `src/app/blog/[slug]/page.tsx` — Dynamic blog post page
11
+ - `src/lib/posts.ts` — Post data and utility functions
12
+
13
+ ## Conventions
14
+
15
+ - Use server components by default; add `'use client'` only when needed
16
+ - Style with Tailwind CSS utility classes
17
+ - Keep components in `src/components/`
18
+ - Use TypeScript for all files
19
+ - Posts are stored as data in `src/lib/posts.ts` (replace with a CMS or MDX later)
20
+
21
+ ## Example Prompts
22
+
23
+ - "Add a new blog post about getting started with Next.js"
24
+ - "Add tags to posts and create a filter by tag"
25
+ - "Add a search bar to filter posts by title"
26
+ - "Create an RSS feed at /feed.xml"
@@ -0,0 +1,38 @@
1
+ import Link from 'next/link';
2
+ import { notFound } from 'next/navigation';
3
+ import { getPostBySlug, getAllPosts } from '@/lib/posts';
4
+
5
+ export function generateStaticParams() {
6
+ return getAllPosts().map((post) => ({ slug: post.slug }));
7
+ }
8
+
9
+ export default async function BlogPost({ params }: { params: Promise<{ slug: string }> }) {
10
+ const { slug } = await params;
11
+ const post = getPostBySlug(slug);
12
+
13
+ if (!post) {
14
+ notFound();
15
+ }
16
+
17
+ return (
18
+ <main className="mx-auto max-w-3xl px-6 py-16">
19
+ <Link
20
+ href="/"
21
+ className="text-sm text-gray-500 hover:text-gray-700 dark:text-gray-400 dark:hover:text-gray-200"
22
+ >
23
+ &larr; Back to blog
24
+ </Link>
25
+ <article className="mt-8">
26
+ <time className="text-sm text-gray-500 dark:text-gray-400">
27
+ {post.date}
28
+ </time>
29
+ <h1 className="mt-2 text-4xl font-bold tracking-tight">
30
+ {post.title}
31
+ </h1>
32
+ <div className="prose prose-gray mt-8 dark:prose-invert">
33
+ <p>{post.content}</p>
34
+ </div>
35
+ </article>
36
+ </main>
37
+ );
38
+ }
@@ -0,0 +1,35 @@
1
+ import Link from 'next/link';
2
+ import { getAllPosts } from '@/lib/posts';
3
+
4
+ export default function BlogHome() {
5
+ const posts = getAllPosts();
6
+
7
+ return (
8
+ <main className="mx-auto max-w-3xl px-6 py-16">
9
+ <h1 className="text-4xl font-bold tracking-tight">Blog</h1>
10
+ <p className="mt-4 text-gray-600 dark:text-gray-400">
11
+ Thoughts, ideas, and tutorials.
12
+ </p>
13
+ <div className="mt-12 space-y-10">
14
+ {posts.map((post) => (
15
+ <article key={post.slug}>
16
+ <time className="text-sm text-gray-500 dark:text-gray-400">
17
+ {post.date}
18
+ </time>
19
+ <h2 className="mt-1 text-xl font-semibold">
20
+ <Link
21
+ href={`/blog/${post.slug}`}
22
+ className="hover:underline"
23
+ >
24
+ {post.title}
25
+ </Link>
26
+ </h2>
27
+ <p className="mt-2 text-gray-600 dark:text-gray-400">
28
+ {post.excerpt}
29
+ </p>
30
+ </article>
31
+ ))}
32
+ </div>
33
+ </main>
34
+ );
35
+ }
@@ -0,0 +1,42 @@
1
+ export interface Post {
2
+ slug: string;
3
+ title: string;
4
+ date: string;
5
+ excerpt: string;
6
+ content: string;
7
+ }
8
+
9
+ const posts: Post[] = [
10
+ {
11
+ slug: 'getting-started',
12
+ title: 'Getting Started with Awel',
13
+ date: '2025-01-15',
14
+ excerpt: 'Learn how to set up your first project with Awel and Next.js.',
15
+ content:
16
+ 'Awel is an AI-powered development overlay for Next.js. It helps you build, modify, and understand your code with an interactive AI assistant. To get started, run npx awel dev in your project directory and look for the floating button in the bottom-right corner.',
17
+ },
18
+ {
19
+ slug: 'building-with-ai',
20
+ title: 'Building with AI Assistance',
21
+ date: '2025-01-10',
22
+ excerpt: 'How AI-assisted development can speed up your workflow.',
23
+ content:
24
+ 'AI-assisted development is transforming how we build software. With tools like Awel, you can describe what you want to build in natural language, and the AI will help you write the code. This approach is especially powerful for scaffolding new features, debugging issues, and learning new frameworks.',
25
+ },
26
+ {
27
+ slug: 'nextjs-best-practices',
28
+ title: 'Next.js Best Practices',
29
+ date: '2025-01-05',
30
+ excerpt: 'Tips and patterns for building performant Next.js applications.',
31
+ content:
32
+ 'Next.js provides many built-in optimizations, but there are additional patterns you can follow. Use server components by default and only add the use client directive when you need interactivity. Leverage the Image component for automatic optimization. Use dynamic imports for heavy components that are not needed on initial load.',
33
+ },
34
+ ];
35
+
36
+ export function getAllPosts(): Post[] {
37
+ return posts.sort((a, b) => new Date(b.date).getTime() - new Date(a.date).getTime());
38
+ }
39
+
40
+ export function getPostBySlug(slug: string): Post | undefined {
41
+ return posts.find((post) => post.slug === slug);
42
+ }
@@ -0,0 +1,26 @@
1
+ # Project Guide
2
+
3
+ ## Overview
4
+
5
+ A dashboard application built with Next.js, TypeScript, and Tailwind CSS. Features a sidebar navigation and stats cards.
6
+
7
+ ## Structure
8
+
9
+ - `src/app/page.tsx` — Dashboard main page with stats overview
10
+ - `src/app/layout.tsx` — Root layout with sidebar
11
+ - `src/components/Sidebar.tsx` — Sidebar navigation component
12
+ - `src/components/StatsCard.tsx` — Reusable stats card component
13
+
14
+ ## Conventions
15
+
16
+ - Use server components by default; add `'use client'` only when needed
17
+ - Style with Tailwind CSS utility classes
18
+ - Keep components in `src/components/`
19
+ - Use TypeScript for all files
20
+
21
+ ## Example Prompts
22
+
23
+ - "Add a new page for user settings at /settings"
24
+ - "Add a chart component to the dashboard showing weekly data"
25
+ - "Create a data table component with sorting"
26
+ - "Add a notification bell icon to the sidebar header"
@@ -0,0 +1,28 @@
1
+ import type { Metadata } from 'next';
2
+ import { Inter } from 'next/font/google';
3
+ import './globals.css';
4
+ import { Sidebar } from '@/components/Sidebar';
5
+
6
+ const inter = Inter({ subsets: ['latin'] });
7
+
8
+ export const metadata: Metadata = {
9
+ title: 'Dashboard',
10
+ description: 'Dashboard application built with Awel',
11
+ };
12
+
13
+ export default function RootLayout({
14
+ children,
15
+ }: {
16
+ children: React.ReactNode;
17
+ }) {
18
+ return (
19
+ <html lang="en">
20
+ <body className={inter.className}>
21
+ <div className="flex min-h-screen">
22
+ <Sidebar />
23
+ <main className="flex-1 p-8">{children}</main>
24
+ </div>
25
+ </body>
26
+ </html>
27
+ );
28
+ }
@@ -0,0 +1,30 @@
1
+ import { StatsCard } from '@/components/StatsCard';
2
+
3
+ const stats = [
4
+ { title: 'Total Users', value: '2,847', change: '+12.5%', trend: 'up' as const },
5
+ { title: 'Revenue', value: '$45,231', change: '+8.2%', trend: 'up' as const },
6
+ { title: 'Active Sessions', value: '1,024', change: '-3.1%', trend: 'down' as const },
7
+ { title: 'Conversion Rate', value: '3.24%', change: '+1.8%', trend: 'up' as const },
8
+ ];
9
+
10
+ export default function Dashboard() {
11
+ return (
12
+ <div>
13
+ <h1 className="text-2xl font-bold">Dashboard</h1>
14
+ <p className="mt-1 text-sm text-gray-600 dark:text-gray-400">
15
+ Welcome back. Here&apos;s an overview of your metrics.
16
+ </p>
17
+ <div className="mt-8 grid gap-6 sm:grid-cols-2 lg:grid-cols-4">
18
+ {stats.map((stat) => (
19
+ <StatsCard key={stat.title} {...stat} />
20
+ ))}
21
+ </div>
22
+ <div className="mt-8 rounded-xl border border-gray-200 p-6 dark:border-gray-800">
23
+ <h2 className="text-lg font-semibold">Recent Activity</h2>
24
+ <p className="mt-2 text-sm text-gray-500 dark:text-gray-400">
25
+ No recent activity to display. Ask Awel to add a data table or chart here.
26
+ </p>
27
+ </div>
28
+ </div>
29
+ );
30
+ }
@@ -0,0 +1,31 @@
1
+ const navItems = [
2
+ { label: 'Dashboard', href: '/', icon: '📊' },
3
+ { label: 'Analytics', href: '/analytics', icon: '📈' },
4
+ { label: 'Users', href: '/users', icon: '👥' },
5
+ { label: 'Settings', href: '/settings', icon: '⚙️' },
6
+ ];
7
+
8
+ export function Sidebar() {
9
+ return (
10
+ <aside className="flex w-64 flex-col border-r border-gray-200 bg-gray-50 dark:border-gray-800 dark:bg-gray-900">
11
+ <div className="flex h-16 items-center px-6">
12
+ <span className="text-lg font-bold">MyApp</span>
13
+ </div>
14
+ <nav className="flex-1 px-4 py-4">
15
+ <ul className="space-y-1">
16
+ {navItems.map((item) => (
17
+ <li key={item.href}>
18
+ <a
19
+ href={item.href}
20
+ className="flex items-center gap-3 rounded-lg px-3 py-2 text-sm font-medium text-gray-700 hover:bg-gray-200 dark:text-gray-300 dark:hover:bg-gray-800"
21
+ >
22
+ <span>{item.icon}</span>
23
+ {item.label}
24
+ </a>
25
+ </li>
26
+ ))}
27
+ </ul>
28
+ </nav>
29
+ </aside>
30
+ );
31
+ }
@@ -0,0 +1,24 @@
1
+ interface StatsCardProps {
2
+ title: string;
3
+ value: string;
4
+ change: string;
5
+ trend: 'up' | 'down';
6
+ }
7
+
8
+ export function StatsCard({ title, value, change, trend }: StatsCardProps) {
9
+ return (
10
+ <div className="rounded-xl border border-gray-200 p-6 dark:border-gray-800">
11
+ <p className="text-sm text-gray-600 dark:text-gray-400">{title}</p>
12
+ <p className="mt-2 text-3xl font-bold">{value}</p>
13
+ <p
14
+ className={`mt-2 text-sm font-medium ${
15
+ trend === 'up'
16
+ ? 'text-green-600 dark:text-green-400'
17
+ : 'text-red-600 dark:text-red-400'
18
+ }`}
19
+ >
20
+ {change}
21
+ </p>
22
+ </div>
23
+ );
24
+ }
@@ -0,0 +1,26 @@
1
+ # Project Guide
2
+
3
+ ## Overview
4
+
5
+ A landing page built with Next.js, TypeScript, and Tailwind CSS. Features a hero section, features grid, and call-to-action.
6
+
7
+ ## Structure
8
+
9
+ - `src/app/page.tsx` — Main landing page (composes Hero, Features, CTA)
10
+ - `src/components/Hero.tsx` — Hero section with headline and CTA button
11
+ - `src/components/Features.tsx` — Features grid (3 columns)
12
+ - `src/components/CTA.tsx` — Call-to-action section and footer
13
+
14
+ ## Conventions
15
+
16
+ - Use server components by default; add `'use client'` only when needed
17
+ - Style with Tailwind CSS utility classes
18
+ - Keep components in `src/components/`
19
+ - Use TypeScript for all files
20
+
21
+ ## Example Prompts
22
+
23
+ - "Change the hero headline and add a subtitle"
24
+ - "Add a fourth feature card about security"
25
+ - "Add a testimonials section between Features and CTA"
26
+ - "Make the CTA section have a gradient background"
@@ -0,0 +1,13 @@
1
+ import { Hero } from '@/components/Hero';
2
+ import { Features } from '@/components/Features';
3
+ import { CTA } from '@/components/CTA';
4
+
5
+ export default function Home() {
6
+ return (
7
+ <main>
8
+ <Hero />
9
+ <Features />
10
+ <CTA />
11
+ </main>
12
+ );
13
+ }
@@ -0,0 +1,23 @@
1
+ export function CTA() {
2
+ return (
3
+ <section id="cta" className="px-6 py-24">
4
+ <div className="mx-auto max-w-3xl rounded-2xl bg-gray-900 px-8 py-16 text-center dark:bg-gray-800">
5
+ <h2 className="text-3xl font-bold tracking-tight text-white">
6
+ Ready to get started?
7
+ </h2>
8
+ <p className="mt-4 text-gray-300">
9
+ Start building your project with AI-assisted development.
10
+ </p>
11
+ <a
12
+ href="#"
13
+ className="mt-8 inline-block rounded-lg bg-white px-6 py-3 text-sm font-semibold text-gray-900 shadow-sm hover:bg-gray-100"
14
+ >
15
+ Start building
16
+ </a>
17
+ </div>
18
+ <footer className="mt-16 text-center text-sm text-gray-500">
19
+ Built with Awel and Next.js
20
+ </footer>
21
+ </section>
22
+ );
23
+ }
@@ -0,0 +1,46 @@
1
+ const features = [
2
+ {
3
+ title: 'Lightning Fast',
4
+ description: 'Built on Next.js with optimized rendering and automatic code splitting for peak performance.',
5
+ icon: '⚡',
6
+ },
7
+ {
8
+ title: 'AI-Powered',
9
+ description: 'Develop faster with Awel — your AI coding assistant that understands your entire project.',
10
+ icon: '🤖',
11
+ },
12
+ {
13
+ title: 'Beautiful Design',
14
+ description: 'Tailwind CSS utility-first styling makes it easy to create responsive, polished interfaces.',
15
+ icon: '🎨',
16
+ },
17
+ ];
18
+
19
+ export function Features() {
20
+ return (
21
+ <section id="features" className="px-6 py-24">
22
+ <div className="mx-auto max-w-5xl">
23
+ <h2 className="text-center text-3xl font-bold tracking-tight">
24
+ Everything you need
25
+ </h2>
26
+ <p className="mt-4 text-center text-gray-600 dark:text-gray-400">
27
+ Start with a solid foundation and build from there.
28
+ </p>
29
+ <div className="mt-16 grid gap-8 sm:grid-cols-2 lg:grid-cols-3">
30
+ {features.map((feature) => (
31
+ <div
32
+ key={feature.title}
33
+ className="rounded-xl border border-gray-200 p-6 dark:border-gray-800"
34
+ >
35
+ <div className="text-3xl">{feature.icon}</div>
36
+ <h3 className="mt-4 text-lg font-semibold">{feature.title}</h3>
37
+ <p className="mt-2 text-sm text-gray-600 dark:text-gray-400">
38
+ {feature.description}
39
+ </p>
40
+ </div>
41
+ ))}
42
+ </div>
43
+ </div>
44
+ </section>
45
+ );
46
+ }
@@ -0,0 +1,26 @@
1
+ export function Hero() {
2
+ return (
3
+ <section className="flex flex-col items-center justify-center px-6 py-24 text-center">
4
+ <h1 className="max-w-3xl text-5xl font-bold tracking-tight sm:text-6xl">
5
+ Build something amazing
6
+ </h1>
7
+ <p className="mt-6 max-w-xl text-lg text-gray-600 dark:text-gray-400">
8
+ A modern landing page template powered by Next.js, Tailwind CSS, and AI-assisted development with Awel.
9
+ </p>
10
+ <div className="mt-10 flex gap-4">
11
+ <a
12
+ href="#features"
13
+ className="rounded-lg bg-gray-900 px-6 py-3 text-sm font-semibold text-white shadow-sm hover:bg-gray-800 dark:bg-white dark:text-gray-900 dark:hover:bg-gray-100"
14
+ >
15
+ Get started
16
+ </a>
17
+ <a
18
+ href="#cta"
19
+ className="rounded-lg border border-gray-300 px-6 py-3 text-sm font-semibold text-gray-900 hover:bg-gray-50 dark:border-gray-700 dark:text-white dark:hover:bg-gray-800"
20
+ >
21
+ Learn more
22
+ </a>
23
+ </div>
24
+ </section>
25
+ );
26
+ }
@@ -0,0 +1,24 @@
1
+ # Project Guide
2
+
3
+ ## Overview
4
+
5
+ A portfolio website built with Next.js, TypeScript, and Tailwind CSS. Showcases projects with a card-based layout.
6
+
7
+ ## Structure
8
+
9
+ - `src/app/page.tsx` — Portfolio main page with intro and project grid
10
+ - `src/components/ProjectCard.tsx` — Reusable project card component
11
+
12
+ ## Conventions
13
+
14
+ - Use server components by default; add `'use client'` only when needed
15
+ - Style with Tailwind CSS utility classes
16
+ - Keep components in `src/components/`
17
+ - Use TypeScript for all files
18
+
19
+ ## Example Prompts
20
+
21
+ - "Add a contact form section at the bottom of the page"
22
+ - "Add a skills section showing technologies I know"
23
+ - "Create a project detail page at /projects/[slug]"
24
+ - "Add animation to the project cards on hover"