[![Website Preview](/public/img/page-preview.JPG)](https://aliarghyani.vercel.app) # Nuxt UI Portfolio ยท Ali Arghyani A modern, bilingual portfolio built with Nuxt 4, Nuxt UI, Tailwind CSS 4, and TypeScript. Features English and Persian (RTL) support with dark mode as default. ๐Ÿ”— **Live Demo**: [aliarghyani.vercel.app](https://aliarghyani.vercel.app) ## โœจ Features - **Nuxt 4** - Latest framework with `app/` directory structure - **Nuxt UI 4** - Modern component library with custom theming - **Tailwind CSS 4** - Utility-first styling with custom variants - **TypeScript** - Full type safety - **i18n** - English & Persian with automatic RTL switching - **Dark Mode** - Default theme with light mode option - **Responsive Images** - Optimized with `@nuxt/image` - **Performance** - Lazy loading, font preloading, reduced motion support ## ๏ฟฝ Quick Start ```bash # Install dependencies pnpm install # Start development server pnpm dev ``` Visit: http://localhost:3000 ### Requirements - Node.js 18.20.0 or newer (up to 22.x) - pnpm (recommended) or npm ### Available Scripts ```bash pnpm dev # Start dev server pnpm build # Build for production pnpm preview # Preview production build pnpm generate # Generate static site pnpm typecheck # Run TypeScript checks pnpm format # Check code formatting pnpm format:write # Fix code formatting ``` ## ๐Ÿ“ Project Structure ``` app/ # Source directory (srcDir) โ”œโ”€โ”€ app.vue # Root component โ”œโ”€โ”€ app.config.ts # Nuxt UI theme tokens โ”œโ”€โ”€ error.vue # Error page (404, 500) โ”œโ”€โ”€ assets/css/ # Tailwind & global styles โ”œโ”€โ”€ components/ # Auto-imported components โ”‚ โ”œโ”€โ”€ common/ # Shared UI (TopNav, Footer) โ”‚ โ””โ”€โ”€ portfolio/ # Portfolio components โ”œโ”€โ”€ composables/ # Auto-imported composables โ”œโ”€โ”€ data/ # Static content (EN/FA) โ”œโ”€โ”€ layouts/ # Layout components โ”œโ”€โ”€ middleware/ # Route middleware โ”œโ”€โ”€ pages/ # File-based routing โ”œโ”€โ”€ plugins/ # Nuxt plugins โ”œโ”€โ”€ types/ # TypeScript definitions โ””โ”€โ”€ utils/ # Helper functions server/ # Server-side code โ””โ”€โ”€ api/ # API endpoints โ””โ”€โ”€ health.get.ts # Health check (/api/health) public/ # Static assets โ”œโ”€โ”€ favicon/ # Favicon files โ”œโ”€โ”€ fonts/ # Local fonts (Roobert, Vazirmatn) โ””โ”€โ”€ img/ # Images i18n/ # Internationalization โ””โ”€โ”€ locales/ # Translation files (en.json, fa.json) ``` ## ๐ŸŒ Internationalization - **Strategy**: `prefix_except_default` (English is default, Persian uses `/fa` prefix) - **Locales**: English (`en`) and Persian (`fa`) with RTL support - **Content**: Separate data files for each language in `app/data/` - **Switching**: Automatic `lang` and `dir` attributes update on locale change ## ๐ŸŽจ Styling & Theming - **Tailwind CSS 4** with custom utilities and variants - **Nuxt UI tokens** in `app.config.ts` for consistent theming - **Dark mode** as default with `@nuxtjs/color-mode` - **Local fonts**: Roobert (EN) and Vazirmatn (FA) preloaded for performance - **Custom chip utility** for tags and badges ## ๐Ÿš€ Deployment ### Static Site Generation (SSG) This project is configured for full Static Site Generation with automatic blog post pre-rendering: ```bash # Generate static files with pre-rendered blog posts pnpm generate ``` The build process will: - Pre-render all blog posts (English & Persian) - Generate sitemap.xml automatically - Create RSS feeds for both languages - Output static files to `.output/public` ### Vercel (Recommended) ```bash # Install Vercel CLI npm i -g vercel # Deploy vercel ``` Or connect your GitHub repository to Vercel for automatic deployments. ### Other Static Hosting Platforms Compatible with any static hosting service: - **Netlify**: Deploy `.output/public` directory - **Cloudflare Pages**: Connect GitHub repo or upload `.output/public` - **GitHub Pages**: Deploy `.output/public` contents - **AWS S3 + CloudFront**: Upload `.output/public` to S3 bucket **Build Command**: `pnpm generate` **Output Directory**: `.output/public` ### Environment Variables - `NUXT_PUBLIC_LOAD_PLAUSIBLE` - Enable/disable Plausible analytics (optional) - `NUXT_PUBLIC_SITE_URL` - Site URL for sitemap and RSS (default: https://aliarghyani.vercel.app) ## ๐Ÿงช Testing the Structure ```bash # Homepage http://localhost:3000 # Persian version http://localhost:3000/fa # Health check API http://localhost:3000/api/health # 404 error page http://localhost:3000/non-existent-page ``` ## ๐Ÿ› ๏ธ Tech Stack - **Framework**: Nuxt 4 (Vue 3 + Vite) - **UI Library**: Nuxt UI 4 - **Styling**: Tailwind CSS 4 - **Language**: TypeScript - **i18n**: @nuxtjs/i18n - **Theme**: @nuxtjs/color-mode - **Images**: @nuxt/image - **Utilities**: VueUse ## ๐Ÿ“ Auto-imports Nuxt automatically imports: - Components from `app/components/` - Composables from `app/composables/` - Utils from `app/utils/` No explicit imports needed! ## ๐Ÿค Contributing Issues and pull requests are welcome. Please run `pnpm typecheck` and `pnpm format` before submitting changes. ## ๐Ÿ“„ License MIT License - See [LICENSE](./LICENSE) for details. --- **Made with โค๏ธ by Ali Arghyani**