A modern personal content management system built with Next.js 15, Supabase, and MDX.
- 📝 MDX Content - Write in Markdown with JSX components
- 🌙 Dark Mode - System preference detection
- 📱 Responsive Design - Mobile-first approach
- ⚡ Server Components - Next.js 15 App Router
- 🔐 Row Level Security - Supabase RLS policies
- 🎨 Beautiful UI - TailwindCSS + ShadCN/UI
- 🚀 Fast Performance - Optimized loading and rendering
- 🔑 OAuth Login - GitHub, Google, and QQ login support
- Framework: Next.js 15 (App Router + Server Actions)
- Language: TypeScript
- Database: Supabase (PostgreSQL)
- Styling: TailwindCSS + ShadCN/UI
- Content: MDX (Markdown + JSX)
- Authentication: Supabase Auth + OAuth providers
- State Management: Zustand
- Form Handling: React Hook Form
⚡ 5-Minute Setup: Follow QUICK_SETUP.md for the fastest way to get started!
-
Clone the repository
git clone https://github.com/yourusername/ttblog.git cd ttblog -
Install dependencies
npm install
-
Set up environment variables
- Create
.env.localwith your Supabase credentials - See ENV_SETUP.md for details
- Create
-
Set up database
- Run the SQL script from QUICK_SETUP.md in Supabase
- Initialize sample data:
npm run db:init
-
Configure OAuth providers (Optional)
- Follow OAUTH_SETUP.md for third-party login setup
- Supports GitHub, Google, and QQ login
-
Start development server
npm run devOpen http://localhost:3000 to see your blog.
- QUICK_SETUP.md - ⚡ 5-minute setup guide
- PROJECT_SETUP.md - Complete setup guide
- ENV_SETUP.md - Environment variables guide
- SUPABASE_SETUP.md - Database setup guide
- OAUTH_SETUP.md - 🆕 Third-party login setup
TTBlog supports multiple authentication methods:
- Email/Password - Traditional login with email and password
- GitHub OAuth - Login with GitHub account
- Google OAuth - Login with Google account
- QQ Login - QQ login support (custom implementation)
See OAUTH_SETUP.md for detailed configuration instructions.
Articles are stored in Supabase and written in MDX format. The content supports:
- Standard Markdown syntax
- Code syntax highlighting
- Custom React components
- Tables, quotes, lists, and more
npm run dev- Start development servernpm run build- Build for productionnpm run start- Start production servernpm run db:init- Initialize database with sample datanpm run db:reset- Reset database data
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
Built with ❤️ using Next.js and Supabase
# git for local merge
git checkout main
git pull origin main
git checkout -b feature/add-login-page
# 开发中...
git add .
git commit -m "xxx"
# (可选:也可以 push 备份到远程)
git push origin feature/add-login-page
# 开发完成后:
git checkout main
git pull origin main
git merge feature/add-login-page
git push origin main
git branch -d feature/add-login-page
git push origin --delete feature/add-login-page
# git for cooperation pr
git checkout main
git pull origin main
git checkout -b feature/add-login-page
# 开发中...
git add .
git commit -m "xxx"
git push origin feature/add-login-page
# 开发完成后:
# 在远程仓库发起 PR(feature/add-login-page -> main)
# 审查通过后在远程点击 Merge
# 合并完成后,同步本地 main 分支:
git checkout main
git pull origin main
git branch -d feature/add-login-page
git push origin --delete feature/add-login-page