Documentation · Version 1.0.0 · Next.js Edition

AyanTheme

A complete e-commerce frontend template built with Next.js — including Fashion, Beauty, and Jewelry storefronts and a full Admin Dashboard, ready to customize and connect to your own backend or API.

Next.js (App Router) TypeScript Tailwind CSS GSAP + ScrollTrigger Lenis Smooth Scroll Framer Motion Swiper.js next-intl (EN / AR + RTL) Admin Dashboard

1. Overview

Thank you for purchasing AyanTheme! AyanTheme is a modern e-commerce template built on Next.js, designed for online stores that need a fast, animated, premium storefront out of the box.

AyanTheme ships with three complete, independent demos — Fashion, Beauty, and Jewelry — each with its own layout style, color palette, and product-page variations, so you can launch a store that matches your niche without starting from scratch. It also includes a full Admin Dashboard with its own separate login, for managing products, orders, promotions, shipping and users. The interface is fully translatable and ships with English and Arabic (full RTL) out of the box.

Please read this documentation fully before requesting support — most setup and customization questions are answered here.

2. What's Included

🧥 Fashion Demo — Editorial clothing store

A bold, editorial storefront for apparel brands: lookbook sliders, size & color variations, and a fast filterable shop. Ships with 3 home styles, 3 product-page styles, a product list, 3 About and 3 Contact layouts, plus FAQ and Help Center.

Live preview: next.ayantheme.com/en/fashion

💄 Beauty Demo — Soft cosmetics & skincare

A soft, ingredient-focused layout for cosmetics and skincare: shade pickers, routine bundles, and rich product reviews. Same page set as Fashion — 3 home styles, 3 product-page styles, product list, About/Contact variants, FAQ and Help Center.

Live preview: next.ayantheme.com/en/beauty

💍 Jewelry Demo — Luxury minimal jewelry

A quiet luxury layout for jewelry: macro imagery, material specs, gift packaging options, and elegant motion. Same page set as Fashion and Beauty — 3 home styles, 3 product-page styles, product list, About/Contact variants, FAQ and Help Center.

Live preview: next.ayantheme.com/en/jewelry

🛠️ Admin Dashboard — Store Management Dashboard

A complete store management dashboard, kept entirely separate from the customer-facing account area with its own login flow:

Admin sign-in: /[locale]/account-admin/sign-in  ·  Dashboard: /admin — both gated separately from the customer account area (/user) via the ADMIN_ROOT_URL / USER_ROOT_URL environment variables. See Section 4.

👤 Customer Account Panel — Personal account area

The customer account panel provides a dedicated area for customers to manage their account activity and information:

Also included:

3. Requirements

RequirementVersion / Notes
Node.js20.9 or later (Node.js 22.x recommended; development tested with Node.js 22.13.1)
Package manager npm, yarn, or pnpm
Next.js 15.5.x — App Router based project
React 19.x
Code editor Any modern code editor (VS Code recommended)

AyanTheme is a frontend template — no database or backend server is required to run the included interface. Authentication uses signed JWT session cookies (no database adapter), and storefront content is served from the included placeholder JSON data until you connect your own API.

Demo authentication: The customer account and Admin Dashboard sign-in screens are for demonstration only. In the included demo, the entered email and password are not checked or sent anywhere: any values sign you in as a fixed demo customer or demo administrator. Replace this with real authentication before going live — see Section 8.10.
Demo assets: Images shown in the live demos are not included in the downloadable package. The package contains simple placeholder images with matching dimensions and aspect ratios instead.

4. Installation

Follow these steps exactly, in order:

  1. Extract the ZIP file you downloaded to a folder on your computer.
  2. Open a terminal (Command Prompt, Terminal, or your editor's built-in terminal) inside the extracted project folder.
  3. Install dependencies:
    npm install

    or yarn install / pnpm install, depending on the package manager you prefer.

  4. Create your environment file by copying the example file:
    cp .env.example .env.local

    On Windows Command Prompt use copy .env.example .env.local. Then open .env.local and fill in at least JWT_SECRET and NEXTAUTH_SECRET. See the table below.

  5. Run the project locally:
    npm run dev

    Open http://localhost:3000 in your browser.

  6. To create a production build:
    npm run build
    npm run start

Environment Variables

VariableDescription
ASSET_PREFIXCDN base URL prepended to static asset paths (images, JS/CSS chunks, etc.) — leave empty to serve assets from the same domain as the site
BASE_PATHOnly needed if the site is hosted under a subfolder instead of the domain root (e.g. example.com/store) — leave empty otherwise
DOMAIN / PROTOCOLHostname and scheme of the deployed site, used together to build absolute URLs on the server (e.g. middleware locale redirects) when the incoming request isn't available — must match your real domain in production, not localhost
API_URLBase URL of the backend/API the frontend fetches data from
SITE_URLPublic URL of the site itself — used for canonical links, sitemap.xml, robots.txt, and Open Graph/social meta tags
NEXTAUTH_URLFull public URL of the deployed site, required by NextAuth to build auth callback URLs — must match your real domain in production
JWT_SECRETRandom secret string used to sign JWTs — generate a unique value per deployment, e.g. node -e "console.log(require('crypto').randomBytes(32).toString('base64'))", never reuse the example value
NEXTAUTH_SECRETRandom secret string NextAuth uses to sign/encrypt session tokens — generate a separate unique value per deployment
SIGNIN_URL / SIGNUP_URL / SIGNOUT_URL / ERROR_URL / VERIFY_REQUEST_URLCustom auth page routes for the customer account sign-in flow
SIGNIN_URL_ADMIN / SIGNUP_URL_ADMIN / SIGNOUT_URL_ADMIN / ERROR_URL_ADMIN / VERIFY_REQUEST_URL_ADMINSame as above, but for the separate admin login flow
USER_ROOT_URL / ADMIN_ROOT_URLBase path for the customer account area (/user) and admin dashboard (/admin) — used by middleware to detect which routes require a logged-in session
DEFAULT_LOCALELocale used when the URL has no locale prefix (e.g. en redirects / to /en). Must match one of the locales registered in i18n.ts
LOGO_URLPath of the site logo (default /assets/media/img/logo.png) — replace the file inside public/ or change this value

4.1 Troubleshooting

ProblemSolution
Build or install fails with syntax / engine errorsCheck your Node.js version with node -v. Node.js 20.9 or later is required.
Error mentioning a missing secret, or the sign-in page failsMake sure .env.local exists in the project root and that JWT_SECRET and NEXTAUTH_SECRET are filled in. Restart npm run dev after editing env files.
Sign-in redirects to the wrong address after deploySet NEXTAUTH_URL, SITE_URL, DOMAIN and PROTOCOL to your real domain (https) in your hosting provider's environment settings.
Changes to .env.local have no effectStop and restart the dev server. For production, rebuild with npm run build.
Peer dependency warnings or install errorsDelete node_modules and the lock file of another package manager, then run a fresh npm install.

5. Project Structure

AyanTheme follows a clean, domain-driven folder structure so related code stays together and is easy to customize:

src/
├── demos/                  # Demo-specific pages & UI (one folder per demo)
│   ├── fashion/
│   ├── beauty/
│   └── jewelry/
├── domains/                 # Shared business logic, organized by feature
│   ├── cart/
│   ├── product/
│   └── shipping/
└── shared/                  # Shared components, hooks, and utilities

You generally won't need to touch anything inside domains/ or shared/ unless you're changing core functionality. Day-to-day customization (colors, content, layout tweaks) happens inside demos/{demo-name}/.

6. Switching Between Demos

Each demo lives at its own route under a locale prefix (e.g. en, ar) — there is no build-time flag or environment variable to set. All three demos run side by side from the same codebase:

DemoBase RouteExample (EN)
Fashion/[locale]/fashionnext.ayantheme.com/en/fashion
Beauty/[locale]/beautynext.ayantheme.com/en/beauty
Jewelry/[locale]/jewelrynext.ayantheme.com/en/jewelry

Within a demo, each page that has multiple style variants (Home, Product, About, Contact) is selected with a style query parameter. The first style is the default and needs no parameter:

/en/fashion                      → Home, Style 1 (default)
/en/fashion?style=style2         → Home, Style 2
/en/fashion?style=style3         → Home, Style 3
/en/fashion/product/2?style=style2 → Product page, Style 2
/en/fashion/about?style=style3      → About page, Style 3

Pages with a single layout — Shop/product list, FAQ, Help Center, and Size Guide — don't take a style parameter, e.g. /en/fashion/search, /en/fashion/faq, /en/fashion/help-center, /en/fashion/size-guide.

7. Deployment

Because AyanTheme is a Next.js application, it does not use a one-click WordPress-style installer. It needs to be built and hosted on a Node.js-capable environment.

Option A — Deploy to Vercel (recommended, easiest)

  1. Create an account at vercel.com.
  2. Import your project (via Git, or with the Vercel CLI).
  3. Add your environment variables from .env.local in the Vercel project settings.
  4. Click Deploy — Vercel builds and hosts the site automatically.

Option B — Deploy to your own Node.js server

  1. Run npm run build on the server (or upload the built output).
  2. Run npm run start to serve the production build.
  3. Use a process manager such as PM2 to keep it running, and a reverse proxy (Nginx) if needed.
Standard shared/cPanel hosting (used for typical PHP/WordPress sites) does not support Next.js out of the box. Buyers will need Node.js hosting or a platform like Vercel.
Before going live: the demo sign-in accepts any email and password for both the customer area and the Admin Dashboard, so anyone could open /admin on a site deployed as-is. Connect real authentication first (Section 8.10) and set unique NEXTAUTH_SECRET and JWT_SECRET values for your deployment.

8. Customization

8.1 Global Colors & Theme Tokens

All color values are centralized so you can re-skin the entire template without touching component code:

Which palette is active is controlled by a single CSS class on <body> — matching the palette's key in $light-themes/$dark-themes (default, theme2, theme3, theme4, theme5). This class comes from settings.theme (see appSettings / the initial settings API) and is applied in the root layout: <body className={settings.theme}>. To re-theme a demo by default, change that value; to let visitors switch palettes live, they can use the floating Theme Switcher panel (palette icon, bottom of the screen) — built from ThemeSwitcher and StyleSwitcher in domains/core/presentation/components/, which also toggles Dark Mode and RTL and persists the palette choice to localStorage.

To re-theme a demo, update the token values in _light.scss — every component that references these tokens updates automatically.

8.2 Fashion Demo Customization

8.3 Beauty Demo Customization

8.4 Jewelry Demo Customization

8.5 Animations (GSAP & ScrollTrigger)

Scroll-based animations — pinned sections, scroll-stacking cards, and parallax image reveals — are built with GSAP and ScrollTrigger. Each animated component creates its ScrollTrigger inside a gsap.context() and cleans it up with ctx.revert() on unmount, so animations don't leak between page navigations. To disable or reduce animation on a specific component, open that component's file and either comment out the gsap.context()/useEffect block that registers its ScrollTrigger tween, or replace the tween's values with a static end-state (e.g. set the target element's final opacity/position directly instead of animating to it).

Smooth scrolling is powered by Lenis, synced to GSAP's ticker (gsap.ticker.add()) so ScrollTrigger positions stay accurate. Scroll weight/inertia is controlled by Lenis' lerp value — lower values (around 0.04–0.06) give a slower, heavier scroll feel; higher values feel snappier. Adjust it in src/shared/utils/lenis-instance.ts.

8.6 Sliders (Swiper.js)

Product and content sliders use Swiper.js. Slide count, spacing, and breakpoints can be adjusted in each slider component's Swiper configuration props.

8.7 Replacing Placeholder Images

All images are located inside public/data/demos/.... The placeholders are gray images with the same dimensions and aspect ratios as the live demo, so you can replace them with your own photography by keeping the same file names, or by changing the image paths in the demo's data files. For best results keep the original aspect ratio of each image.

8.8 Fonts & Arabic Text

Fonts are self-hosted under public/assets/fonts/ and mapped through the font variables in globals.scss. The bundled fonts cover Latin text only. In the Arabic (RTL) version, Arabic text is rendered with the visitor's system font. To use a specific Arabic font, add its @font-face rule and update the font variables in globals.scss.

8.9 Shopping Cart State & Persistence

The shopping cart uses Redux to keep the current cart state available to the storefront while the application is running. Where the cart data is persisted depends on whether the customer is signed in:

Important — expected behavior in the frontend demo: AyanTheme is supplied as a frontend template and does not include a configured production database or a working backend service. Therefore, when a customer is signed in, the cart API request cannot persist the cart unless you connect and implement the required backend/API endpoints and database. Redux may still show the cart during the current application session, but if the save request fails, that server-side cart is not stored; after a page refresh, the cart may appear empty. This is a backend integration limitation, not a cart UI bug in the template.

For production use, configure API_URL, implement the cart endpoints on your backend, and ensure they save and return the authenticated customer's cart. Verify that guest cart items are merged or synchronized on sign-in, and that the server returns the saved cart when the customer reloads the page.

8.10 Connecting Real Authentication

The customer and admin sign-in flows run through NextAuth and are configured in auth.config.ts in the project root. In the demo, each provider's authorize() function returns a fixed demo user without reading the entered credentials. To use your own backend:

  1. Set API_URL in .env.local to your backend.
  2. Implement the endpoints used by src/domains/user/infrastructure/services/auth.api.ts (the paths can be changed in that file):
    ActionDefault requestExpected response
    Sign inPOST {API_URL}/auth/login2xx with { user, token }. 401, 403 or 404 means wrong email or password.
    RegisterPOST {API_URL}/auth/register2xx with the created user. 409 means the email already exists; 400/422 means validation failed.
    Forgot passwordPOST {API_URL}/auth/forgot-password2xx
    Reset passwordPOST {API_URL}/auth/reset-password2xx
  3. In auth.config.ts, open each authorize() function, delete the demo return and uncomment the production example next to it. The admin provider needs its own endpoint and use case. isAdmin must come from your server's response, never from the client.
  4. Your backend must hash passwords and must never return a password in any response.
Good to know:

9. Languages & RTL

Text is managed through next-intl with locale-prefixed routes (/en, /ar), so all UI copy is translatable without editing component code. AyanTheme ships with English and Arabic (including full RTL) today; more locales can be added over time.

  1. Translation strings live in public/locales/{locale}.json — e.g. public/locales/en.json and public/locales/ar.json.
  2. To add a new language, duplicate the file, translate the values, and register the new locale in i18n.ts (the routing config imported as @/root/i18n).
  3. RTL is automatic for right-to-left locales (Arabic) — layout, icons and motion mirror without extra configuration once the locale is registered.

10. Third-Party Assets & Credits

The following third-party libraries and assets are used in this template. If you replace any included placeholder image, font, icon, or other asset with a third-party resource, make sure you have the appropriate rights or license to use and redistribute that resource. Keep this list accurate when assets are added or replaced.

AssetTypeLicense / Source
Next.js, React, React DOMFrameworkMIT — nextjs.org
TypeScriptLanguageApache-2.0
Tailwind CSS, SassStylingMIT
next-intlInternationalizationMIT
next-auth (Auth.js v5 beta)AuthenticationISC — authjs.dev
Redux Toolkit, React ReduxState managementMIT
React Hook Form, Yup, ZodForms & validationMIT
RechartsCharts (admin dashboard)MIT — recharts.org
LeafletMapsBSD-2-Clause — leafletjs.com. Map tiles: © OpenStreetMap contributors
TiptapRich-text editorMIT
GSAP + ScrollTriggerAnimation libraryFree for commercial use under the GSAP Standard License — gsap.com/standard-license
LenisSmooth scroll libraryMIT — github.com/darkroomengineering/lenis
Swiper.jsSlider libraryMIT — swiperjs.com
Framer MotionAnimation libraryMIT — framer.com/motion
Floating UI, react-select, react-range, react-dropzone, react-toastifyUI componentsMIT
sharp (libvips)Image optimization (installed by Next.js)Apache-2.0; prebuilt libvips binaries are LGPL-3.0-or-later, installed via npm and not modified
caniuse-liteBrowser data (Next.js dependency)CC-BY-4.0
Outfit, Poppins, Playfair Display, Inter, Righteous, Nanum GothicFonts (self-hosted under public/assets/fonts/)SIL Open Font License 1.1 — free for commercial use, including bundling inside a template. Sourced from Google Fonts.
LucideIcon setISC — lucide.dev/license
Font Awesome Free (via react-icons)Icon setIcons CC BY 4.0, fonts SIL OFL 1.1, code MIT — fontawesome.com/license/free
Live demo product & lifestyle photos (preview only, at next.ayantheme.com)Images (live demo only, not included in the download)AI-generated (Google Gemini, OpenAI ChatGPT) — preview only
Placeholder product & lifestyle photosImages (included in the download)Self-made — simple gray placeholder images with matching pixel dimensions and aspect ratios
Image sourcing: The live demo uses high-quality images for demonstration purposes. These demo images are not included in the downloadable package. Instead, the package includes simple placeholder images with matching dimensions and aspect ratios. This allows you to replace them with your own product and lifestyle photography while preserving the intended layout and image proportions.

11. Frequently Asked Questions

Do I need a database or backend to use this?

To run and explore the template: no. To run a real store: yes. AyanTheme is a frontend template and does not include a database or backend service. Out of the box it runs entirely on the included placeholder JSON data and fixed demo sign-in accounts, so you can install it, browse all three demos and the admin dashboard, and customize the design without any server.

To sell products you need your own backend (or a headless commerce service) that provides what the template cannot: product, order and customer data, real sign-in and registration, saved shopping carts, shipping and promotions, and payment processing. Point API_URL at it and adapt the endpoints in each domain's infrastructure/services folder — see the next question and Section 8.10.

Can I connect this to my own backend/API?

Yes. The API base URL is set once via the API_URL environment variable (see the table above) and read through Envs.API_URL in src/shared/utils/config.ts. Each domain's data-fetching files — e.g. domains/product/infrastructure/services/product-api.ts, domains/order/infrastructure/services/order.api.ts — build their requests from that base URL, so pointing API_URL at your own backend routes the storefront and Admin Dashboard through it; no per-file URL changes are needed unless your API's endpoint paths differ from the defaults. For sign-in, registration and password reset, see Section 8.10.

Are the customer and admin login flows separate?

Yes. Customers sign in at /[locale]/account/sign-in (for example /en/account/sign-in) and use the customer area at /user. Administrators sign in separately at /[locale]/account-admin/sign-in and use the dashboard at /admin. In the demo any email and password work for both; see Section 8.10 to connect real authentication.

Can I use this for multiple sites?

Each license covers one end product (one website / one domain). To use AyanTheme on additional websites or for additional clients, please purchase a separate license for each one.

Which languages are supported?

English and Arabic (including full RTL) ship today — see Section 9. More locales can be added following the same pattern.

How do I turn off an animation that feels too intense?

See Section 8.5.

12. Support

Before contacting support, please check the sections above and the FAQ — most questions are already answered here.

13. Changelog

VersionDateNotes
1.0.0October 2026Initial release — Fashion, Beauty, and Jewelry demos.