diff --git a/templates/ecommerce/nextjs-monolith/.eslintrc.json b/templates/ecommerce/nextjs-monolith/.eslintrc.json new file mode 100644 index 0000000..a2569c2 --- /dev/null +++ b/templates/ecommerce/nextjs-monolith/.eslintrc.json @@ -0,0 +1,4 @@ +{ + "root": true, + "extends": "next/core-web-vitals" +} diff --git a/templates/ecommerce/nextjs-monolith/app/globals.css b/templates/ecommerce/nextjs-monolith/app/globals.css new file mode 100644 index 0000000..283fef5 --- /dev/null +++ b/templates/ecommerce/nextjs-monolith/app/globals.css @@ -0,0 +1,59 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +/* ===== Base Theme: Minimal Clean (Default) ===== */ +:root { + --bg-color: #ffffff; + --bg-secondary: #f9fafb; + --text-color: #111827; + --text-secondary: #6b7280; + --primary: #2563eb; + --primary-hover: #1d4ed8; + --border-color: #e5e7eb; + --card-bg: #ffffff; + --font-family: 'Inter', system-ui, sans-serif; + --radius: 0.5rem; +} + +/* ===== Glassmorphism Theme ===== */ +[data-theme="Glassmorphism"] { + --bg-color: #0f172a; + --bg-secondary: rgba(255, 255, 255, 0.05); + --text-color: #f1f5f9; + --text-secondary: #94a3b8; + --primary: #8b5cf6; + --primary-hover: #7c3aed; + --border-color: rgba(255, 255, 255, 0.1); + --card-bg: rgba(255, 255, 255, 0.08); + --font-family: 'Inter', system-ui, sans-serif; + --radius: 1rem; +} + +[data-theme="Glassmorphism"] .glass { + background: rgba(255, 255, 255, 0.08); + backdrop-filter: blur(12px); + -webkit-backdrop-filter: blur(12px); + border: 1px solid rgba(255, 255, 255, 0.1); +} + +/* ===== Dark Terminal Theme ===== */ +[data-theme="Dark Terminal"] { + --bg-color: #000000; + --bg-secondary: #0a0a0a; + --text-color: #3fb950; + --text-secondary: #8b949e; + --primary: #3fb950; + --primary-hover: #2ea043; + --border-color: #21262d; + --card-bg: #0d1117; + --font-family: 'JetBrains Mono', 'Fira Code', monospace; + --radius: 0.25rem; +} + +/* ===== Apply variables globally ===== */ +body { + background-color: var(--bg-color); + color: var(--text-color); + font-family: var(--font-family); +} diff --git a/templates/ecommerce/nextjs-monolith/app/layout.tsx b/templates/ecommerce/nextjs-monolith/app/layout.tsx new file mode 100644 index 0000000..d4c0344 --- /dev/null +++ b/templates/ecommerce/nextjs-monolith/app/layout.tsx @@ -0,0 +1,89 @@ +import type { Metadata } from 'next'; +import Link from 'next/link'; +import './globals.css'; + +export const metadata: Metadata = { + title: '{{projectName}} - Store', + description: 'A {{variant}} e-commerce store built with Opusify CLI.', +}; + +const navLinks = [ + { label: 'Home', href: '/' }, + { label: 'Products', href: '/products' }, + { label: 'Cart', href: '/cart' }, + { label: 'Account', href: '/account' }, +]; + +function Navbar() { + return ( +
+ +
+ ); +} + +function Sidebar() { + return ( + + ); +} + +export default function RootLayout({ + children, +}: { + children: React.ReactNode; +}) { + const useSidebar = '{{includeSidebar}}' === 'true'; + + return ( + + + {useSidebar ? ( +
+ +
{children}
+
+ ) : ( + <> + +
{children}
+ + )} + + + ); +} diff --git a/templates/ecommerce/nextjs-monolith/app/page.tsx b/templates/ecommerce/nextjs-monolith/app/page.tsx new file mode 100644 index 0000000..1f7bcc9 --- /dev/null +++ b/templates/ecommerce/nextjs-monolith/app/page.tsx @@ -0,0 +1,45 @@ +import Link from 'next/link'; + +export default function Home() { + return ( +
+ {/* Hero Section */} +
+

+ Welcome to {{projectName}} +

+

+ Your {{variant}} store, powered by Next.js 14 and scaffolded by Opusify CLI. +

+
+ + Browse Products + + + View Cart + +
+
+ + {/* Featured Section */} +
+

Featured Products

+
+ {[1, 2, 3].map((i) => ( +
+
+

Product {i}

+

$29.99

+
+ ))} +
+
+
+ ); +} diff --git a/templates/ecommerce/nextjs-monolith/app/products/[slug]/page.tsx b/templates/ecommerce/nextjs-monolith/app/products/[slug]/page.tsx new file mode 100644 index 0000000..46675ee --- /dev/null +++ b/templates/ecommerce/nextjs-monolith/app/products/[slug]/page.tsx @@ -0,0 +1,38 @@ +import Link from 'next/link'; + +export default function ProductDetailPage({ + params, +}: { + params: { slug: string }; +}) { + return ( +
+ + ← Back to Products + + +
+ {/* Product Image Placeholder */} +
+ + {/* Product Info */} +
+

+ {params.slug.replace(/-/g, ' ')} +

+

$99.99

+

+ This is a placeholder product page for {params.slug}. + When connected to a CMS or database, this page will display real product data. +

+ +
+
+
+ ); +} diff --git a/templates/ecommerce/nextjs-monolith/app/products/page.tsx b/templates/ecommerce/nextjs-monolith/app/products/page.tsx new file mode 100644 index 0000000..8459f68 --- /dev/null +++ b/templates/ecommerce/nextjs-monolith/app/products/page.tsx @@ -0,0 +1,31 @@ +import Link from 'next/link'; + +const products = [ + { slug: 'product-1', name: 'Classic T-Shirt', price: '$29.99' }, + { slug: 'product-2', name: 'Denim Jacket', price: '$89.99' }, + { slug: 'product-3', name: 'Running Shoes', price: '$119.99' }, + { slug: 'product-4', name: 'Leather Bag', price: '$149.99' }, + { slug: 'product-5', name: 'Sunglasses', price: '$59.99' }, + { slug: 'product-6', name: 'Watch', price: '$199.99' }, +]; + +export default function ProductsPage() { + return ( +
+

All Products

+
+ {products.map((product) => ( + +
+

{product.name}

+

{product.price}

+ + ))} +
+
+ ); +} diff --git a/templates/ecommerce/nextjs-monolith/next.config.js b/templates/ecommerce/nextjs-monolith/next.config.js new file mode 100644 index 0000000..658404a --- /dev/null +++ b/templates/ecommerce/nextjs-monolith/next.config.js @@ -0,0 +1,4 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = {}; + +module.exports = nextConfig; diff --git a/templates/ecommerce/nextjs-monolith/package.json b/templates/ecommerce/nextjs-monolith/package.json new file mode 100644 index 0000000..5dfa145 --- /dev/null +++ b/templates/ecommerce/nextjs-monolith/package.json @@ -0,0 +1,27 @@ +{ + "name": "{{projectName}}", + "version": "1.0.0", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "next lint" + }, + "dependencies": { + "next": "14.2.3", + "react": "^18.3.1", + "react-dom": "^18.3.1" + }, + "devDependencies": { + "@types/node": "^20.12.0", + "@types/react": "^18.3.0", + "@types/react-dom": "^18.3.0", + "autoprefixer": "^10.4.19", + "eslint": "^8.57.0", + "eslint-config-next": "14.2.3", + "postcss": "^8.4.38", + "tailwindcss": "^3.4.3", + "typescript": "^5.4.5" + } +} diff --git a/templates/ecommerce/nextjs-monolith/postcss.config.js b/templates/ecommerce/nextjs-monolith/postcss.config.js new file mode 100644 index 0000000..12a703d --- /dev/null +++ b/templates/ecommerce/nextjs-monolith/postcss.config.js @@ -0,0 +1,6 @@ +module.exports = { + plugins: { + tailwindcss: {}, + autoprefixer: {}, + }, +}; diff --git a/templates/ecommerce/nextjs-monolith/tailwind.config.ts b/templates/ecommerce/nextjs-monolith/tailwind.config.ts new file mode 100644 index 0000000..c763011 --- /dev/null +++ b/templates/ecommerce/nextjs-monolith/tailwind.config.ts @@ -0,0 +1,31 @@ +import type { Config } from 'tailwindcss'; + +const config: Config = { + content: [ + './app/**/*.{ts,tsx}', + './components/**/*.{ts,tsx}', + ], + theme: { + extend: { + colors: { + background: 'var(--bg-color)', + 'bg-secondary': 'var(--bg-secondary)', + foreground: 'var(--text-color)', + 'text-secondary': 'var(--text-secondary)', + primary: 'var(--primary)', + 'primary-hover': 'var(--primary-hover)', + border: 'var(--border-color)', + card: 'var(--card-bg)', + }, + borderRadius: { + theme: 'var(--radius)', + }, + fontFamily: { + theme: 'var(--font-family)', + }, + }, + }, + plugins: [], +}; + +export default config; diff --git a/templates/ecommerce/nextjs-monolith/tsconfig.json b/templates/ecommerce/nextjs-monolith/tsconfig.json new file mode 100644 index 0000000..e7ff90f --- /dev/null +++ b/templates/ecommerce/nextjs-monolith/tsconfig.json @@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleResolution": "bundler", + "resolveJsonModule": true, + "isolatedModules": true, + "jsx": "preserve", + "incremental": true, + "plugins": [ + { + "name": "next" + } + ], + "paths": { + "@/*": ["./*"] + } + }, + "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], + "exclude": ["node_modules"] +} diff --git a/templates/portfolio/nextjs-monolith/app/globals.css b/templates/portfolio/nextjs-monolith/app/globals.css index b5c61c9..283fef5 100644 --- a/templates/portfolio/nextjs-monolith/app/globals.css +++ b/templates/portfolio/nextjs-monolith/app/globals.css @@ -1,3 +1,59 @@ @tailwind base; @tailwind components; @tailwind utilities; + +/* ===== Base Theme: Minimal Clean (Default) ===== */ +:root { + --bg-color: #ffffff; + --bg-secondary: #f9fafb; + --text-color: #111827; + --text-secondary: #6b7280; + --primary: #2563eb; + --primary-hover: #1d4ed8; + --border-color: #e5e7eb; + --card-bg: #ffffff; + --font-family: 'Inter', system-ui, sans-serif; + --radius: 0.5rem; +} + +/* ===== Glassmorphism Theme ===== */ +[data-theme="Glassmorphism"] { + --bg-color: #0f172a; + --bg-secondary: rgba(255, 255, 255, 0.05); + --text-color: #f1f5f9; + --text-secondary: #94a3b8; + --primary: #8b5cf6; + --primary-hover: #7c3aed; + --border-color: rgba(255, 255, 255, 0.1); + --card-bg: rgba(255, 255, 255, 0.08); + --font-family: 'Inter', system-ui, sans-serif; + --radius: 1rem; +} + +[data-theme="Glassmorphism"] .glass { + background: rgba(255, 255, 255, 0.08); + backdrop-filter: blur(12px); + -webkit-backdrop-filter: blur(12px); + border: 1px solid rgba(255, 255, 255, 0.1); +} + +/* ===== Dark Terminal Theme ===== */ +[data-theme="Dark Terminal"] { + --bg-color: #000000; + --bg-secondary: #0a0a0a; + --text-color: #3fb950; + --text-secondary: #8b949e; + --primary: #3fb950; + --primary-hover: #2ea043; + --border-color: #21262d; + --card-bg: #0d1117; + --font-family: 'JetBrains Mono', 'Fira Code', monospace; + --radius: 0.25rem; +} + +/* ===== Apply variables globally ===== */ +body { + background-color: var(--bg-color); + color: var(--text-color); + font-family: var(--font-family); +} diff --git a/templates/portfolio/nextjs-monolith/app/page.tsx b/templates/portfolio/nextjs-monolith/app/page.tsx index 5368419..b057037 100644 --- a/templates/portfolio/nextjs-monolith/app/page.tsx +++ b/templates/portfolio/nextjs-monolith/app/page.tsx @@ -1,22 +1,22 @@ export default function Home() { return ( -
+

- Welcome to {{projectName}} + Welcome to {{projectName}}

-

+

A {{variant}} portfolio, scaffolded by Opusify CLI.

View Projects Contact Me diff --git a/templates/portfolio/nextjs-monolith/tailwind.config.ts b/templates/portfolio/nextjs-monolith/tailwind.config.ts index cbcf2de..c763011 100644 --- a/templates/portfolio/nextjs-monolith/tailwind.config.ts +++ b/templates/portfolio/nextjs-monolith/tailwind.config.ts @@ -6,7 +6,24 @@ const config: Config = { './components/**/*.{ts,tsx}', ], theme: { - extend: {}, + extend: { + colors: { + background: 'var(--bg-color)', + 'bg-secondary': 'var(--bg-secondary)', + foreground: 'var(--text-color)', + 'text-secondary': 'var(--text-secondary)', + primary: 'var(--primary)', + 'primary-hover': 'var(--primary-hover)', + border: 'var(--border-color)', + card: 'var(--card-bg)', + }, + borderRadius: { + theme: 'var(--radius)', + }, + fontFamily: { + theme: 'var(--font-family)', + }, + }, }, plugins: [], };