Skip to content

A modern, full-stack blog & docs application built with industry best practices and open-source technologies.

License

Notifications You must be signed in to change notification settings

AshishKapoor/open-cms

Repository files navigation

open-cms

A modern, full-stack blog application built with industry best practices and open-source technologies.

License: MIT TypeScript React Node.js

Screenshot 2025-10-11 at 10 50 07β€―AM Screenshot 2025-10-11 at 10 49 19β€―AM

Note: This is an open-source project. Feel free to use, modify, and contribute!

Tech Stack

Backend

  • Express.js with TypeScript
  • Prisma ORM with SQLite (PostgreSQL compatible)
  • JWT Authentication with bcrypt
  • Input validation with Zod
  • API documentation with Swagger/OpenAPI

Frontend

  • 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

Development Tools

  • pnpm package manager
  • ESLint and Prettier for code quality
  • Husky for git hooks
  • Jest/Vitest for testing
  • Docker for containerization

Features

  • πŸ” 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

Quick Start

Prerequisites

  • Node.js >= 18
  • pnpm >= 8

Installation

  1. Clone the repository

  2. Install dependencies:

    pnpm install
  3. 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 .env files with your own values:

  4. Initialize the database:

    cd backend && pnpm db:push && pnpm db:seed
  5. Start development servers:

    pnpm dev

The app will be available at:

Project Structure

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

Development

Backend Commands

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 data

Frontend Commands

cd frontend
pnpm dev          # Start development server
pnpm build        # Build for production
pnpm test         # Run tests
pnpm preview      # Preview production build

MinIO Object Storage

This project uses MinIO for storing uploaded images. MinIO provides S3-compatible object storage.

Quick Setup

# Automated setup (recommended)
./setup-minio.sh

# Manual setup
cd backend && pnpm install
docker-compose up --build

Access Points

Documentation

Features

  • πŸš€ Drag and drop file upload
  • πŸ“Š Real-time upload progress
  • βœ… File validation (type, size)
  • πŸ–ΌοΈ Image preview before upload
  • πŸ”’ Authentication required
  • 🌐 Public URL generation

API Documentation

The API is documented using OpenAPI/Swagger. Once the backend is running, visit: http://localhost:3000/api-docs

Contributing

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

Security

For security concerns, please review our Security Policy and report vulnerabilities responsibly.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

Support

If you find this project helpful, please consider:

  • ⭐ Starring the repository
  • πŸ› Reporting bugs
  • πŸ’‘ Suggesting new features
  • 🀝 Contributing code

Roadmap

  • 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

About

A modern, full-stack blog & docs application built with industry best practices and open-source technologies.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors 4

  •  
  •  
  •  
  •