About This Starter

PaalStack Next.js Starter is the official foundation template for all future PaalStack applications — designed for SaaS, enterprise tools, admin dashboards, internal tools, and AI-powered applications. It follows production conventions so teams can onboard and ship features immediately.


Project Structure

Each module follows a consistent component.tsx / page.tsx + index.ts barrel pattern.

  • src/app/

    Next.js App Router pages, layouts, and API routes

  • src/actions/

    Server Actions for form handling and mutations

  • src/apis/

    Axios HTTP client and typed API service modules

  • src/components/

    Shared UI components (not page-specific)

  • src/constants/

    App-wide constants and route definitions

  • src/features/

    Feature-scoped modules (auth, etc.)

  • src/hooks/

    Custom React hooks — queries, mutations, utilities

  • src/libs/

    Third-party library configs (env, query-client, axios)

  • src/providers/

    React context providers (QueryProvider, ThemeProvider)

  • src/schemas/

    Zod validation schemas for forms and APIs

  • src/services/

    Business-logic service layer

  • src/stores/

    Zustand global state with devtools and persistence

  • src/styles/

    Global CSS and Tailwind v4 theme configuration

  • src/test/

    Test utilities, setup, and Playwright E2E specs

  • src/types/

    Shared TypeScript type definitions

  • src/utils/

    Pure utility functions (cn, logger, helpers)


File Conventions

  • Components: component.tsx + index.ts barrel export
  • Pages: app/route/page.tsx (Next.js App Router convention)
  • Hooks: hook.ts + index.ts
  • API modules: api.ts + type.ts + index.ts
  • Test files co-located next to the source file (*.test.tsx)
  • Server Actions: src/actions/ directory