A modern, full-featured admin panel for managing portfolio content built with Nuxt 3, TypeScript, and Tailwind CSS.
- π GitHub OAuth Authentication - Secure authentication via GitHub
- π Content Management - Full CRUD for posts, projects, experiences, and more
- π Multi-language Support - pt-BR and en-US content management
- π€ AI Integration - Content generation, translation, and SEO assistance
- π Dashboard - Overview of portfolio stats and recent activity
- π¨ Modern UI - Built with shadcn-vue components and Tailwind CSS
- π± Responsive Design - Mobile-first approach
- β Comprehensive Testing - Unit, component, and E2E tests
- π Production Ready - Optimized for Vercel deployment
- Framework: Nuxt 3
- Language: TypeScript (strict mode)
- Styling: Tailwind CSS
- UI Components: shadcn-vue (Reka UI)
- Icons: Lucide Vue Next
- State Management: Pinia
- Data Fetching: TanStack Query (Vue Query)
- Form Management: VeeValidate + Zod
- Rich Text Editor: TipTap
- Unit/Component: Vitest + @vue/test-utils
- E2E: Playwright
- Coverage: Vitest Coverage (100% for unit/component tests)
- Linting: ESLint
- Formatting: Prettier
- Git Hooks: Husky + lint-staged
- CI/CD: GitHub Actions
- Node.js 20.x or higher
- npm or yarn
git clone https://github.com/wallmartins/portfolio-admin.git
cd portfolio-adminnpm install
# or
yarn installCreate a .env file in the root directory:
cp .env.example .envConfigure the following variables:
# Portfolio API (main backend)
NUXT_PUBLIC_API_URL=http://localhost:9501
# AI API (separate backend service)
NUXT_PUBLIC_AI_API_URL=http://localhost:3001
# Optional: Sentry for error tracking
# SENTRY_DSN=https://your-sentry-dsn@sentry.io/project-idnpm run devVisit http://localhost:3000 to see the application.
npm run dev # Start development server
npm run build # Build for production
npm run preview # Preview production build
npm run generate # Generate static sitenpm run lint # Run ESLint
npm run lint:fix # Fix ESLint errors
npm run format # Format code with Prettiernpm run test # Run unit/component tests
npm run test:ui # Run tests with UI
npm run test:coverage # Generate coverage report
npm run test:e2e # Run E2E tests
npm run test:e2e:ui # Run E2E tests with UI
npm run test:e2e:report # View E2E test reportportfolio-admin/
βββ .github/ # GitHub Actions workflows
βββ app/ # Application source code
β βββ assets/ # Static assets (CSS, images)
β βββ components/ # Vue components
β β βββ ui/ # shadcn-vue components
β β βββ features/ # Feature-specific components
β β βββ layouts/ # Layout components
β βββ composables/ # Vue composables
β βββ layouts/ # Nuxt layouts
β βββ middleware/ # Route middleware
β βββ pages/ # File-based routing
β βββ plugins/ # Nuxt plugins
β βββ stores/ # Pinia stores
β βββ types/ # TypeScript types
β βββ utils/ # Utility functions
βββ public/ # Static public files
βββ tests/ # Test files
β βββ e2e/ # E2E tests
β βββ unit/ # Unit tests
β βββ setup.ts # Test setup
βββ nuxt.config.ts # Nuxt configuration
βββ tailwind.config.ts # Tailwind configuration
βββ package.json # Dependencies
This application uses GitHub OAuth for authentication:
- User clicks "Login with GitHub"
- Redirected to backend API
/auth/github/redirect - GitHub OAuth authorization
- Callback to backend
/auth/github/callback - Backend returns JWT + user data
- Frontend stores JWT in localStorage
No GitHub credentials needed in frontend - all OAuth logic is handled by the backend API.
The application consumes two backend APIs:
- Base URL:
NUXT_PUBLIC_API_URL - Endpoints:
GET/POST/PUT/DELETE /admin/posts- Blog postsGET/POST/PUT/DELETE /admin/projects- ProjectsGET/POST/PUT/DELETE /admin/techs- TechnologiesGET/POST/PUT/DELETE /admin/social- Social linksGET/POST/PUT/DELETE /admin/experiences- Work experienceGET/POST/PUT/DELETE /admin/about- About information
- Base URL:
NUXT_PUBLIC_AI_API_URL - Features:
- Content generation for posts/projects
- Auto-translation (pt-BR β en-US)
- SEO meta description generation
# All unit/component tests
npm run test
# With coverage
npm run test:coverage
# E2E tests (requires running dev server)
npm run dev # In one terminal
npm run test:e2e # In another terminalCurrent coverage: 100% for unit/component tests
- β useAuth composable: 14/14 tests
- β Components: 9/9 tests
- β useApi composable: 2/2 tests
See TESTING.md for detailed testing documentation.
- Install Vercel CLI:
npm i -g vercel- Login to Vercel:
vercel login- Deploy:
# Preview deployment
vercel
# Production deployment
vercel --prod- Set environment variables in Vercel dashboard:
NUXT_PUBLIC_API_URLNUXT_PUBLIC_AI_API_URLSENTRY_DSN(optional)
Make sure to configure:
- Portfolio API URL (production backend)
- AI API URL (production AI service)
- GitHub OAuth callback URLs must match production URL
- β Code Splitting - Automatic route-based splitting
- β Image Optimization - WebP/AVIF formats with responsive sizes
- β Lazy Loading - Heavy components loaded on demand
- β Asset Compression - Gzip/Brotli compression enabled
- β Tree Shaking - Unused code eliminated
- β Caching - Optimized caching strategies
- β ARIA Labels - Proper ARIA attributes
- β Keyboard Navigation - Full keyboard support
- β Focus Management - Visible focus indicators
- β Screen Reader - Screen reader friendly
- β Color Contrast - WCAG AA compliant
- Fork the repository
- Create your feature branch (
git checkout -b feat/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feat/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
For issues and questions:
- Open an issue on GitHub
- Check the documentation
Built with β€οΈ using Nuxt 3