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,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
+ }