awel 0.1.2 → 0.2.1

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 (72) hide show
  1. package/README.md +22 -5
  2. package/README.zh-CN.md +22 -5
  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 +4 -0
  6. package/dist/cli/awel-config.js +8 -0
  7. package/dist/cli/create.d.ts +1 -0
  8. package/dist/cli/create.js +136 -0
  9. package/dist/cli/index.js +58 -4
  10. package/dist/cli/onboarding.js +49 -24
  11. package/dist/cli/providers/types.d.ts +2 -0
  12. package/dist/cli/providers/vercel.js +51 -2
  13. package/dist/cli/proxy.d.ts +1 -1
  14. package/dist/cli/proxy.js +40 -7
  15. package/dist/cli/server.d.ts +2 -1
  16. package/dist/cli/server.js +14 -3
  17. package/dist/cli/templates/blank/AGENT.md +24 -0
  18. package/dist/cli/templates/blank/src/app/page.tsx +10 -0
  19. package/dist/cli/templates/blog/AGENT.md +26 -0
  20. package/dist/cli/templates/blog/src/app/blog/[slug]/page.tsx +38 -0
  21. package/dist/cli/templates/blog/src/app/page.tsx +35 -0
  22. package/dist/cli/templates/blog/src/lib/posts.ts +42 -0
  23. package/dist/cli/templates/dashboard/AGENT.md +26 -0
  24. package/dist/cli/templates/dashboard/src/app/layout.tsx +28 -0
  25. package/dist/cli/templates/dashboard/src/app/page.tsx +30 -0
  26. package/dist/cli/templates/dashboard/src/components/Sidebar.tsx +31 -0
  27. package/dist/cli/templates/dashboard/src/components/StatsCard.tsx +24 -0
  28. package/dist/cli/templates/landing/AGENT.md +26 -0
  29. package/dist/cli/templates/landing/src/app/page.tsx +13 -0
  30. package/dist/cli/templates/landing/src/components/CTA.tsx +23 -0
  31. package/dist/cli/templates/landing/src/components/Features.tsx +46 -0
  32. package/dist/cli/templates/landing/src/components/Hero.tsx +26 -0
  33. package/dist/cli/templates/portfolio/AGENT.md +24 -0
  34. package/dist/cli/templates/portfolio/src/app/page.tsx +50 -0
  35. package/dist/cli/templates/portfolio/src/components/ProjectCard.tsx +30 -0
  36. package/dist/cli/templates/saas/AGENT.md +28 -0
  37. package/dist/cli/templates/saas/src/app/dashboard/page.tsx +10 -0
  38. package/dist/cli/templates/saas/src/app/page.tsx +37 -0
  39. package/dist/cli/templates/saas/src/app/pricing/page.tsx +53 -0
  40. package/dist/cli/templates/saas/src/components/Navbar.tsx +25 -0
  41. package/dist/cli/templates/saas/src/components/PricingCard.tsx +46 -0
  42. package/dist/cli/templates/templates/blank/AGENT.md +24 -0
  43. package/dist/cli/templates/templates/blank/src/app/page.tsx +10 -0
  44. package/dist/cli/templates/templates/blog/AGENT.md +26 -0
  45. package/dist/cli/templates/templates/blog/src/app/blog/[slug]/page.tsx +38 -0
  46. package/dist/cli/templates/templates/blog/src/app/page.tsx +35 -0
  47. package/dist/cli/templates/templates/blog/src/lib/posts.ts +42 -0
  48. package/dist/cli/templates/templates/dashboard/AGENT.md +26 -0
  49. package/dist/cli/templates/templates/dashboard/src/app/layout.tsx +28 -0
  50. package/dist/cli/templates/templates/dashboard/src/app/page.tsx +30 -0
  51. package/dist/cli/templates/templates/dashboard/src/components/Sidebar.tsx +31 -0
  52. package/dist/cli/templates/templates/dashboard/src/components/StatsCard.tsx +24 -0
  53. package/dist/cli/templates/templates/landing/AGENT.md +26 -0
  54. package/dist/cli/templates/templates/landing/src/app/page.tsx +13 -0
  55. package/dist/cli/templates/templates/landing/src/components/CTA.tsx +23 -0
  56. package/dist/cli/templates/templates/landing/src/components/Features.tsx +46 -0
  57. package/dist/cli/templates/templates/landing/src/components/Hero.tsx +26 -0
  58. package/dist/cli/templates/templates/portfolio/AGENT.md +24 -0
  59. package/dist/cli/templates/templates/portfolio/src/app/page.tsx +50 -0
  60. package/dist/cli/templates/templates/portfolio/src/components/ProjectCard.tsx +30 -0
  61. package/dist/cli/templates/templates/saas/AGENT.md +28 -0
  62. package/dist/cli/templates/templates/saas/src/app/dashboard/page.tsx +10 -0
  63. package/dist/cli/templates/templates/saas/src/app/page.tsx +37 -0
  64. package/dist/cli/templates/templates/saas/src/app/pricing/page.tsx +53 -0
  65. package/dist/cli/templates/templates/saas/src/components/Navbar.tsx +25 -0
  66. package/dist/cli/templates/templates/saas/src/components/PricingCard.tsx +46 -0
  67. package/dist/dashboard/assets/index-3djfaQxV.js +323 -0
  68. package/dist/dashboard/assets/index-BQNq3kAP.css +1 -0
  69. package/dist/dashboard/index.html +2 -2
  70. package/package.json +2 -1
  71. package/dist/dashboard/assets/index-B374_cjZ.css +0 -1
  72. package/dist/dashboard/assets/index-BJ6wUfxa.js +0 -318
@@ -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"
@@ -0,0 +1,50 @@
1
+ import { ProjectCard } from '@/components/ProjectCard';
2
+
3
+ const projects = [
4
+ {
5
+ title: 'Project Alpha',
6
+ description: 'A full-stack web application built with Next.js and PostgreSQL.',
7
+ tags: ['Next.js', 'TypeScript', 'PostgreSQL'],
8
+ href: '#',
9
+ },
10
+ {
11
+ title: 'Project Beta',
12
+ description: 'A mobile-first e-commerce platform with real-time inventory.',
13
+ tags: ['React Native', 'Node.js', 'Redis'],
14
+ href: '#',
15
+ },
16
+ {
17
+ title: 'Project Gamma',
18
+ description: 'An open-source CLI tool for automating deployment workflows.',
19
+ tags: ['Go', 'Docker', 'CI/CD'],
20
+ href: '#',
21
+ },
22
+ {
23
+ title: 'Project Delta',
24
+ description: 'A real-time collaborative document editor with conflict resolution.',
25
+ tags: ['WebSocket', 'CRDT', 'React'],
26
+ href: '#',
27
+ },
28
+ ];
29
+
30
+ export default function Portfolio() {
31
+ return (
32
+ <main className="mx-auto max-w-4xl px-6 py-16">
33
+ <section className="mb-16">
34
+ <h1 className="text-4xl font-bold tracking-tight">Hi, I&apos;m a developer</h1>
35
+ <p className="mt-4 max-w-2xl text-lg text-gray-600 dark:text-gray-400">
36
+ I build web applications and open-source tools. This portfolio was
37
+ scaffolded with Awel — ask the AI to customize it for you.
38
+ </p>
39
+ </section>
40
+ <section>
41
+ <h2 className="text-2xl font-bold">Projects</h2>
42
+ <div className="mt-8 grid gap-6 sm:grid-cols-2">
43
+ {projects.map((project) => (
44
+ <ProjectCard key={project.title} {...project} />
45
+ ))}
46
+ </div>
47
+ </section>
48
+ </main>
49
+ );
50
+ }
@@ -0,0 +1,30 @@
1
+ interface ProjectCardProps {
2
+ title: string;
3
+ description: string;
4
+ tags: string[];
5
+ href: string;
6
+ }
7
+
8
+ export function ProjectCard({ title, description, tags, href }: ProjectCardProps) {
9
+ return (
10
+ <a
11
+ href={href}
12
+ className="group block rounded-xl border border-gray-200 p-6 transition-colors hover:border-gray-400 dark:border-gray-800 dark:hover:border-gray-600"
13
+ >
14
+ <h3 className="text-lg font-semibold group-hover:underline">{title}</h3>
15
+ <p className="mt-2 text-sm text-gray-600 dark:text-gray-400">
16
+ {description}
17
+ </p>
18
+ <div className="mt-4 flex flex-wrap gap-2">
19
+ {tags.map((tag) => (
20
+ <span
21
+ key={tag}
22
+ className="rounded-full bg-gray-100 px-3 py-1 text-xs font-medium text-gray-700 dark:bg-gray-800 dark:text-gray-300"
23
+ >
24
+ {tag}
25
+ </span>
26
+ ))}
27
+ </div>
28
+ </a>
29
+ );
30
+ }
@@ -0,0 +1,28 @@
1
+ # Project Guide
2
+
3
+ ## Overview
4
+
5
+ A SaaS application template built with Next.js, TypeScript, and Tailwind CSS. Includes a marketing landing page, pricing page, and dashboard shell.
6
+
7
+ ## Structure
8
+
9
+ - `src/app/page.tsx` — SaaS marketing landing page
10
+ - `src/app/pricing/page.tsx` — Pricing page with plan comparison
11
+ - `src/app/dashboard/page.tsx` — Authenticated dashboard shell
12
+ - `src/components/Navbar.tsx` — Top navigation bar
13
+ - `src/components/PricingCard.tsx` — Reusable pricing card component
14
+
15
+ ## Conventions
16
+
17
+ - Use server components by default; add `'use client'` only when needed
18
+ - Style with Tailwind CSS utility classes
19
+ - Keep components in `src/components/`
20
+ - Use TypeScript for all files
21
+ - The Navbar is shared across marketing pages
22
+
23
+ ## Example Prompts
24
+
25
+ - "Add a features comparison table to the pricing page"
26
+ - "Create a sign-up form with email and password fields"
27
+ - "Add a testimonials carousel to the landing page"
28
+ - "Build a billing settings page at /dashboard/billing"
@@ -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
+ }