ZincBlogs Version: 1.0.0
Project ID: ZincBlogs
Repository: iamzehan/ZincBlogs
Last Updated: April 17, 2026
- Project Overview
- Architecture & Structure
- Technology Stack
- Core Features
- Project Setup
- Coding Standards & Best Practices
- Development Workflow
- Directory Structure
- Individual Component Documentation
- Technology Credits
- Room for Improvements
- Contributing
- License
ZincBlogs is a production-grade, full-stack blogging platform designed to provide a complete content management solution. It combines a robust backend API, a powerful CMS dashboard for administrators, and a beautiful public-facing frontend for readers.
The platform enables:
- βοΈ Content Creation & Management - Authors can write and publish blog posts
- π₯ User Management - Comprehensive authentication and profile management
- π¬ Community Engagement - Commenting and liking system for interaction
- π Administration - Full CMS dashboard for content and subscriber management
- π Security - JWT-based authentication, email verification, and role-based access control
- βοΈ Cloud Integration - Cloudinary for scalable image management
The project follows a three-tier architecture pattern:
Blog-Project/
βββ Backend/
β βββ API/ (Express.js REST API - Core backend service)
β βββ CMS/ (React administration dashboard)
βββ Frontend/ (Public-facing React application)
The core RESTful API service built with Express.js and TypeScript, powering ZincBlogs.
Key Responsibilities:
- User authentication and authorization
- Blog content management
- Comment and like system
- Email verification and notifications
- Media upload handling via Cloudinary
- Database operations with Prisma ORM
- Background job processing (cleanup tasks)
Technology: Node.js, Express, TypeScript, Prisma, PostgreSQL, JWT, Cloudinary
Admin dashboard for ZincBlogs content creators and platform administrators.
Key Responsibilities:
- Blog post creation and management
- Media library management
- Subscriber management and analytics
- Dashboard metrics and analytics
- Secure admin authentication
Technology: React 19, TypeScript, Vite, TailwindCSS, Material UI, React Query
Public-facing web application for ZincBlogs readers and content consumers.
Key Responsibilities:
- Blog discovery and reading
- User authentication (signup/login)
- Comment and interaction features
- Responsive design for all devices
- User profile management
Technology: React 19, TypeScript, Vite, TailwindCSS, React Router, React Query
π View Frontend Documentation
- TypeScript 5.9.3 - Strict mode enabled across all projects
- ESLint - Code quality and consistency
- Prettier - Automatic code formatting
- Vite - Modern build tooling (Frontend & CMS)
- Zod - Runtime schema validation
- JWT-based stateless authentication
- Email verification workflow
- Secure password hashing with bcrypt
- Session management with PostgreSQL store
- Role-based access control (RBAC)
- HTTP-only cookies for enhanced security
- Rich blog post creation and editing
- Draft and publish workflow
- Tag-based content organization
- Full-text search capabilities
- Markdown support with syntax highlighting
- Media integration with Cloudinary
- Nested commenting system
- Like/unlike functionality
- Real-time notification support
- Subscriber management
- Responsive design for all screen sizes
- Fast loading with optimized bundles
- Dark mode aesthetic design
- Accessible UI components
- Smooth animations and transitions
- CORS protection with configurable origins
- Helmet.js for security headers
- Input validation with Zod
- SQL injection prevention via Prisma
- CSRF protection via session tokens
- Rate limiting ready architecture
- Comprehensive dashboard metrics
- Subscriber analytics
- Content performance tracking
- Admin-only routes and views
- Node.js v20 or higher
- npm or yarn package manager
- PostgreSQL 12 or higher
- Git for version control
- Docker (optional, for containerization)
git clone https://github.com/iamzehan/ZincBlogs.git
cd Blog-Projectcd Backend/API
# Install dependencies
npm install
# Configure environment variables
cp .env.example .env.local
# Setup database
npm run prisma:generate
npm run prisma:migrate
# Start development server
npm run devThe API will be available at http://localhost:3000
cd Backend/CMS
# Install dependencies
npm install
# Configure environment variables
cp .env.example .env.local
# Start development server
npm run devThe CMS will be available at http://localhost:5174
cd Frontend
# Install dependencies
npm install
# Configure environment variables
cp .env.example .env.local
# Start development server
npm run devThe Frontend will be available at http://localhost:5173
Each component requires environment variables. See individual README files for specific configurations:
All projects are configured with TypeScript strict mode enabled:
{
"compilerOptions": {
"strict": true,
"noImplicitAny": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true
}
}This ensures:
- Type safety across all codebase
- Reduced runtime errors
- Better IDE support and autocomplete
- Easier code refactoring
- ESLint - Enforces consistent code style
- Prettier - Automatic code formatting
# Lint code
npm run lint
# Format code
npm run formatAll projects use ES Modules (ESM):
"type": "module"in package.json- Modern import/export syntax
- Better tree-shaking and bundle optimization
- Components/Controllers:
PascalCase(e.g.,BlogController.ts) - Services/Utilities:
camelCase(e.g.,emailService.ts) - Types/Interfaces:
PascalCasewith.d.tsextension (e.g.,blog.d.ts) - Constants:
UPPER_SNAKE_CASE(e.g.,MAX_FILE_SIZE)
Backend/API/src/
βββ config/ (Configuration files)
βββ controllers/ (Request handlers)
βββ middlewares/ (Express middlewares)
βββ routes/ (API route definitions)
βββ services/ (Business logic)
βββ types/ (TypeScript definitions)
βββ utils/ (Utility functions)
βββ mail/ (Email services)
βββ jobs/ (Background jobs)
βββ prisma/ (Database schema & migrations)
src/
βββ components/ (Reusable UI components)
βββ pages/ (Page-level components)
βββ layouts/ (Layout wrappers)
βββ hooks/ (Custom React hooks)
βββ utils/ (Helper functions)
βββ types/ (TypeScript definitions)
βββ config/ (Configuration)
βββ assets/ (Static assets)
- Centralized error middleware
- Custom error classes
- Comprehensive error messages
- Proper HTTP status codes
// Example: Consistent error handling
try {
// Business logic
} catch (error) {
next(error); // Pass to error middleware
}- Zod for schema validation
- Input validation on all API endpoints
- Form validation in frontend
- Type-safe validation with TypeScript
- Jest for backend unit tests
- Vitest for frontend unit tests
- Test files colocated with source code
- Aim for >70% code coverage
npm run test # Run tests
npm run test --watch # Watch mode- Prisma ORM for type-safe database access
- Migrations tracked in version control
- Schema versioning and audit trails
- Connection pooling for performance
- Environment variables for sensitive data
- No secrets in version control (.gitignore)
- HTTPS in production
- Secure cookie settings (HttpOnly, Secure, SameSite)
- Input sanitization and validation
- SQL injection prevention
- XSS protection with proper escaping
cd Backend/API
# Development with hot reload
npm run dev
# Build for production
npm run build
# Start production server
npm start
# Run linting
npm run lint
# Run tests
npm run test
# Database operations
npm run prisma:generate
npm run prisma:migrate
npm run prisma:studio # Launch Prisma Studiocd Backend/CMS
# Development
npm run dev
# Build for production
npm run build
# Testing
npm run test
# Linting
npm run lintcd Frontend
# Development
npm run dev
# Build for production
npm run build
# Preview production build
npm run preview
# Testing
npm run test
# Linting
npm run lint# Create feature branch
git checkout -b feature/your-feature-name
# Make changes and commit
git add .
git commit -m "feat: describe your changes"
# Push to remote
git push origin feature/your-feature-name
# Create pull request and await reviewBlog-Project/
β
βββ Backend/
β βββ API/
β β βββ src/
β β β βββ app.ts (Express app setup)
β β β βββ server.ts (Server entry point)
β β β βββ config/ (Configuration files)
β β β βββ controllers/ (Route handlers)
β β β βββ middlewares/ (Custom middlewares)
β β β βββ routes/ (API routes)
β β β βββ services/ (Business logic)
β β β βββ types/ (TypeScript types)
β β β βββ utils/ (Utilities)
β β β βββ mail/ (Email services)
β β β βββ jobs/ (Background jobs)
β β β βββ prisma/ (Database schema)
β β βββ tests/ (Unit tests)
β β βββ jest.config.ts (Jest configuration)
β β βββ tsconfig.json (TypeScript config)
β β βββ nodemon.json (Nodemon config)
β β βββ package.json (Dependencies)
β β βββ README.md (API documentation)
β β
β βββ CMS/
β βββ src/
β β βββ components/ (Reusable components)
β β βββ pages/ (Page components)
β β βββ layouts/ (Layout components)
β β βββ hooks/ (Custom hooks)
β β βββ utils/ (Helper utilities)
β β βββ types/ (TypeScript types)
β β βββ config/ (Configuration)
β β βββ assets/ (Static assets)
β β βββ App.tsx (Root component)
β β βββ main.tsx (Entry point)
β βββ vite.config.ts (Vite configuration)
β βββ tsconfig.json (TypeScript config)
β βββ package.json (Dependencies)
β βββ README.md (CMS documentation)
β
βββ Frontend/
β βββ src/
β β βββ components/ (Reusable components)
β β βββ pages/ (Page components)
β β βββ layouts/ (Layout components)
β β βββ hooks/ (Custom hooks)
β β βββ utils/ (Helper utilities)
β β βββ types/ (TypeScript types)
β β βββ config/ (Configuration)
β β βββ assets/ (Static assets)
β β βββ App.tsx (Root component)
β β βββ main.tsx (Entry point)
β βββ public/ (Public assets)
β βββ vite.config.ts (Vite configuration)
β βββ tsconfig.json (TypeScript config)
β βββ package.json (Dependencies)
β βββ README.md (Frontend documentation)
β
βββ .git/ (Git repository)
βββ LICENSE (ISC License)
βββ README.md (This file)
For detailed information about each component, refer to their individual documentation:
- Full API Documentation: Backend/API/README.md
- Includes: Quick Start, Installation, Architecture, API Endpoints, Authentication, Database Schema, Testing, Contributing
- Full CMS Documentation: Backend/CMS/README.md
- Includes: Quick Start, Installation, Project Structure, Components, Pages, API Integration, State Management
- Full Frontend Documentation: Frontend/README.md
- Includes: Quick Start, Installation, Project Structure, Pages, Components, Routes, Authentication
This project leverages exceptional open-source technologies and their communities:
- Express.js - Minimal and flexible Node.js web application framework
- TypeScript - Typed superset of JavaScript
- Prisma - Next-generation ORM for Node.js
- PostgreSQL - Powerful, open-source relational database
- JWT - JSON Web Tokens for secure authentication
- Cloudinary - Cloud-based image and video management
- Helmet.js - Security middleware for Express
- Morgan - HTTP request logger
- Zod - TypeScript-first schema validation
- Jest - JavaScript testing framework
- React - JavaScript library for building user interfaces
- Vite - Next-generation frontend build tool
- TailwindCSS - Utility-first CSS framework
- Material UI (MUI) - React components library
- React Router - Declarative routing for React
- React Query - Server state management library
- Vitest - Unit testing framework for Vite
- React Markdown - Markdown component
- ESLint - JavaScript linting utility
- Prettier - Code formatter
- Nodemon - Development file watcher
- Rimraf - Cross-platform rm command
- TSX - TypeScript execution runtime
-
API Documentation
- Implement Swagger/OpenAPI documentation
- Add API endpoint examples and response schemas
- Generate auto-documentation from code
-
Testing Coverage
- Increase backend unit test coverage to >80%
- Add integration tests for API endpoints
- Implement E2E tests for critical workflows
- Add component tests for React applications
-
Performance Optimization
- Implement caching strategy (Redis)
- Add database query optimization and indexing
- Implement pagination for large datasets
- Lazy loading for images and components
- Bundle size optimization
-
Monitoring & Observability
- Implement structured logging (Winston/Pino)
- Add error tracking (Sentry integration)
- Performance monitoring and metrics
- API response time analytics
-
Search & Analytics
- Full-text search implementation
- Blog content search indexing (Elasticsearch)
- User activity analytics dashboard
- Content engagement metrics
-
Advanced Features
- Blog series and collections
- Social media sharing integration
- Reading time estimation
- Table of contents generation
- Author follow/notification system
- Comment moderation tools
- Multi-language support (i18n)
-
Developer Experience
- Docker & Docker Compose setup
- Development environment automation
- Pre-commit hooks for linting
- API client code generation
- Database seeding scripts
-
Deployment & Infrastructure
- CI/CD pipeline setup (GitHub Actions)
- Automated testing on PR
- Docker containerization
- Kubernetes deployment specs
- Environment-specific configurations
- Database backup strategies
-
Scalability
- Microservices architecture consideration
- Database sharding for large datasets
- Event-driven architecture
- Message queue implementation (RabbitMQ/Kafka)
-
Mobile & Progressive Web App
- React Native mobile app
- PWA implementation
- Offline-first capabilities
-
Content Enhancement
- Video upload and streaming
- Audio/podcast support
- Code snippet highlighting enhancements
- Interactive content support
-
Community Features
- Collaboration between authors
- Content versioning and history
- Peer-review workflow
- Badge and achievement system
We welcome contributions from the community! Please follow these guidelines:
- Fork the Repository - Create your own fork
- Create a Feature Branch -
git checkout -b feature/AmazingFeature - Make Your Changes - Follow coding standards
- Commit with Clear Messages -
git commit -m 'Add AmazingFeature' - Push to Branch -
git push origin feature/AmazingFeature - Open a Pull Request - Describe your changes in detail
- Bug fixes and improvements
- Documentation enhancements
- Feature implementations
- Performance optimizations
- Testing improvements
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
For questions, issues, or suggestions:
- Open an issueApache 2.0 GitHub
- Check existing documentation in component README files
- Review the technologies' official documentation
- Total Components: 3 major applications (API, CMS, Frontend)
- Technology Stack: 20+ production-grade libraries
- Code Language: TypeScript (100% type-safe)
- Database: PostgreSQL with Prisma ORM
- Testing: Jest & Vitest
- Build Tools: Vite & TypeScript Compiler
- License: Apache 2.0 (Open Source)
- Status: Production Ready β
Enterprise-Grade Blogging Platform Built with Modern Technologies
π Get Started β’ π Documentation β’ π€ Contribute β’ GitHub Repository
Made with β€οΈ by iamzehan
Copyright Β© 2026 ZincBlogs. Licensed under Apache License 2.0.