logoAyoub Omari

Portfolio

A modern portfolio and blog platform featuring a comprehensive dashboard, blog system, and project showcase.

8/9/2024 - 11/11/2024
GitHubWebsite
Posted on: 1/8/2025 | Edited on: 1/12/2025

Modern Portfolio With Blog And Projects Showcase

🌐 Live Demo

Portfolio Homepage
Next.js TypeScript Tailwind CSS PostgreSQL

✨ Features

  • 📝 Blog System - Create and manage blog posts with markdown support
  • 🎨 Project Showcase - Display your projects with detailed descriptions
  • 📬 Contact Form - Professional contact form with email notifications
  • 📊 Admin Dashboard - Comprehensive dashboard for content management
  • 📱 Responsive Design - Fully responsive across all devices
  • 🌙 Dark Mode - Toggle between light and dark themes
  • 📊 Analytics Integration - Track visitor engagement
  • 📨 Newsletter System - Manage email subscriptions

🖥️ Preview

Admin Dashboard Admin Dashboard

Contact Page

🚀 Tech Stack

  • Framework: Next.js 14
  • Language: TypeScript
  • Styling: Tailwind CSS
  • Database: PostgreSQL with Drizzle ORM
  • Authentication: Lucia Auth
  • Email: Nodemailer
  • UI Components: Shadcn UI
  • Charts: Recharts
  • Markdown: React Markdown
  • Icons: Lucide React, Font Awesome

📦 Installation

  1. Clone the repository:
git clone https://github.com/ayoubomari/portfolio.git
cd portfolio
  1. Install dependencies:
npm install
  1. Copy the environment variables:
cp .env.example .env
  1. Update the .env file with your configuration:
PORT=3000
DATABASE_HOST=HOST
DATABASE_USERNAME=USERNAME
DATABASE_PASSWORD=PASSWORD
DATABASE_NAME=DB_NAME
SECRET_KEY="#YOUR_SECRET_KEY"
NEXT_PUBLIC_SITE_URL=http://localhost:3000
NEXT_PUBLIC_API_URL=http://localhost:3000/api

SMTP_HOST="smtp.email.com"
SMTP_PORT="465"
SMTP_EMAIL="[email protected]"
SMTP_PASSWORD="PASSWORD"
RECEIVER_EMAIL="[email protected]"
  1. Initialize the database:
npm run generate  # Generate database migrations
npm run push     # Push migrations to database
node scripts/initialisedb.js  # Create admin user
  1. Start the development server:
npm run dev

📁 Project Structure

.
├── app/                # Next.js app directory
│   ├── api/           # API routes
│   ├── blog/          # Blog pages
│   ├── dashboard/     # Admin dashboard
│   └── projects/      # Projects pages
├── components/        # React components
│   ├── forms/         # Form components
│   ├── layouts/       # Layout components
│   └── ui/            # UI components
├── db/               # Database configuration
├── lib/              # Utility functions
└── public/           # Static assets

🛠️ Development

npm run dev          # Start development server
npm run build        # Build for production
npm run start        # Start production server
npm run lint         # Run ESLint

🔑 Environment Variables

VariableDescription
PORTServer port number
DATABASE_HOSTPostgreSQL host
DATABASE_USERNAMEDatabase username
DATABASE_PASSWORDDatabase password
DATABASE_NAMEDatabase name
SECRET_KEYAuthentication secret key
SMTP_HOSTSMTP server host
SMTP_PORTSMTP server port
SMTP_EMAILSMTP email address
SMTP_PASSWORDSMTP password
RECEIVER_EMAILContact form recipient email

🗄️ Database Setup

Initialize your database schema and run migrations:

npm run generate  # Generate database migrations
npm run push     # Push migrations to database

👤 Admin Setup

After setting up your environment variables and database, run the following command to create an admin user:

node scripts/initialisedb.js

🚀 Deployment

  1. Build the application:
npm run build
  1. Start the production server:
npm run start

🤝 Contributing

Contributions, issues, and feature requests are welcome!

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.