- Notifications
You must be signed in to change notification settings - Fork0
Personal blog
NotificationsYou must be signed in to change notification settings
lion24/blog.nullbyte.be
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A modern, full-featured blog built with Next.js, TypeScript, Prisma, PostgreSQL, and NextAuth.js for GitHub authentication.
- 📝 Write and publish blog posts with Markdown support
- 🔐 GitHub OAuth authentication
- 🎨 Clean, responsive design with Tailwind CSS
- 📊 View tracking for posts
- 🏷️ Categories and tags for organization
- 👤 Admin dashboard for managing posts
- 🚀 Optimized for Vercel deployment
- Node.js 18+ installed
- PostgreSQL database (local or cloud)
- GitHub OAuth App credentials
npm install
Create a.env file with the following variables:
# DatabaseDATABASE_URL="postgresql://username:password@localhost:5432/techblog?schema=public"# NextAuthNEXTAUTH_URL="http://localhost:3000"NEXTAUTH_SECRET="your-secret-key-here"# GitHub OAuthGITHUB_CLIENT_ID="your-github-client-id"GITHUB_CLIENT_SECRET="your-github-client-secret"
- Go to GitHub Settings > Developer settings > OAuth Apps
- Click "New OAuth App"
- Fill in:
- Application name: "Tech Blog"
- Homepage URL: "http://localhost:3000" (or your production URL)
- Authorization callback URL: "http://localhost:3000/api/auth/callback/github"
- Copy the Client ID and Client Secret to your
.envfile
# Generate Prisma clientnpx prisma generate# Run migrationsnpx prisma migrate dev --name init# (Optional) Seed the databasenpx prisma db seed
npm run dev
Visithttp://localhost:3000 to see your blog!
git initgit add.git commit -m"Initial commit"git remote add origin your-github-repo-urlgit push -u origin main
- Go tovercel.com
- Click "New Project"
- Import your GitHub repository
- Configure environment variables:
- Add all variables from your
.envfile - Update
NEXTAUTH_URLto your production URL
- Add all variables from your
You can use:
- Supabase (recommended)
- PlanetScale
- Neon
- Any PostgreSQL provider
Click "Deploy" and Vercel will build and deploy your blog!
- Sign in with your GitHub account
- Go to
/admin - Click "New Post"
- Write your post using Markdown
- Add categories and tags
- Publish!
- View all posts in the admin dashboard
- Edit existing posts
- Toggle between draft and published states
- Track view counts
tech-blog/├── src/│ ├── app/│ │ ├── api/ # API routes│ │ ├── admin/ # Admin pages│ │ ├── posts/ # Blog post pages│ │ └── layout.tsx # Root layout│ ├── components/ # Reusable components│ ├── lib/ # Utilities│ ├── i18n/ # Internationalization│ └── types/ # TypeScript types├── messages/ # Translation files (i18n)├── prisma/│ └── schema.prisma # Database schema├── docs/ # Project documentation└── public/ # Static assetsFor detailed documentation, see thedocs/ directory:
- 🌍i18n Quick Start - Strongly typed translation system
- 💡Translation Examples - Code examples for i18n
- 🤖AI Features - AI-powered editor capabilities
- 🏗️Architecture Guide - Complete technical documentation
Feel free to open issues or submit pull requests! See ourcontributing guidelines for more details.
MIT
About
Personal blog
Topics
Resources
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.