A full-stack blogging platform built with React, Node.js, and MongoDB, featuring user authentication, content management, payment integration, and real-time interactions.
[Add your live demo link here]
- Features
- Tech Stack
- Architecture
- Security Features
- Installation
- API Documentation
- Deployment
- Future Improvements
- JWT-based authentication with secure token management
- Google OAuth 2.0 integration for seamless social login
- Role-based access control (User, Author, Admin)
- Password reset functionality with email verification
- Session management with automatic token refresh
- Rich text editor with React Quill for enhanced content creation
- Image and video upload with ImageKit integration
- Post categorization and tagging system
- Draft saving and post scheduling
- Content moderation and reporting system
- SEO optimization with meta tags and structured data
- Chapa payment integration for donations and subscriptions
- Author wallet system with balance tracking
- Withdrawal functionality with minimum balance requirements
- Payment webhooks for real-time transaction updates
- Donation tracking and receipt generation
- Responsive design with Tailwind CSS and Material-UI
- Dark/Light theme support with automatic detection
- Real-time notifications using React Query
- Infinite scroll for post loading
- Search functionality with filters
- Comment system with moderation tools
- Admin dashboard with analytics and user management
- Content moderation tools
- User role management
- Author request approval system
- Report management and resolution
- React 18 with Vite for fast development
- React Router for client-side routing
- React Query (TanStack Query) for server state management
- Tailwind CSS for utility-first styling
- Material-UI for component library
- Framer Motion for animations
- React Quill for rich text editing
- ImageKit for media management
- Node.js with Express.js framework
- MongoDB with Mongoose ODM
- JWT for authentication
- bcrypt for password hashing
- Nodemailer for email services
- Multer for file uploads
- CORS for cross-origin requests
- Chapa for payment processing
- Google OAuth 2.0 for social authentication
- ImageKit for image optimization and CDN
- ESLint for code linting
- Prettier for code formatting
- Nodemon for development server
- Vite for build tooling
client/
โโโ src/
โ โโโ components/ # Reusable UI components
โ โโโ routes/ # Page components
โ โโโ utils/ # Utility functions
โ โโโ assets/ # Static assets
โ โโโ main.jsx # Application entry point
backend/
โโโ controllers/ # Business logic
โโโ models/ # Database schemas
โโโ routes/ # API endpoints
โโโ middleware/ # Custom middleware
โโโ lib/ # Database connection
โโโ index.js # Server entry point
- JWT tokens with configurable expiration
- Password hashing using bcrypt with salt rounds
- Token refresh mechanism for session management
- CORS configuration for secure cross-origin requests
- Input validation and sanitization
- Environment variables for sensitive configuration
- MongoDB injection prevention with Mongoose
- XSS protection through input sanitization
- CSRF protection with secure tokens
- Rate limiting on API endpoints
- Webhook signature verification for payment confirmations
- Transaction ID validation to prevent duplicate processing
- Secure payment flow with Chapa integration
- Audit logging for all financial transactions
- File upload validation with type and size restrictions
- Image optimization and compression
- Content moderation tools for inappropriate content
- User reporting system for community safety
- Node.js (v16 or higher)
- MongoDB (v5 or higher)
- npm or yarn package manager
cd backend
npm install
cp .env.example .env
# Configure your environment variables
npm run devcd client
npm install
cp .env.example .env
# Configure your environment variables
npm run devPORT=3000
MONGODB_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret
CLIENT_URL=http://localhost:5173
CHAPA_SECRET_KEY=your_chapa_secret_key
CHAPA_WEBHOOK_SECRET=your_webhook_secret
EMAIL_USER=your_email
EMAIL_PASS=your_email_passwordVITE_API_URL=http://localhost:3000
VITE_GOOGLE_CLIENT_ID=your_google_client_id
VITE_IK_PUBLIC_KEY=your_imagekit_public_key
VITE_IK_URL_ENDPOINT=your_imagekit_url_endpointPOST /users/register- User registrationPOST /users/login- User loginPOST /users/google-login- Google OAuth loginPOST /users/send-link- Password reset emailPOST /users/reset-password- Password reset
GET /posts- Get all posts with paginationPOST /posts/create- Create new postGET /posts/:slug- Get single postPATCH /posts/:id- Update postDELETE /posts/:id- Delete post
POST /payment/donate- Initiate donationGET /payment/donations/:tx_ref- Get donation detailsPOST /payment/withdraw/:id- Request withdrawalGET /payment/donations/wallet/:id- Get wallet balance
GET /comments/:postId- Get post commentsPOST /comments/:postId- Add commentDELETE /comments/:id- Delete comment
# Build the application
npm run build
# Set environment variables
heroku config:set NODE_ENV=production
heroku config:set MONGODB_URI=your_production_mongodb_uri
# Deploy
git push heroku main# Build the application
npm run build
# Deploy to Vercel
vercel --prod- Real-time chat between users and authors
- Newsletter subscription system
- Advanced analytics dashboard for authors
- Multi-language support with i18n
- Progressive Web App (PWA) capabilities
- Mobile app development with React Native
- GraphQL API for more efficient data fetching
- Redis caching for improved performance
- Microservices architecture for scalability
- Docker containerization for easy deployment
- CI/CD pipeline with automated testing
- Performance monitoring with APM tools
- Two-factor authentication (2FA)
- OAuth integration with more providers
- Advanced rate limiting and DDoS protection
- Security headers and CSP implementation
- Regular security audits and penetration testing
- Podcast integration for audio content
- Video streaming capabilities
- Collaborative editing for team posts
- Advanced search with Elasticsearch
- Content recommendation algorithm
- Social sharing optimization
- Subscription tiers for premium content
- Affiliate marketing integration
- Sponsored content management
- Merchandise store integration
- Crypto payments support
- Revenue analytics dashboard
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
Fuad Mohammed
- GitHub: @your-github-username
- LinkedIn: Your LinkedIn
- Email: fuadmohammed368@gmail.com
- Chapa for payment processing
- ImageKit for media management
- Google OAuth for authentication
- Tailwind CSS for styling
- Material-UI for components
Built with โค๏ธ using modern web technologies