Skip to content

thanthtooaung-coding/cms-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Content Management System (CMS) - Complete Repository Architecture

image.png

🌟 Repository Overview

This CMS platform implements a sophisticated microservices architecture with multiple backend services, comprehensive infrastructure management, and extensive learning components for educational content delivery.


📁 Complete Project Structure

.
├── README.md
├── Makefile                              # Build automation and tasks
├── backend/
│   ├── cms-sys/                          # Core CMS Service (Go)
│   ├── gateway/                          # API Gateway Service (Spring Boot)
│   └── lms-sys/                          # Learning Management System (Spring Boot)
│   └── ems-sys/                          # E-Commerce Management System (Spring Boot)
│   └── bms-sys/                          # Booking Management System (Spring Boot)
│   └── ams-sys/                          # Agency Management System (Spring Boot)
├── docker-compose.yml                     # Main Orchestration

CMS High level

image.png

API level overview

🏛️ Architecture Overview

🚀 Backend Services (backend/)

📦 CMS Core System (cms-sys/)

Technology: Go 1.24 | Purpose: Primary content management functionality

cms-sys/
├── cmd/main.go                           # Application entry point
├── internal/                             # Core business logic
│   ├── handler/                          # HTTP handlers
│   ├── repository/                       # Data access layer
│   ├── routes/                           # API route definitions
│   ├── service/                          # Business logic layer
│   └── types/                            # Data structures
├── pkg/utils/                            # Shared utilities
├── Makefile                              # Build and development tasks
└── test/                                 # Test suites

Key Features:

  • ✅ Authentication & authorization
  • 📝 Content CRUD operations
  • 🔐 JWT token management
  • 💾 Database abstraction
  • ❤️ Health monitoring
🌐 API Gateway (gateway/)

Technology: Spring Boot (Java 17) | Purpose: Service orchestration and routing

gateway/
├── src/main/java/com/content_management_system/gateway/
│   └── GatewayApplication.java           # Spring Boot application
├── src/main/resources/
│   └── application.yml                   # Configuration
├── Makefile                              # Java build automation
└── src/test/                             # Integration tests

Key Features:

  • 🔄 Request routing and load balancing
  • 📊 Cross-cutting concerns (logging, monitoring)
  • 📋 API versioning and documentation
  • 🛡️ Security policies enforcement
📚 Learning Management System (lms-sys/)

Technology: Go 1.24 | Purpose: Educational content delivery

lms-sys/
├── java

Key Features:

  • 📖 Course management
  • 📈 Student progress tracking
  • 🎯 Assessment and grading
  • ⚡ Content delivery optimization

🏗️ Infrastructure (infra/)

Component Description Technology
Database Management • CMS Schema: Content management database structure
• LMS Schema: Learning management database design
• Migration Tools: Database version control
• Diagrams: Visual database architecture
PostgreSQL, Migrations
Infrastructure as Code • Cloud resource provisioning
• Environment-specific configurations
• Scalability and high availability setup
Terraform
CI/CD Pipeline • Automated testing and deployment
• Code quality enforcement
• Security scanning integration
GitHub Actions

🔧 Development & Operations

🔨 Build Automation (Makefile)

  • Cross-platform build commands
  • Development environment setup
  • Testing and linting automation
  • Docker image building

🔐 Security & Cryptography (keys/)

  • RSA key pair management
  • Encryption/decryption utilities
  • Secure communication setup

⚙️ Automation (scripts/)

  • Deployment automation
  • Environment setup scripts
  • Maintenance and monitoring tools

🐋 Service Orchestration (docker-compose.yml)

  • Multi-service local development
  • Service dependency management
  • Environment variable configuration

🎯 Design Principles & Patterns

🏗️ Microservices Architecture

  • Service Independence: Each service can be developed, deployed, and scaled independently
  • Technology Diversity: Go 1.24 for performance-critical services, Java 17 for gateway complexity
  • Data Isolation: Each service maintains its own database and data models

🧹 Clean Architecture Implementation

  • Separation of Concerns: Clear boundaries between presentation, business, and data layers
  • Dependency Inversion: Business logic independent of external frameworks
  • Testability: Comprehensive testing at unit, integration, and system levels

🏭 Infrastructure as Code

  • Reproducible Environments: Consistent deployment across development, staging, and production
  • Version Control: Infrastructure changes tracked and reviewed
  • Automation: Minimal manual intervention in deployment processes

🔒 Security-First Design

  • Authentication: Multi-factor authentication and JWT token management
  • Authorization: Role-based access control across services
  • Encryption: End-to-end encryption for sensitive data
  • Certificate Management: Digital certificates for document authenticity

🚀 Deployment & Scalability

🏠 Local Development ☁️ Cloud Deployment
Docker Compose for rapid development cycles Terraform for cloud infrastructure
Make commands for consistent builds Auto-scaling and load balancing
Hot reloading and debugging Multi-region deployment

🤝 Contribution Guide


🚀 Getting Started

Follow these steps to contribute to the Multi-Tenant CMS project:

📥 Step 1: Clone the Repository

git clone https://github.com/thanthtooaung-coding/cms-backend.git
cd cms-backend

🌿 Step 2: Create Feature Branch

# Create and switch to feature branch
git checkout -b ft-CM-<according-to-ticket>

# Example: git checkout -b ft-cms-number

📝 Branch Naming Convention: Use ft-CM-<ft-cms-number> format based on your assigned ticket


💻 Development Workflow

✏️ Step 3: Code Implementation

  • Focus: Work only on your assigned ticket/feature
  • Quality: Follow project coding standards
  • Testing: Ensure your code is properly tested

🔍 Step 4: Check Your Changes

# Review what files have been modified
git status

# Review the actual changes
git diff

📦 Step 5: Stage Your Changes

# Add specific file(s)
git add <fileName>

# Or add all changes (use with caution)
git add .

# Or add multiple specific files
git add file1.go file2.go

📝 Step 6: Commit Your Changes

git commit -m "feat: add user authentication middleware"

💡 Commit Message Format: Use conventional commits format:

  • feat: for new features
  • fix: for bug fixes
  • docs: for documentation
  • test: for adding tests
  • refactor: for code refactoring

🔄 Synchronization & Push

🔃 Step 7: Stay Up-to-Date

# Fetch latest changes from remote
git fetch origin

# Pull latest changes to avoid conflicts
git pull origin ft-CM-<according-to-ticket>

🚀 Step 8: Push Your Changes

# Push feature branch to remote
git push origin ft-CM-<according-to-ticket>

# If it's first push on this branch
git push -u origin ft-CM-<according-to-ticket>

📋 Quick Reference

Command Purpose Example
git status Check working directory status See modified files
git diff Show changes in files Review code changes
git add Stage files for commit git add main.go
git commit Save changes with message git commit -m "fix: resolve auth bug"
git push Upload changes to remote git push origin ft-cms-ticket-number

Pro Tips

# View commit history
git log --oneline

# Undo last commit (keep changes)
git reset --soft HEAD~1

# Stash current changes
git stash

# Apply stashed changes
git stash pop

# Check remote branches
git branch -r

🎯 After Push

  1. Create Pull Request: Go to GitHub and create a PR from your feature branch
  2. Code Review: Wait for team review and address feedback
  3. Merge: Once approved, your changes will be merged to main branch
  4. Cleanup: Delete your feature branch after successful merge

About

This is backend repository for my BSc, Hons Final Project.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •