Project Structure (Suggestion):
my-portfolio/
├── components/ # Reusable UI components (atoms, molecules, organisms)
│ ├── common/ # Buttons, Icons, Links, etc.
│ ├── layout/ # Navbar, Footer, PageWrapper
│ ├── sections/ # Hero, About, Projects, Contact sections
│ └── ui/ # Specific UI elements like Cards, Modals
├── constants/ # Site metadata, navigation links, etc.
├── data/ # Project details, resume data (or fetch from API/CMS)
├── hooks/ # Custom React Hooks
├── lib/ # Helper functions, API clients
├── pages/ # Next.js routes (index.tsx, projects/[slug].tsx, api/)
├── public/ # Static assets (images, fonts, favicon)
├── styles/ # Global styles, base Tailwind overrides
│ └── globals.css # Import Tailwind, define base styles, custom fonts
├── types/ # TypeScript type definitions
├── utils/ # Utility functions
├── tailwind.config.js # Tailwind configuration
├── tsconfig.json # TypeScript configuration
└── next.config.mjs # Next.js configuration (use .mjs for ESM)
Tailwind Configuration (tailwind.config.js):
- Theme Customization: This is CRUCIAL for uniqueness.
- Define your color palette: primary, secondary, accent, neutrals (light/dark). Avoid default Tailwind colors directly for key elements.
- Configure fonts: Use
@font-face in globals.css or a font provider. Define fontFamily in theme.extend. Choose sophisticated, readable fonts.
- Customize spacing, breakpoints, borderRadius, etc., to create a distinct feel.
- Plugins: Consider official plugins (
@tailwindcss/typography, @tailwindcss/forms, @tailwindcss/aspect-ratio) or community plugins if needed.
// tailwind.config.js
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx,mdx}',
'./components/**/*.{js,ts,jsx,tsx,mdx}',
// Add other paths if necessary
],
darkMode: 'class', // or 'media'
theme: {
extend: {
colors: {
primary: { // Example custom palette
light: '#ABCDEF',
DEFAULT: '#123456',
dark: '#012345',
},
secondary: '#FF5733',
neutral: {
100: '#F5F5F5',
// ... other shades
900: '#111111',
},
},
fontFamily: {
sans: ['var(--font-primary)', 'sans-serif'], // Define CSS variable in layout
serif: ['var(--font-secondary)', 'serif'],
},
animation: { // Custom animations
'fade-in-up': 'fadeInUp 0.5s ease-out forwards',
},
keyframes: { // Custom keyframes
fadeInUp: {
'0%': { opacity: '0', transform: 'translateY(20px)' },
'100%': { opacity: '1', transform: 'translateY(0)' },
},
},
// Add custom spacing, borderRadius, etc.
},
},
plugins: [
require('@tailwindcss/typography'),
// other plugins...
],
}