- π¨ Modern Design: Clean, minimalist UI with dark mode support using
next-themes - π± Fully Responsive: Optimized for all devices from mobile to desktop
- β‘ Server-Side Rendering: Built with Next.js 15 App Router for optimal performance
- ποΈ Headless CMS: Powered by Sanity for easy content management
- π― Project Showcase: Dynamic project portfolio with categorization
- π€ Profile Management: Editable bio, social links, and professional information
- π Analytics: Integrated with Vercel Analytics for visitor insights
- π Rich Content: Support for Portable Text with custom components
- π SEO Optimized: Meta tags and structured data for better search visibility
- βοΈ Type Safety: Fully typed with TypeScript for robust development
- π¨ Tailwind CSS: Utility-first styling with custom plugins for typography and forms
- Framework: Next.js 15.5.7 with App Router
- Language: TypeScript 5.3.2
- Styling: Tailwind CSS 3.3.5
- UI Components: @headlessui/react 2.2.7
- Theme: next-themes 0.4.6
- Content Rendering: @portabletext/react 4.0.3
- Date Formatting: date-fns 4.1.0
- CMS: Sanity 4.6.1
- Sanity Client: next-sanity 10.0.16
- Content Management: Sanity Studio (embedded at
/studio)
- Analytics: @vercel/analytics 1.5.0
- Deployment: Optimized for Vercel
- Package Manager: pnpm 10.15.0
my-portfolio/
βββ app/
β βββ (site)/ # Main site routes
β β βββ components/ # Reusable UI components
β β βββ projects/ # Project showcase pages
β β βββ admin/ # Admin dashboard
β β βββ layout.tsx # Site layout wrapper
β β βββ page.tsx # Homepage
β βββ (studio)/ # Sanity Studio routes
β β βββ studio/
β β βββ [[...index]]/
β βββ schemas/ # Sanity schemas
β β βββ profile.ts # Profile content type
β β βββ project.ts # Project content type
β β βββ category.ts # Category content type
β β βββ index.ts # Schema exports
β βββ types/ # TypeScript type definitions
β βββ utils/ # Utility functions
β β βββ sanity.client.ts # Sanity client configuration
β β βββ flatListHierarchical.ts
β βββ layout.tsx # Root layout
β βββ globals.css # Global styles
β βββ not-found.tsx # 404 page
βββ public/
β βββ images/
β βββ socials/ # Social media icons
βββ sanity-project/ # Standalone Sanity studio
βββ .github/
β βββ ISSUE_TEMPLATE/ # GitHub issue templates
βββ sanity.config.ts # Sanity configuration
βββ next.config.js # Next.js configuration
βββ tailwind.config.ts # Tailwind CSS configuration
βββ tsconfig.json # TypeScript configuration
βββ package.json # Project dependencies
- Node.js 20.x or higher
- pnpm 10.15.0 (or npm/yarn)
- Sanity Account (free at sanity.io)
-
Clone the repository
git clone https://github.com/OthyTenk/my-portfolio.git cd my-portfolio -
Install dependencies
pnpm install # or npm install -
Set up Sanity CMS
Navigate to the sanity-project directory:
cd sanity-projectLogin to Sanity and create a new project:
npx sanity@latest login npx sanity@latest init
Follow the prompts to:
- Create a new project or select an existing one
- Choose the "Clean" template
- Set dataset to "production"
-
Configure Sanity credentials
Update
sanity.config.tswith your project credentials:export default defineConfig({ name: "sanity-project", title: "Your Portfolio", projectId: "YOUR_PROJECT_ID", // Get from sanity.io dataset: "production", // ... rest of config });
-
Run the development server
In the main project directory:
pnpm dev # or npm run devIn a separate terminal, run Sanity Studio:
cd sanity-project pnpm dev # or npm run dev
-
Access the application
- Portfolio Site: http://localhost:3000
- Sanity Studio (embedded): http://localhost:3000/studio
- Sanity Studio (standalone): http://localhost:3333
-
Profile Information
- Navigate to Studio β Profile
- Add your personal information, bio, profile picture
- Configure social media links (GitHub, LinkedIn, Twitter)
- Upload your resume (optional)
-
Projects
- Navigate to Studio β Projects
- Click "Create" to add a new project
- Fill in project details:
- Title & Slug
- Overview/Description
- Project Image
- Live Link
- Categories
- Date
-
Categories
- Navigate to Studio β Categories
- Create parent categories (e.g., "Frontend", "Backend")
- Create child categories for specific technologies
- Add category images/icons
Customize the theme in tailwind.config.ts:
const config: Config = {
theme: {
extend: {
colors: {
// Add your custom colors
},
// Add custom fonts, spacing, etc.
},
},
};The portfolio includes a built-in dark mode toggle. Customize dark mode colors in:
app/layout.tsx- Root theme setupapp/globals.css- Global dark mode styles- Component-level Tailwind classes using
dark:prefix
-
Push your code to GitHub
git add . git commit -m "Initial commit" git push origin main
-
Import to Vercel
- Visit vercel.com
- Import your GitHub repository
- Vercel will auto-detect Next.js settings
- Add environment variables if needed
- Deploy!
-
Deploy Sanity Studio
cd sanity-project pnpm run deploy # or npm run deploy
If using external APIs or services, create a .env.local file:
NEXT_PUBLIC_SANITY_PROJECT_ID=your_project_id
NEXT_PUBLIC_SANITY_DATASET=production
SANITY_API_TOKEN=your_api_token (for mutations)This portfolio includes Vercel Analytics for tracking visitor metrics. To enable:
-
Enable in Vercel Dashboard
- Navigate to your project in Vercel
- Go to Analytics tab
- Enable Analytics
-
Already integrated via
@vercel/analytics/reactinapp/layout.tsx
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Please read CONTRIBUTING.md for details on our code of conduct and development process.
This project is licensed under the MIT License - see the LICENSE file for details.
OkDo
- Next.js for the amazing React framework
- Sanity.io for the flexible headless CMS
- Tailwind CSS for the utility-first CSS framework
- Vercel for seamless deployment and hosting
If you have any questions or run into issues, please:
- Open an Issue
- Check existing Discussions
- Review the Security Policy
Made with β€οΈ by OkDo
β Star this repo if you found it helpful!
