A modern, production-ready blog platform built with Next.js 15, React 19, and Turso (SQLite). Designed for web development agencies and tech companies to share insights, tutorials, and industry updates.
- Framework: Next.js 15 (App Router)
- Frontend: React 19
- Database: Turso (SQLite with edge support) via Prisma
- Authentication: Auth.js v5 (Next-Auth) with Google & GitHub OAuth
- Storage: Firebase Storage for images
- Styling: CSS Modules with dark/light theme support
- Validation: Zod for input sanitization
- Modern Auth: Google & GitHub OAuth with secure session management
- Content Management: Rich text editor for posts, categories, comments
- SEO Optimized: Dynamic sitemap, robots.txt, Open Graph, structured metadata
- Legal Compliance: Privacy Policy, Terms of Service, Cookie Policy, Disclaimer pages
- Security: Input validation, security headers, XSS protection
- Dark/Light Theme: Full theme support with system preference detection
- Responsive Design: Mobile-first approach
- Node.js 18+
- npm or yarn
- Turso account (or SQLite for local dev)
- Google Cloud Console account (for OAuth)
- GitHub account (for OAuth)
- Firebase project (for image storage)
git clone <your-repo-url>
cd jacob-tech-info-blog
npm installcp .env.example .env.localEdit .env.local with your credentials:
NEXT_PUBLIC_BASE_URL=http://localhost:3000
# Turso Database (Production)
TURSO_DATABASE_URL=libsql://your-database.turso.io
TURSO_AUTH_TOKEN=your-turso-token
# Or SQLite (Local Development)
# DATABASE_URL="file:./dev.db"
# Auth.js Secret (generate with: openssl rand -base64 32)
AUTH_SECRET=your-secret-key
# Google OAuth
GOOGLE_ID=your-google-client-id
GOOGLE_SECRET=your-google-client-secret
# GitHub OAuth
GITHUB_ID=your-github-client-id
GITHUB_SECRET=your-github-client-secret
# Firebase
FIREBASE=your-firebase-api-key- Install Turso CLI:
curl -sSfL https://get.tur.so/install.sh | bash - Login:
turso auth login - Create database:
turso db create jacob-tech-info - Get connection URL:
turso db show jacob-tech-info - Get auth token:
turso db tokens create jacob-tech-info
# No setup needed, file will be created automaticallynpm run db:generate
npm run db:pushnpm run dev- Go to Google Cloud Console
- Create a new project or select existing
- Navigate to "APIs & Services" > "Credentials"
- Click "Create Credentials" > "OAuth client ID"
- Configure consent screen:
- User Type: External
- App name: "Jacob Tech Info"
- User support email: your-email
- Developer contact: your-email
- Add authorized domains:
localhost,jacobtechinfo.com - Create OAuth client ID:
- Application type: Web application
- Authorized JavaScript origins:
http://localhost:3000 - Authorized redirect URIs:
http://localhost:3000/api/auth/callback/google
- Copy Client ID and Secret to
.env.local
- Go to GitHub Developer Settings
- Click "New OAuth App"
- Application name: "Jacob Tech Info"
- Homepage URL:
http://localhost:3000 - Authorization callback URL:
http://localhost:3000/api/auth/callback/github - Register application
- Generate a new client secret
- Copy Client ID and Secret to
.env.local
- Push code to GitHub
- Connect repository on Vercel
- Add environment variables in Vercel Dashboard
- Deploy!
NEXT_PUBLIC_BASE_URL=https://jacobtechinfo.com
TURSO_DATABASE_URL=libsql://your-db.turso.io
TURSO_AUTH_TOKEN=your-token
AUTH_SECRET=your-secret
GOOGLE_ID=your-google-id
GOOGLE_SECRET=your-google-secret
GITHUB_ID=your-github-id
GITHUB_SECRET=your-github-secret
FIREBASE=your-firebase-key
Don't forget to update your OAuth app redirect URIs:
- Google:
https://jacobtechinfo.com/api/auth/callback/google - GitHub:
https://jacobtechinfo.com/api/auth/callback/github
# Generate Prisma Client
npm run db:generate
# Push schema changes
npm run db:push
# Open Prisma Studio
npm run db:studio├── src/
│ ├── app/ # Next.js App Router
│ │ ├── api/ # API Routes
│ │ ├── blog/ # Blog listing page
│ │ ├── posts/ # Individual post pages
│ │ ├── write/ # Create post page
│ │ ├── login/ # Login page
│ │ ├── privacy/ # Privacy Policy
│ │ ├── terms/ # Terms of Service
│ │ ├── cookies/ # Cookie Policy
│ │ ├── disclaimer/ # Disclaimer
│ │ ├── sitemap.xml/ # Dynamic sitemap
│ │ ├── layout.js # Root layout
│ │ └── page.jsx # Home page
│ ├── components/ # React components
│ ├── context/ # React context
│ ├── providers/ # Auth & Theme providers
│ └── utils/ # Utilities (auth, db, firebase)
├── prisma/
│ └── schema.prisma # Database schema
├── public/ # Static assets
└── .env.example # Environment template
- Input Validation: Zod schemas for all API inputs
- XSS Protection: Security headers via Next.js config
- CSRF Protection: Built into Auth.js
- Secure Headers: X-Frame-Options, X-Content-Type-Options, etc.
- Rate Limiting: Recommended to add Vercel Edge Config for production
The following compliance pages are included:
/privacy- Privacy Policy (GDPR/CCPA compliant)/terms- Terms of Service/cookies- Cookie Policy/disclaimer- Content Disclaimer
- Dynamic sitemap generation at
/sitemap.xml - Robots.txt with crawl directives
- Open Graph and Twitter card metadata
- Structured JSON-LD schema ready
- Canonical URLs
- Semantic HTML
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
This project is licensed under the MIT License.
For questions or issues, please contact:
- Email: support@jacobtechinfo.com
- Website: https://jacobtechinfo.com
Built with by Jacob Tech Info