Welcome to the documentation for the Portfolio Project. This documentation provides comprehensive information about the project's architecture, components, APIs, and development guidelines.
This portfolio project is built with Next.js 15 using the App Router architecture pattern, with a focus on:
- Type-safe development using TypeScript
- Server-side rendering and static site generation where appropriate
- Component-based UI development with Tailwind CSS and Radix UI
- API integrations with proper error handling
- Performance optimization through caching and component design
The project follows strict code quality standards:
- TypeScript with strict type checking
- ESLint configuration with strict rules
- Prettier for consistent code formatting
- Organized constants to avoid magic numbers/strings
- Consistent component patterns
npm run dev: Start the development servernpm run build: Build for productionnpm run start: Start the production servernpm run lint: Run ESLint for code lintingnpm run format: Format code with Prettiernpm run format:check: Check code formatting without making changesnpm run type-check: Run TypeScript type checkingnpm run validate: Run all validation checksnpm run test: Run tests with Vitestnpm run test:integration: Run integration testsnpm run test:ui: Run tests with UI
portfolio/
├── app/ # Next.js App Router structure
│ ├── actions/ # Server actions
│ ├── error.tsx # Error handling component
│ ├── layout.tsx # Root layout component
│ ├── loading.tsx # Loading state component
│ ├── not-found.tsx # 404 page
│ ├── page.tsx # Home page
│ └── sitemap.ts # Sitemap generator
├── components/ # UI components
│ ├── icons/ # Icon components
│ ├── layout/ # Layout components
│ ├── sections/ # Page sections
│ └── ui/ # Reusable UI components
├── config/ # Configuration files
│ ├── cache.config.ts # Cache configuration
│ ├── common.config.ts # Common constants
│ ├── cors.config.ts # CORS configuration
│ ├── defaults.config.ts # Default values
│ ├── errors.config.ts # Error messages
│ ├── ui.config.ts # UI constants
│ ├── urls.config.ts # URL configurations
│ └── validator.config.ts # Validation rules
├── contexts/ # React context providers
├── data/ # Static data
├── hooks/ # Custom React hooks
├── lib/ # Core utilities and services
├── middleware/ # Next.js middleware
├── public/ # Static assets
└── types/ # TypeScript type definitions
- Framework: Next.js 15, React 19
- Language: TypeScript
- Styling: Tailwind CSS 4, Radix UI components
- Form Handling: React Hook Form, Zod validation
- API: Next.js API routes, Server Actions
- Email: Resend for email delivery
- DNS Management: Cloudflare API integration
- Deployment: Vercel
- Analytics: Vercel Analytics, Speed Insights
- CMS: Notion API integration
- Testing: Vitest
- Use strict type checking
- Avoid using
anytype - Use type guards for runtime type checking
- Keep types centralized in the types directory
- Use functional components with hooks
- Implement proper error boundaries
- Use React Server Components where appropriate
- Follow the component composition pattern
- Use consistent response formats
- Implement proper error handling
- Add rate limiting to prevent abuse
- Use appropriate caching strategies
- Optimize images and assets
- Implement code splitting
- Use memoization for expensive calculations
- Implement proper caching strategies
When contributing to this project, please follow these guidelines:
- Create a feature branch from
main - Follow the code style guidelines
- Write tests for new features
- Run validation before submitting a pull request
- Keep pull requests focused on a single feature or bug fix
This project includes a dynamically generated sitemap at /sitemap.xml that includes:
- All static pages
- All blog posts with proper lastmod dates
- Appropriate change frequencies and priorities for different content types
To access the sitemap, visit /sitemap.xml in your browser.
A robots.txt file is included to guide search engine crawlers:
- Allows crawling of most content
- Restricts crawling of admin and API routes
- References the sitemap location
This project is licensed under the MIT License - see the LICENSE file for details.