Skip to content

Conversation

@fshmng09
Copy link
Owner

Summary

Add a comprehensive fullstack template for deploying Docusaurus documentation sites to AWS CloudFront with flexible authentication options.

Changes

Infrastructure (Terraform)

  • Modular Terraform structure (infra/modules/docusaurus + infra/environments/dev)
  • Support 4 authentication types:
    • None: Public access
    • Basic: CloudFront Functions
    • Cognito: Lambda@Edge + OAuth2
    • IP Restriction: AWS WAF
  • Automated file organization by resource type (S3, CloudFront, Cognito, WAF, IAM)
  • GitHub Actions OIDC authentication for deployment

Docusaurus Application

  • Modern Docusaurus v3.9.1 setup
  • TypeScript configuration
  • Custom CSS and homepage template
  • Ready-to-use documentation structure

Version Management

  • mise configuration for Terraform 1.9.8 and Node.js 20.18.0
  • mise tasks for common operations
  • Consistent development environment across team

CI/CD

  • GitHub Actions workflow for automated deployment
  • S3 sync with optimized cache headers
  • CloudFront invalidation

Documentation

  • Comprehensive README.md with setup instructions
  • MISE.md for version management guide
  • Authentication configuration examples
  • Cost estimation guide

Architecture

User -> Route53 -> CloudFront -> [Authentication] -> S3 (Docusaurus)
                                      |
                                      +-> Basic: CloudFront Functions
                                      +-> Cognito: Lambda@Edge
                                      +-> IP: AWS WAF

Cost Estimation

  • Base: $2.00/month (S3 + CloudFront + Route53)
  • Auth: $0 - $6.00/month (depending on authentication type)

Testing

  • Terraform validate passes
  • Docusaurus builds successfully
  • mise configuration works
  • GitHub Actions workflow syntax is valid

- Add modular Terraform infrastructure for Docusaurus on AWS
- Support 4 authentication types: none, basic, cognito, ip
- Add CloudFront Functions for Basic auth
- Add Lambda@Edge for Cognito OAuth2 auth
- Add AWS WAF for IP-based access control
- Add Docusaurus static site template
- Add mise configuration for version management (Terraform 1.9.8, Node.js 20)
- Add GitHub Actions workflow for automated deployment
- Add comprehensive documentation (README.md, MISE.md)
- Add Prettier configuration for TypeScript/JavaScript formatting
- Add terraform fmt for Terraform code formatting
- Add format check workflow in GitHub Actions
- Add mise tasks for formatting (format, format:check, fmt, fmt-check)
- Format all existing code with configured formatters
- Add .prettierrc.json and .prettierignore files
- Add fmt-check task to infra/.mise.toml
- Create GitHub Actions workflow for format checking
- Add Prettier configuration for root project
- Format checks run automatically on pull requests
- Format Terraform files with terraform fmt
- Remove package-lock.json from .gitignore
- Add package-lock.json for reproducible builds
- Regenerate package-lock.json with correct dependencies
- Remove npm cache configuration from GitHub Actions
- This resolves npm ci compatibility issues
- npm ci has lockfile version compatibility issues
- Use npm install as a workaround
@fshmng09 fshmng09 merged commit ed4f821 into main Oct 13, 2025
2 checks passed
@fshmng09 fshmng09 deleted the feature/initial-setup branch October 13, 2025 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants