Skip to content

NethServer/my

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

My Nethesis

Documentation

API Docs build API Docs link

CI and Tests

CI Pipeline:

CI

Backend:

Backend Tests Backend Build

Collect:

Collect Tests Collect Build

Sync:

Sync Tests Sync Build

Frontend:

Frontend Tests Frontend Build

Proxy:

Proxy Build

Release

Release Version

Production and QA

My My QA

Web application providing centralized authentication and management using Logto as an Identity Provider with simple Role-Based Access Control.

πŸ—οΈ Components

  • frontend/ - Vue.js application for UI
  • backend/ - Go REST API with Logto JWT authentication and RBAC
  • collect/ - Go REST API with Redis queues to handle inventories
  • sync/ - CLI tool for RBAC configuration synchronization
  • proxy/ - nginx configuration as load balancer

πŸš€ Quick Start

Requirements

  • Development: Go 1.21+ (backend requires 1.23+), Make
  • External: Logto instance with M2M app and Management API permissions
  • Deploy: Render account with GitHub integration

Getting Started

  1. Frontend Development: frontend/README.md - Vue.js setup and environment configuration
  2. Backend Development: backend/README.md - Backend setup and environment configuration
  3. Collect Development: collect/README.md - Collect setup and environment configuration
  4. RBAC Management: sync/README.md - Use sync init for complete setup
  5. Production Deploy: Use ./deploy.sh for automated deployment

🌐 Deployment Environments

QA (qa.my.nethesis.it)

  • Trigger: Every commit to main branch
  • Auto-deploy: Immediate deployment via Render
  • PR Previews: Temporary environments for pull requests

Production (my.nethesis.it)

  • Trigger: Manual deployment via ./deploy.sh script
  • Auto-Deploy: Render automatically deploys when render.yaml is updated
  • Manual Control: Deploy only when explicitly triggered
  • Security: Private services (Backend, Collect, Frontend) only accessible through Proxy

πŸ“ Configuration

Local Development

See individual component documentation for setup:

Production Deployment

  • Environment Variables: Configured in Render dashboard
  • Service Configuration: Defined in render.yaml
  • Deployment: Use ./deploy.sh script for automated deployment

πŸ“š Documentation

  • frontend - UI setup, environment variables, and pages
  • backend - Server setup, environment variables, and authorization architecture
  • backend API - Complete API reference with authentication
  • collect - Server setup, environment variables and inventory structure
  • sync CLI - RBAC configuration and sync init setup
  • deploy script - Production deployment script for Render
  • proxy - Production load balancer configuration with nginx
  • DESIGN.md - Architecture decisions and design patterns

πŸ“– API Documentation

Live Documentation: https://bump.sh/nethesis/doc/my - auto-updated on every commit.

🀝 Development Workflow

Standard Development

git commit -m "feat: new feature"
git push origin main                    # β†’ qa.my.nethesis.it updates

Feature Testing

git checkout -b feature/new-feature
git push origin feature/new-feature     # β†’ Create PR
# β†’ my-proxy-qa-pr-123.onrender.com created

Production Release

# Automated release with quality checks
./release.sh patch                       # β†’ 0.0.5 β†’ 0.0.6 (bug fixes)
./release.sh minor                       # β†’ 0.0.5 β†’ 0.1.0 (new features)
./release.sh major                       # β†’ 0.0.5 β†’ 1.0.0 (breaking changes)
# β†’ Runs tests, formatting, linting β†’ Creates tag β†’ Pushes to GitHub

The release script will:

  1. Run all quality checks (formatting, linting, tests)
  2. Bump version in all files
  3. Create git commit and tag
  4. Push to GitHub
  5. Trigger GitHub Actions to build and publish Docker images

Production Deployment

# Standard deployment with image verification
./deploy.sh

# Fast deployment without image verification (less safe but faster)
./deploy.sh --skip-verify

# Show help
./deploy.sh --help

The deployment script will:

  1. Get the latest git tag automatically
  2. Show the tag and ask for confirmation
  3. Verify Docker images exist on ghcr.io (unless --skip-verify)
  4. Update render.yaml with new image tags
  5. Commit changes with your git user info
  6. Push to main branch
  7. Render automatically deploys the updated services

Example output:

ℹ️  Latest git tag: v0.1.5
Do you want to deploy v0.1.5 to production? [y/N] y
βœ… All Docker images verified successfully
βœ… render.yaml updated successfully
βœ… Changes committed and pushed to main branch
βœ… Deployment initiated successfully!

🀝 Contributing

  1. Follow existing code patterns and conventions
  2. Pre-commit: Run make pre-commit in both directories
  3. Test RBAC changes with --dry-run before applying
  4. Ensure CI tests pass before submitting PRs

πŸ“„ License

See LICENSE file for details.

About

My Nethesis

Resources

License

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •