This CMS platform implements a sophisticated microservices architecture with multiple backend services, comprehensive infrastructure management, and extensive learning components for educational content delivery.
. βββ 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 (Go) βββ components-learning/ # Educational Components & Examples β βββ certificate_signing/ # Digital Certificate Generation β βββ docker/ # Docker Learning Examples β βββ elastic-search/ # Search Implementation β βββ mfa/ # Multi-Factor Authentication β βββ postgres/ # Database Examples βββ docker-compose.yml # Main Orchestration βββ infra/ # Infrastructure as Code β βββ migration/ # Database Migrations β βββ github/ # CI/CD Configuration β βββ schema/ # Database Schemas β βββ terraform/ # Infrastructure Provisioning βββ keys/ # Cryptographic Keys βββ scripts/ # Automation Scripts βββ vault-init.sh # Vault Initialization π¦ 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/ βββ cmd/main.go # LMS application entry βββ internal/ # LMS-specific logic β βββ config/ # Configuration management β βββ handler/ # LMS API handlers β βββ model/ # Domain models β βββ repository/ # Data persistence β βββ service/ # Business services βββ pkg/utils/ # LMS utilities βββ Makefile # Build and development tasks Key Features:
- π Course management
- π Student progress tracking
- π― Assessment and grading
- β‘ Content delivery optimization
| π Certificate Signing (
π³ Docker Orchestration (
| π Elasticsearch Integration (
π Multi-Factor Authentication (
|
π PostgreSQL Advanced Features (postgres/)
- Schema Management: Multi-tenant architecture patterns
- Geometric Data: PostGIS spatial data handling
- Functions & Domains: Advanced SQL programming
- GORM Integration: Go ORM implementation
| 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 |
- Cross-platform build commands
- Development environment setup
- Testing and linting automation
- Docker image building
- RSA key pair management
- Encryption/decryption utilities
- Secure communication setup
- Deployment automation
- Environment setup scripts
- Maintenance and monitoring tools
- Multi-service local development
- Service dependency management
- Environment variable configuration
- 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
- 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
- Reproducible Environments: Consistent deployment across development, staging, and production
- Version Control: Infrastructure changes tracked and reviewed
- Automation: Minimal manual intervention in deployment processes
- 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
| π 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 |
Follow these steps to contribute to the Multi-Tenant CMS project:
git clone https://github.com/one-project-one-month/multi-tenants-cms-golang.git cd multi-tenant-cms-doc-golang# Create and switch to your feature branch git checkout -b ft-CM-<according-to-your-ticket> # Example: git checkout -b ft-CM-user-authenticationπ Branch Naming Convention: Use
ft-CM-<feature-description>format based on your assigned ticket
- Focus: Work only on your assigned ticket/feature
- Quality: Follow project coding standards
- Testing: Ensure your code is properly tested
# Review what files have been modified git status # Review the actual changes git diff# 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.gogit commit -m "feat: add user authentication middleware - Implement JWT token validation - Add role-based access control - Include unit tests for auth handlers"π‘ Commit Message Format: Use conventional commits format:
feat:for new featuresfix:for bug fixesdocs:for documentationtest:for adding testsrefactor:for code refactoring
# Fetch latest changes from remote git fetch origin # Pull latest changes to avoid conflicts git pull origin ft-CM-<according-to-your-ticket># Push your feature branch to remote git push origin ft-CM-<according-to-your-ticket> # If it's your first push on this branch git push -u origin ft-CM-<according-to-your-ticket>| 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-CM-auth |
# 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 - Create Pull Request: Go to GitHub and create a PR from your feature branch
- Code Review: Wait for team review and address feedback
- Merge: Once approved, your changes will be merged to main branch
- Cleanup: Delete your feature branch after successful merge

