ByteBlogs is a full-stack blogging platform built using Next.js and Supabase, enhanced with AI-powered content summarization. The application allows users to create, manage, and interact with blog posts through a role-based system.
The goal of this project is to demonstrate full-stack development skills, AI integration, and system design understanding using modern tools and best practices.
- GitHub Repository: https://github.com/Amit-Amitt/ByteBlogs
- Live URL: https://byte-blogs-two.vercel.app/
| Layer | Technology |
|---|---|
| Frontend + Backend | Next.js (App Router, TypeScript) |
| Authentication | Supabase Auth |
| Database | Supabase (PostgreSQL) |
| Storage | Supabase Storage |
| Styling | Tailwind CSS |
| AI Integration | Google AI API (Gemini) |
| Version Control | Git + GitHub |
| Deployment | Vercel |
The platform supports three roles:
- View blog posts
- Read AI-generated summaries
- Add comments
- Create posts
- Edit their own posts
- View comments on their posts
- View all posts
- Edit any post
- Monitor comments
Role-based access is enforced both:
- On the frontend (UI visibility)
- On the backend (secure data operations)
-
Create, edit, and delete posts
-
Post fields:
- Title
- Featured Image
- Body Content
- AI-generated Summary
-
Pagination for post listing
-
Search functionality
- Users can comment on posts
- Comments linked to users and posts
- Real-time display of comments
- Automatically generates ~200-word summary when a post is created
- Summary stored in database (not regenerated repeatedly)
- Displayed in post listing
- View user details
- See all posts created by the user
- Responsive design
- Clean and modern layout
- Loading states and better UX
- id
- name
- role
- id
- title
- body
- image_url
- author_id
- summary
- id
- post_id
- user_id
- comment_text
Relationships:
- One user β many posts
- One post β many comments
- User signs up via Supabase Auth
- User data stored in database with default role (viewer)
- Session maintained using Supabase
-
Middleware protects routes
-
Backend ensures:
- Authors edit only their posts
- Admins have full control
- Author creates a post
- Data stored in database
- AI summary generated
- Summary saved in
summaryfield
- Post content sent to Google AI API
- AI generates ~200-word summary
- Summary stored in database
- Displayed on UI
- AI summary generated only once per post
- Stored in database to avoid repeated API calls
- Reduces token usage and API cost
While implementing post creation, AI summary was being generated multiple times due to re-renders.
- Moved summary generation to backend logic
- Ensured it runs only once during post creation
- Used Supabase to simplify backend development
- Stored user roles in database for flexible access control
- Separated UI and business logic for maintainability
- Used modular folder structure for scalability
git clone https://github.com/your-username/byteblogs.git
cd byteblogsnpm installCreate .env.local:
NEXT_PUBLIC_SUPABASE_URL=your_url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_key
GOOGLE_AI_API_KEY=your_api_keynpm run devThe application is deployed on Vercel and is publicly accessible.
This project demonstrates:
- Full-stack development using modern tools
- AI integration in real-world applications
- Role-based system design
- Clean architecture and optimization strategies
The focus was not just on building features, but on understanding and implementing them effectively.