A modern, full-stack blogging platform built with cutting-edge web technologies. InkSpire provides a seamless writing and reading experience with robust authentication, AI-powered features, social interactions, and a beautiful user interface.
- π Blog Management: Create, edit, and publish blog posts with a rich text editor (React Quill)
- π Search & Filter: Powerful search functionality with sorting options (newest, oldest, title A-Z/Z-A)
- π€ Personal Dashboard: Manage your posts and profile from a centralized dashboard
- πΌοΈ Image Upload: Drag-and-drop image upload functionality with Cloudflare R2 storage
- π± Responsive Design: Mobile-first approach with optimized layouts for all devices
- π¨ Dark Mode: Beautiful "Stranger Things" inspired dark theme with smooth transitions
- π€ AI Summarizer: Generate concise summaries from URLs or text content
- URL summarization with metadata extraction
- Text-based summarization
- Engaging loading states during processing
- Content moderation to filter abusive text
- β¨ AI Title Suggestions: Get intelligent blog title suggestions powered by AI
- π¬ Comments: Threaded comment system for engaging discussions
- π Reactions: Like/Dislike functionality for blogs
- π₯ User Profiles: View author profiles and their published content
- π Activity Tracking: Track engagement metrics
- π JWT Authentication: Secure user authentication using JSON Web Tokens
- π Password Encryption: Industry-standard bcrypt encryption for user passwords
- π‘οΈ Protected Routes: Role-based access control for sensitive operations
- π Secure File Upload: Authenticated image uploads with validation
- β‘ Edge Computing: Backend deployed on Cloudflare Workers for ultra-low latency
- π Optimized Frontend: Built with Vite for lightning-fast development and production builds
- π CDN Integration: Cloudflare R2 for global image delivery
- π¦ Type Safety: End-to-end type safety with TypeScript and shared Zod schemas
- Vite: Next-generation frontend tooling
- React 18 + TypeScript: Modern UI development
- Tailwind CSS v4: Utility-first styling with latest features
- React Router v7: Client-side routing
- React Quill: Rich text editor for blog creation
- Framer Motion: Smooth animations and transitions
- Axios: HTTP client for API requests
- DOMPurify: XSS protection for user-generated content
- Lucide Icons + Hero Icons: Beautiful icon sets
- Hono: Ultrafast web framework for Cloudflare Workers
- Cloudflare Workers: Serverless edge computing platform
- Cloudflare R2: Object storage for images
- JWT: Secure token-based authentication
- Bcrypt.js: Password hashing and encryption
- Prisma: Type-safe ORM with Accelerate for connection pooling
- PostgreSQL: Robust relational database
- Prisma Accelerate: Global database caching and connection pooling
- Shared Zod Package (
@rishi438/zod): Centralized validation schemas for frontend and backend
Visit the live application: https://ink-spire-rho.vercel.app/blogs
- Node.js 18+
- npm or yarn
- Cloudflare account (for backend deployment)
- PostgreSQL database (or Cloudflare D1)
# Clone the repository
git clone <your-repo-url>
cd blog/backend
# Install dependencies
npm install
# Set up environment variables
# Create .env file with the following:
DATABASE_URL="your-prisma-accelerate-url"
JWT_SECRET="your-jwt-secret-key"
SALT_ROUNDS=10
# Run database migrations
npx prisma migrate dev
# Start development server
npm run dev
# Deploy to Cloudflare Workers
npm run deploy# Navigate to frontend directory
cd ../frontend
# Install dependencies
npm install
# Set up environment variables
# Create .env file with the following:
VITE_API_URL="your-cloudflare-workers-url"
# Start development server
npm run dev
# Build for production
npm run buildDATABASE_URL="your-prisma-accelerate-connection-url"
JWT_SECRET="your-jwt-secret-key"
SALT_ROUNDS=10VITE_API_URL="https://your-worker.workers.dev"- User registration with email and password
- Password hashing using bcrypt (10 rounds)
- JWT token generation upon successful login
- Token stored in localStorage with automatic expiration handling
- Protected routes with automatic redirect to login
- Token-based authentication for all protected API calls
- Create: Rich text editor with formatting options, image upload support
- Edit: Full editing capabilities for blog authors
- Delete: Authors can delete their own posts
- View: Beautiful blog reading experience with syntax highlighting
- Search: Real-time search across titles and content
- Sort: Multiple sorting options (newest, oldest, alphabetical)
- Filter: Category-based filtering (backend support ready)
- URL Summarization: Paste any URL to get an AI-generated summary
- Text Summarization: Summarize custom text content
- Title Suggestions: Get creative title suggestions when creating blogs
- Content Moderation: Automatic filtering of inappropriate content
- Loading States: Engaging animations during AI processing
- Comments: Add, view, and manage comments on blog posts
- Reactions: Like/dislike blogs with visual feedback
- User Profiles: View author information and their published blogs
- Activity Metrics: Track views, likes, and engagement
- Drag & Drop: Intuitive drag-and-drop interface
- Progress Indicator: Real-time upload progress
- Validation: File type and size validation
- CDN Delivery: Images served globally via Cloudflare R2
- Disabled State: Publish button disabled during upload
- Dark/Light Mode: Toggle between themes with smooth transitions
- Stranger Things Theme: Unique dark mode inspired by the series
- Persistent Preference: Theme choice saved in localStorage
- System-wide: Consistent theming across all components
InkSpire
βββ frontend/ # Vite + React application
β βββ src/
β β βββ components/ # Reusable UI components
β β β βββ Appbar.tsx
β β β βββ Auth.tsx
β β β βββ BlogCard.tsx
β β β βββ Comments.tsx
β β β βββ FullBlog.tsx
β β β βββ Reaction.tsx
β β β βββ SideBar.tsx
β β β βββ ...
β β βββ pages/ # Page components
β β β βββ LandingPage.tsx
β β β βββ Blogs.tsx
β β β βββ Blog.tsx
β β β βββ Publish.tsx
β β β βββ Dashboard.tsx
β β β βββ AISummarize.tsx
β β β βββ Signin.tsx
β β β βββ Signup.tsx
β β βββ hooks/ # Custom React hooks
β β β βββ index.tsx # useBlogs, useBlog hooks
β β β βββ ...
β β βββ context/ # React Context
β β β βββ ThemeContext.tsx
β β βββ config.ts # API configuration
β βββ package.json
β
βββ backend/ # Hono + Cloudflare Workers
β βββ src/
β β βββ routes/ # API routes
β β β βββ user.ts # Auth routes
β β β βββ blog.ts # Blog CRUD
β β β βββ comment.ts # Comment routes
β β β βββ reaction.ts # Like/Dislike
β β β βββ upload.ts # Image upload
β β β βββ ai.ts # AI features
β β βββ utils/ # Helper functions
β β βββ index.ts # Main app entry
β βββ prisma/ # Database schema
β βββ wrangler.jsonc # Cloudflare configuration
β βββ package.json
β
βββ common/ # Shared code (optional)
βββ @rishi438/zod # Shared Zod schemas
- JWT Authentication: Secure token-based auth with expiration (7 days)
- Password Hashing: Bcrypt with 10 salt rounds
- CORS Configuration: Proper cross-origin resource sharing
- Input Validation: Zod schema validation on frontend and backend
- SQL Injection Prevention: Prisma ORM with parameterized queries
- XSS Protection: DOMPurify sanitization for user content
- Content Moderation: AI-powered filtering of abusive content
- Authenticated Uploads: Image uploads require valid JWT
- Environment Secrets: Sensitive data in environment variables
POST /api/v1/user/signup- Register new userPOST /api/v1/user/signin- User loginGET /api/v1/user/me- Get current user (authenticated)
GET /api/v1/blog/bulk- Get all blogs with paginationGET /api/v1/blog/:id- Get single blog with author detailsPOST /api/v1/blog- Create blog (authenticated)PUT /api/v1/blog- Update blog (authenticated, author only)DELETE /api/v1/blog/:id- Delete blog (authenticated, author only)
GET /api/v1/comment/:blogId- Get all comments for a blogPOST /api/v1/comment- Add comment (authenticated)
POST /api/v1/reaction/like- Like a blog (authenticated)POST /api/v1/reaction/dislike- Dislike a blog (authenticated)
POST /api/v1/upload- Upload image to R2 (authenticated)
POST /api/v1/ai/summarize- Summarize URL or textPOST /api/v1/ai/suggest-title- Generate blog title suggestions
- Modern Design: Clean, professional interface inspired by Medium
- Animations: Smooth transitions using Framer Motion
- Loading States: Skeleton screens and spinners for better UX
- Tooltips: Helpful tooltips for better user guidance
- Responsive: Mobile-optimized layouts and touch-friendly interactions
- Accessibility: Semantic HTML and ARIA labels
- Error Handling: User-friendly error messages
Backend:
cd backend
npm run dev # Starts on http://localhost:8787Frontend:
cd frontend
npm run dev # Starts on http://localhost:5173Frontend:
npm run build # Creates optimized production build
npm run preview # Preview production buildBackend:
npm run deploy # Deploy to Cloudflare Workersnpm run lint # Run ESLintThe application uses Prisma with the following main models:
- User: User accounts with authentication
- Blog: Blog posts with rich content
- Comment: Comment threads on blogs
- Reaction: Likes/dislikes on blogs
See backend/prisma/schema.prisma for complete schema.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is open source and available under the MIT License.
Rishi Raj
- Built with Hono
- Deployed on Cloudflare Workers
- Frontend powered by Vite
- UI components styled with Tailwind CSS
- Database ORM by Prisma
- AI capabilities via Cloudflare Workers AI
- Category filtering requires backend implementation
- Mobile navigation can be improved
- Image optimization could be added
- Add bookmark functionality
- Implement follow/unfollow users
- Email notifications for comments
- Advanced analytics dashboard
- Rich text formatting improvements
- Image editing capabilities
- Multi-language support
- SEO optimization
- Progressive Web App (PWA) support
β If you found this project helpful, please give it a star!
Built with β€οΈ by Rishi Raj
{ "vars": { "DATABASE_URL": "your-database-url", "JWT_SECRET": "your-jwt-secret" }, "r2_buckets": [ { "binding": "MY_BUCKET", "bucket_name": "your-r2-bucket-name" } ], "ai": { "binding": "AI" } }