A modern, full-stack blog application built with industry best practices and open-source technologies.
Note: This is an open-source project. Feel free to use, modify, and contribute!
- Express.js with TypeScript
- Prisma ORM with SQLite (PostgreSQL compatible)
- JWT Authentication with bcrypt
- Input validation with Zod
- API documentation with Swagger/OpenAPI
- React 18 with TypeScript
- Vite with SWC compiler
- React Router for navigation
- React Query/TanStack Query for state management
- Tailwind CSS for styling
- React Hook Form with validation
- pnpm package manager
- ESLint and Prettier for code quality
- Husky for git hooks
- Jest/Vitest for testing
- Docker for containerization
- π User Authentication: Secure register/login/logout with JWT
- π Blog Management: Create, read, update, delete blog posts
- π·οΈ Tag System: Organize posts with tags
- π§ Newsletter: Newsletter subscription management
- πΌοΈ Image Upload: MinIO object storage for image uploads with drag-and-drop
- π· Image Integration: Unsplash photo picker for post covers
- βοΈ Rich Text Editor: TipTap editor with markdown support
- π€ Bot Protection: Google reCAPTCHA integration
- π Protected Routes: Authorization and authentication
- π± Responsive Design: Mobile-first approach
- β‘ Fast Development: HMR with Vite
- π§ͺ Production Ready: Docker support
- π API Documentation: OpenAPI/Swagger docs
- Node.js >= 18
- pnpm >= 8
-
Clone the repository
-
Install dependencies:
pnpm install
-
Set up environment variables:
# Root environment (for Docker) cp .env.example .env # Backend environment cp backend/.env.example backend/.env # Frontend environment cp frontend/.env.example frontend/.env
Important: Update the
.envfiles with your own values:- Get Unsplash API key from https://unsplash.com/developers
- Get Google reCAPTCHA keys from https://www.google.com/recaptcha/admin
- Generate a strong JWT secret (minimum 32 characters)
-
Initialize the database:
cd backend && pnpm db:push && pnpm db:seed
-
Start development servers:
pnpm dev
The app will be available at:
- Frontend: http://localhost:5173
- Backend API: http://localhost:3000
- API Documentation: http://localhost:3000/api-docs
blog-app/
βββ backend/ # Express.js API server
β βββ src/
β β βββ controllers/
β β βββ middleware/
β β βββ routes/
β β βββ models/
β β βββ utils/
β β βββ types/
β βββ prisma/
β βββ tests/
βββ frontend/ # React application
β βββ src/
β β βββ components/
β β βββ pages/
β β βββ hooks/
β β βββ services/
β β βββ types/
β β βββ utils/
β βββ public/
βββ docs/ # Documentation
cd backend
pnpm dev # Start development server
pnpm build # Build for production
pnpm test # Run tests
pnpm db:push # Push schema to database
pnpm db:seed # Seed database with sample datacd frontend
pnpm dev # Start development server
pnpm build # Build for production
pnpm test # Run tests
pnpm preview # Preview production buildThis project uses MinIO for storing uploaded images. MinIO provides S3-compatible object storage.
# Automated setup (recommended)
./setup-minio.sh
# Manual setup
cd backend && pnpm install
docker-compose up --build- MinIO Console: http://localhost:9001
- Credentials: minioadmin / minioadmin123
- API Endpoint: http://localhost:9000
- Quick Start: MINIO_QUICKSTART.md
- Full Setup Guide: MINIO_SETUP.md
- Implementation Details: MINIO_IMPLEMENTATION.md
- π Drag and drop file upload
- π Real-time upload progress
- β File validation (type, size)
- πΌοΈ Image preview before upload
- π Authentication required
- π Public URL generation
The API is documented using OpenAPI/Swagger. Once the backend is running, visit: http://localhost:3000/api-docs
We welcome contributions! Please see our Contributing Guide for details on:
- Setting up your development environment
- Code style and standards
- Submitting pull requests
- Reporting issues
For security concerns, please review our Security Policy and report vulnerabilities responsibly.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with React, Express, and Prisma
- UI components styled with Tailwind CSS
- Image integration with Unsplash
- Rich text editing powered by TipTap
If you find this project helpful, please consider:
- β Starring the repository
- π Reporting bugs
- π‘ Suggesting new features
- π€ Contributing code
- Comment system
- Social media sharing
- Search functionality
- Categories system
- User profiles with avatars
- Post drafts and scheduling
- Analytics dashboard
Made with β€οΈ by the open-source community