Skip to content

Instantly share code, notes, and snippets.

@nurmdrafi
Created March 3, 2025 15:45
Show Gist options
  • Save nurmdrafi/d72e1a4609fc243144b2b2ec43a00914 to your computer and use it in GitHub Desktop.
Save nurmdrafi/d72e1a4609fc243144b2b2ec43a00914 to your computer and use it in GitHub Desktop.
Folder Structure
src/
├── app/                          # Next.js app router
│   ├── (marketing)/              # Public pages (e.g., home, about)
│   ├── (shop)/                   # Shop-related pages
│   ├── (product)/                # Product-related pages
│   ├── (admin)/                  # Admin-related pages
│   ├── layout.tsx                # Root layout
│   └── page.tsx                  # Home page
├── components/                   # Reusable components
│   ├── ui/                       # UI primitives (e.g., buttons, cards)
│   ├── layout/                   # Layout components (e.g., header, footer)
│   ├── common/                   # Shared components (e.g., product grid)
│   └── features/                 # Feature-specific components
├── lib/                          # Shared utilities and helpers
│   ├── api/                      # API clients and services
│   ├── constants/                # Constants (e.g., routes, config)
│   └── utils/                    # Utility functions
├── hooks/                        # Custom React hooks
├── store/                        # State management (e.g., Redux, Zustand)
├── types/                        # TypeScript types and interfaces
├── styles/                       # Global styles and Tailwind config
├── tests/                        # Unit and integration tests
│   ├── components/               # Component tests
│   ├── lib/                      # Utility tests
│   └── __mocks__/                # Mock files
└── public/                       # Static assets
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment