A modern, full-featured portfolio website built with Next.js 16, featuring a public portfolio showcase and a comprehensive admin dashboard for content management.
This frontend application provides both a public-facing portfolio website and an admin dashboard for managing portfolio content. Built with Next.js App Router, featuring multi-language support, responsive design, and modern UI components.
- Framework: Next.js 16 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS 4
- UI Components: Radix UI, shadcn/ui
- State Management: Zustand, TanStack Query (React Query)
- Forms: React Hook Form + Zod validation
- Internationalization: next-intl
- Animations: Framer Motion
- Icons: Lucide React, Tabler Icons
- Rich Text Editor: Tiptap
- HTTP Client: Axios
- Authentication: Better Auth
- Tables: TanStack Table
- Charts: Recharts
client/
βββ src/
β βββ app/ # Next.js App Router
β β βββ [locale]/ # Internationalized routes
β β β βββ layout.tsx # Root layout with providers
β β β β # - Theme provider
β β β β # - React Query provider
β β β β # - next-intl provider
β β β β # - Font loading (Poppins/Cairo)
β β β β
β β β βββ (portfolio)/ # Public portfolio routes (route group)
β β β β βββ layout.tsx # Portfolio layout (navbar, footer)
β β β β β
β β β β βββ (home)/ # Home page route group
β β β β β βββ page.tsx # Home page
β β β β β βββ _components/
β β β β β βββ hero-section.tsx
β β β β β βββ statistics-section.tsx
β β β β β βββ about-section.tsx
β β β β β βββ services-section.tsx
β β β β β βββ featured-projects-section.tsx
β β β β β βββ testimonials-section.tsx
β β β β β βββ cta-section.tsx
β β β β β
β β β β βββ projects/ # Projects pages
β β β β β βββ page.tsx # Projects listing
β β β β β βββ _components/
β β β β β β βββ projects-page-client.tsx
β β β β β βββ [slug]/ # Dynamic project detail
β β β β β βββ page.tsx
β β β β β βββ _components/
β β β β β βββ project-details-client.tsx
β β β β β
β β β β βββ services/ # Services pages
β β β β β βββ page.tsx # Services listing
β β β β β βββ _components/
β β β β β β βββ services-page-client.tsx
β β β β β βββ [slug]/ # Dynamic service detail
β β β β β βββ page.tsx
β β β β β βββ _components/
β β β β β βββ service-detail-client.tsx
β β β β β
β β β β βββ contact/ # Contact page
β β β β βββ page.tsx
β β β β βββ _components/
β β β β βββ contact-section.tsx
β β β β
β β β βββ auth/ # Authentication pages
β β β β βββ layout.tsx # Auth layout
β β β β βββ login/
β β β β β βββ page.tsx
β β β β βββ register/
β β β β β βββ page.tsx
β β β β βββ forget-password/
β β β β β βββ page.tsx
β β β β βββ reset-password/
β β β β β βββ page.tsx
β β β β βββ verify-account/
β β β β βββ page.tsx
β β β β
β β β βββ dashboard/ # Admin dashboard
β β β βββ layout.tsx # Dashboard layout (sidebar, header)
β β β βββ page.tsx # Dashboard home
β β β β
β β β βββ profile/ # User profile
β β β β βββ page.tsx
β β β β βββ _components/
β β β β βββ profile-page-client.tsx
β β β β βββ overview-tab.tsx
β β β β βββ edit-profile-tab.tsx
β β β β βββ change-password-tab.tsx
β β β β
β β β βββ projects/ # Projects management
β β β β βββ page.tsx # Projects list
β β β β βββ create/
β β β β β βββ page.tsx
β β β β βββ [id]/
β β β β β βββ page.tsx
β β β β β βββ edit/
β β β β β β βββ page.tsx
β β β β β βββ images/
β β β β β βββ page.tsx
β β β β βββ _components/
β β β β βββ projects-page-client.tsx
β β β β βββ project-form.tsx
β β β β βββ columns.tsx
β β β β βββ data-table-actions.tsx
β β β β βββ data-table-toolbar.tsx
β β β β βββ delete-project-modal.tsx
β β β β βββ project-images-manager.tsx
β β β β βββ project-images-upload.tsx
β β β β βββ project-links-manager.tsx
β β β β βββ thumbnail-upload.tsx
β β β β
β β β βββ services/ # Services management
β β β βββ categories/ # Categories management
β β β βββ technologies/ # Technologies management
β β β βββ testimonials/ # Testimonials management
β β β βββ contacts/ # Contact inquiries
β β β βββ inquiry-types/# Inquiry types
β β β βββ users/ # User management
β β β βββ settings/ # Site settings
β β β βββ page.tsx
β β β βββ _components/
β β β βββ settings-page-client.tsx
β β β βββ hero-tab.tsx
β β β βββ about-tab.tsx
β β β βββ statistics-tab.tsx
β β β βββ footer-tab.tsx
β β β βββ github-tab.tsx
β β β βββ cv-tab.tsx
β β β
β β βββ globals.css # Global styles
β β βββ page.tsx # Root page (redirects to locale)
β β βββ error.tsx # Error boundary
β β βββ loading.tsx # Loading component
β β βββ not-found.tsx # 404 page
β β
β βββ components/ # Reusable components
β β βββ ui/ # shadcn/ui components
β β β # - Button, Input, Dialog, etc.
β β β # - All Radix UI based components
β β β
β β βββ forms/ # Form components
β β β # - Reusable form wrappers
β β β # - Form field components
β β β
β β βββ inputs/ # Input components
β β β # - Custom input variants
β β β # - File upload inputs
β β β
β β βββ buttons/ # Button components
β β β # - Button variants
β β β # - Icon buttons
β β β
β β βββ auth/ # Auth-related components
β β β βββ auth-guard.tsx # Auth protection wrapper
β β β βββ protected-route.tsx
β β β
β β βββ portfolio/ # Portfolio-specific components
β β β # - Navbar, Footer
β β β # - Project cards
β β β # - Service cards
β β β
β β βββ projects/ # Project-related components
β β β # - Project display components
β β β
β β βββ services/ # Service-related components
β β β # - Service display components
β β β
β β βββ shared/ # Shared components
β β βββ logo.tsx
β β βββ other shared components
β β
β βββ modules/ # Feature modules (API integration)
β β βββ auth/
β β β βββ auth-api.ts # API functions
β β β β # - login, register, etc.
β β β βββ auth-hook.ts # React Query hooks
β β β β # - useLogin, useRegister, etc.
β β β βββ auth-type.ts # TypeScript types
β β β
β β βββ projects/
β β β βββ projects-api.ts
β β β βββ projects-hook.ts
β β β βββ projects-type.ts
β β β
β β βββ services/
β β βββ categories/
β β βββ technologies/
β β βββ testimonials/
β β βββ contacts/
β β βββ inquiry-types/
β β βββ site-settings/
β β βββ users/
β β
β βββ lib/ # Utilities and configurations
β β βββ axios.ts # Axios instance
β β β # - Base URL configuration
β β β # - Request interceptor (token injection)
β β β # - Response interceptor (token refresh)
β β β # - Error handling
β β βββ utils.ts # Utility functions
β β # - cn() for className merging
β β # - Other helper functions
β β
β βββ hooks/ # Custom React hooks
β β βββ use-debounced-value.ts # Debounce hook
β β βββ use-file-upload.ts # File upload hook
β β βββ use-mobile.ts # Mobile detection hook
β β βββ use-query-params.ts # URL query params hook
β β
β βββ stores/ # State management (Zustand)
β β βββ use-auth-store.ts # Auth state store
β β # - Access token
β β # - Refresh token
β β # - User data
β β # - Auth actions
β β
β βββ providers/ # React context providers
β β βββ react-query-provider.tsx
β β β # - TanStack Query provider
β β β # - Query client configuration
β β βββ theme-provider.tsx
β β # - next-themes provider
β β # - Dark/light mode
β β
β βββ constants/ # Application constants
β β βββ routes.ts # Route definitions
β β βββ auth.constants.ts # Auth-related constants
β β βββ site.constants.ts # Site configuration constants
β β
β βββ i18n/ # Internationalization config
β β βββ routing.ts # Route configuration
β β βββ navigation.ts # Navigation helpers
β β βββ request.ts # Server-side i18n
β β
β βββ types/ # TypeScript types
β β βββ api-type.ts # API response types
β β
β βββ utils/ # Utility functions
β βββ dynamic-icon-loader.ts # Dynamic icon loading
β βββ get-dir.ts # Get text direction (RTL/LTR)
β βββ get-side.ts # Get sidebar position
β βββ icon-utils.tsx # Icon utility functions
β
βββ messages/ # Translation files
β βββ en.json # English translations
β βββ ar.json # Arabic translations
β βββ en.d.json.ts # Type-safe translation types
β
βββ public/ # Static assets
β βββ images/ # Image assets
β β βββ bg-auth.jpg
β βββ Saeed-Altout-CV.pdf # CV file
β
βββ next.config.ts # Next.js configuration
βββ tailwind.config.ts # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ components.json # shadcn/ui configuration
βββ package.json
Each feature module follows a consistent pattern:
module-name/
βββ module-name-api.ts # API functions
β # - Axios API calls
β # - Request/response handling
β
βββ module-name-hook.ts # React Query hooks
β # - useQuery hooks for fetching
β # - useMutation hooks for mutations
β # - Optimistic updates
β
βββ module-name-type.ts # TypeScript types
# - Request types
# - Response types
# - Shared types
- Server Components: Default in Next.js App Router for better performance
- Client Components: Marked with
"use client"for interactivity - Route Groups:
(portfolio),(home)organize routes without affecting URLs - Private Components:
_components/folder for page-specific components
-
Zustand: Client-side auth state
- Access token, refresh token
- User data
- Auth actions (login, logout, etc.)
-
React Query: Server state management
- API data caching
- Automatic refetching
- Optimistic updates
- Loading and error states
- Axios Instance: Configured in
lib/axios.ts- Automatic token injection via request interceptor
- Token refresh on 401 errors
- Request/response transformation
- Error handling and retry logic
- Locale-based Routing:
[locale]dynamic segment/en/...for English/ar/...for Arabic
- Route Groups: Organize routes without URL changes
- Dynamic Routes:
[slug],[id]for dynamic content
- Node.js 18+ and npm
- Backend API running (see server README)
-
Install dependencies
npm install
-
Set up environment variables
Create a
.env.localfile:NEXT_PUBLIC_BACKEND_URL=http://localhost:3000/api NEXT_PUBLIC_SUPABASE_URL=your_supabase_url NEXT_PUBLIC_SUPABASE_ANON_KEY=your_supabase_anon_key
-
Start development server
npm run dev
The application will be available at
http://localhost:3001
- Home Page: Hero section, statistics, about, services, featured projects, testimonials
- Projects: Browse and view project details with images and descriptions
- Services: View available services with detailed information
- Contact: Contact form with inquiry type selection
- Multi-language: English and Arabic with RTL support
- Responsive Design: Mobile-first, fully responsive
- Dark Mode: Theme switching support
- Authentication: Login, registration, email verification, password reset
- Projects Management: CRUD operations with image galleries
- Services Management: Manage services with icons and descriptions
- Categories Management: Organize projects by categories
- Technologies Management: Manage technology stack
- Testimonials Management: Add and manage client testimonials
- Contact Management: View and reply to contact inquiries
- User Management: Manage users and roles
- Site Settings: Configure site-wide settings
- Profile Management: Update profile, change password, upload avatar
- Server Components: Default for better performance
- Client Components: For interactivity (forms, modals)
- Type Safety: Full TypeScript coverage
- Form Validation: Zod schemas with React Hook Form
- Image Optimization: Next.js Image component
- SEO: Metadata API for each page
- Error Handling: Error boundaries and user-friendly messages
- Loading States: Loading UI for better UX
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Lint code- Styling: Use Tailwind CSS for all styling
- Animations: Use Framer Motion for animations
- Components: Follow component naming conventions
- API Validation: Use Zod for all API endpoint validation
- Types: Export types generated from Zod schemas
- Naming: Use kebab-case for file names
-
Create API module in
src/modules/feature-name/feature-name-api.ts- API functionsfeature-name-hook.ts- React Query hooksfeature-name-type.ts- Types
-
Create components in appropriate location
- Public components in
app/[locale]/(portfolio)/... - Dashboard components in
app/[locale]/dashboard/... - Shared components in
components/
- Public components in
-
Add translations in
messages/en.jsonandmessages/ar.json -
Create pages using Next.js App Router conventions
Server Component Example:
// app/[locale]/page.tsx
export default async function Page() {
const data = await fetchData(); // Server-side data fetching
return <ServerComponent data={data} />;
}Client Component Example:
// components/example.tsx
"use client";
import { useState } from "react";
export function ClientComponent() {
const [state, setState] = useState();
// Client-side interactivity
}This project is private and proprietary.
Built with β€οΈ using Next.js