A modern, full-stack portfolio website built with Next.js, TypeScript, and Prisma. Features include a dynamic project showcase, skills section, experience timeline, and a fully-featured blog with admin dashboard.
Before you begin, ensure you have the following installed:
git clone https://github.com/yourusername/my-brand-new.git
cd my-brand-new
npm install
# or
yarn install
Copy the example environment file:
cp .env.example .env.local
Edit .env.local with your actual values:
DATABASE_URL="postgresql://postgres:yourpassword@localhost:5432/portfolio_db"
NEXTAUTH_SECRET="your-generated-secret-key"
NEXTAUTH_URL="http://localhost:3005"
Generate a secure NEXTAUTH_SECRET:
# On Unix/Linux/Mac
openssl rand -base64 32
# On Windows (PowerShell)
[Convert]::ToBase64String((1..32 | ForEach-Object { Get-Random -Maximum 256 }))
brew install postgresqlsudo apt-get install postgresql# Access PostgreSQL
psql -U postgres
# Create database
CREATE DATABASE portfolio_db;
# Exit
\q
DATABASE_URL="mysql://root:password@localhost:3306/portfolio_db"
DATABASE_URL="file:./dev.db"
Update prisma/schema.prisma:
datasource db {
provider = "sqlite"
url = env("DATABASE_URL")
}
# Generate Prisma Client
npx prisma generate
# Run migrations
npx prisma migrate dev --name init
# (Optional) Open Prisma Studio to view your database
npx prisma studio
Create a script scripts/create-admin.ts:
import { PrismaClient } from '@prisma/client';
import bcrypt from 'bcryptjs';
const prisma = new PrismaClient();
async function main() {
const hashedPassword = await bcrypt.hash('your-admin-password', 10);
const admin = await prisma.user.create({
data: {
email: 'admin@example.com',
name: 'Admin User',
password: hashedPassword,
role: 'ADMIN',
},
});
console.log('Admin user created:', admin.email);
}
main()
.catch((e) => {
console.error(e);
process.exit(1);
})
.finally(async () => {
await prisma.$disconnect();
});
Run it:
npx ts-node scripts/create-admin.ts
npm run dev
# or
yarn dev
Visit http://localhost:3005
my-brand-new/
├── src/
│ ├── components/ # Reusable UI components
│ │ ├── common/ # Shared components (Button, Card, etc.)
│ │ ├── layout/ # Layout components (Header, Footer, Nav)
│ │ └── sections/ # Page sections (Hero, Experience, About)
│ ├── features/ # Feature-specific modules
│ │ ├── blog/ # Blog-related components and logic
│ │ └── projects/ # Project showcase components
│ ├── lib/ # Utility functions and helpers
│ ├── types/ # TypeScript type definitions
│ ├── styles/ # Global styles and Tailwind config
│ └── pages/ # Next.js pages and API routes
│ ├── api/ # Backend API endpoints
│ ├── blog/ # Blog pages
│ └── projects/ # Project pages
├── public/ # Static assets
└── content/ # Markdown/JSON content files
pages/ - Next.js pages with file-based routingcomponents/ - Modular, reusable React componentspages/api/ - Backend API routes for blog and project managementcontent/ - Content management (blog posts, projects data)The easiest way to deploy your Next.js app is to use the Vercel Platform.
Check out the Next.js deployment documentation for more details.
MIT
Email: ndahayosibertin17@gmail.com GitHub: Illustre13 LinkedIn: ndahayo-s-bertin