Skip to content

mulikruchi07/CloudPilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

21 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

☁️ CloudPilot - Cloud Workflow Automation SaaS

A modern, full-featured SaaS platform for automating cloud infrastructure workflows using n8n and Supabase.

🌟 Features

βœ… Completed Features

  • User Authentication - Secure signup/login with Supabase Auth
  • Dashboard - Real-time stats and execution monitoring
  • Workflow Management - Create, edit, run, and delete workflows
  • Template Marketplace - Browse and import pre-built workflow templates
  • Credentials Management - Secure encrypted storage for cloud credentials (AWS, GCP, Azure)
  • Execution History - Timeline view of all workflow executions
  • User Settings - Profile management and password changes
  • Multi-Cloud Support - AWS, GCP, Azure, and Kubernetes

πŸ”’ Security Features

  • AES-256-GCM encryption for credentials
  • Row-Level Security (RLS) in Supabase
  • JWT-based authentication
  • Secure credential injection into workflows
  • Environment-based configuration

πŸ“Š Dynamic UI Features

  • Real-time execution statistics
  • Interactive workflow cards
  • Searchable and filterable views
  • Modal-based forms
  • Toast notifications
  • Timeline execution history
  • Responsive design

πŸš€ Quick Start

Prerequisites

  • Node.js 18+ installed
  • Supabase account
  • n8n instance (local or cloud)

Installation

  1. Clone the repository
cd cloudpilot-complete
  1. Install dependencies
npm install
  1. Setup environment variables
# Copy the example env file
cp .env.example .env

# Generate encryption key
npm run generate-key

# Edit .env and add:
# - Generated encryption key
# - Supabase credentials
# - N8N URL and API key
  1. Setup database
# Go to Supabase SQL Editor
# Run the script: scripts/schema.sql
  1. Start the server
npm start
# or for development with auto-reload:
npm run dev
  1. Open the application
http://localhost:4000

πŸ“ Project Structure

cloudpilot-complete/
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ index.html          # Main HTML file with UI
β”‚   └── app.js              # Frontend JavaScript
β”œβ”€β”€ routes/
β”‚   β”œβ”€β”€ credentials.js      # Credential management APIs
β”‚   β”œβ”€β”€ settings.js         # User settings APIs
β”‚   └── executions.js       # Execution tracking APIs
β”œβ”€β”€ utils/
β”‚   β”œβ”€β”€ auth.js             # Authentication middleware
β”‚   └── encryption.js       # Encryption utilities
β”œβ”€β”€ scripts/
β”‚   └── schema.sql          # Database schema
β”œβ”€β”€ server.js               # Main Express server
β”œβ”€β”€ package.json
β”œβ”€β”€ .env.example
└── README.md

πŸ”§ Configuration

Environment Variables

Variable Description Required
PORT Server port (default: 4000) No
SUPABASE_URL Your Supabase project URL Yes
SUPABASE_ANON_KEY Supabase anonymous key Yes
SUPABASE_SERVICE_ROLE_KEY Supabase service role key Yes
N8N_URL N8N instance URL Yes
N8N_API_KEY N8N API key Yes
ENCRYPTION_KEY 64-char hex encryption key Yes

Generating Encryption Key

npm run generate-key

Copy the output to your .env file under ENCRYPTION_KEY.

πŸ“š API Documentation

Authentication

All API routes (except /api/config and /api/health) require Bearer token authentication.

headers: {
  'Authorization': 'Bearer YOUR_TOKEN'
}

Endpoints

Credentials

  • GET /api/credentials - List user credentials
  • POST /api/credentials - Add new credential
  • GET /api/credentials/:id - Get credential details
  • PUT /api/credentials/:id - Update credential
  • DELETE /api/credentials/:id - Delete credential
  • POST /api/credentials/:id/test - Test credential connection

Settings

  • GET /api/settings/profile - Get user profile
  • POST /api/settings/profile - Update profile
  • POST /api/settings/password - Change password
  • POST /api/settings/email - Update email
  • POST /api/settings/notifications - Update notification preferences

Executions

  • POST /api/executions - Create execution record
  • GET /api/executions/recent - Get recent executions
  • GET /api/executions/stats - Get execution statistics
  • GET /api/executions/:id - Get execution details
  • DELETE /api/executions/:id - Delete execution
  • POST /api/executions/:id/retry - Retry failed execution
  • GET /api/workflows/:id/history - Get workflow execution history

Workflows

  • GET /api/workflows - List workflows
  • POST /api/workflows - Create workflow
  • GET /api/workflows/:id - Get workflow details
  • PATCH /api/workflows/:id - Update workflow
  • DELETE /api/workflows/:id - Delete workflow
  • POST /api/workflows/:id/run - Execute workflow

Templates

  • POST /api/templates/import - Import template

🎨 UI Components

Dashboard

  • Execution statistics cards
  • Recent executions table
  • Quick action buttons

Workflows View

  • Workflow cards with actions
  • Search and filter
  • Run, view details, and delete options

Templates View

  • Template marketplace
  • Category filtering
  • One-click import

Credentials View

  • Secure credential management
  • Provider-specific forms (AWS, GCP, Azure)
  • Test connection feature

Execution History

  • Timeline view of executions
  • Status badges (success, failed, running)
  • Duration tracking
  • Error messages

Settings

  • Profile management
  • Password change
  • Notification preferences

πŸ” Security

Credential Encryption

  • AES-256-GCM encryption
  • Unique IV per credential
  • Authentication tags for integrity
  • Keys stored in environment variables

Database Security

  • Row-Level Security (RLS) enabled
  • Users can only access their own data
  • Service role key for backend operations only
  • JWT token validation

πŸ“ˆ Performance Optimization

  • Database indexes on frequently queried columns
  • Pagination for large datasets
  • Caching of static data
  • Lazy loading of execution history
  • Optimistic UI updates

πŸ› Troubleshooting

Common Issues

Issue: "ENCRYPTION_KEY must be 64 hex characters"

# Generate a new key
npm run generate-key
# Copy to .env file

Issue: "Failed to fetch configuration"

  • Check SUPABASE_URL and SUPABASE_ANON_KEY in .env
  • Ensure server is running on correct port

Issue: "Authentication failed"

  • Verify Supabase credentials
  • Check if user is logged in
  • Ensure token is not expired

Issue: "Failed to connect to n8n"

  • Verify N8N_URL is correct
  • Check N8N_API_KEY is valid
  • Ensure n8n instance is running

🀝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

πŸ‘₯ Support

For support, please:

  • Open an issue on GitHub
  • Check existing documentation
  • Review troubleshooting section

πŸ“Š Tech Stack

  • Frontend: Vanilla JavaScript, HTML5, CSS3
  • Backend: Node.js, Express
  • Database: Supabase (PostgreSQL)
  • Authentication: Supabase Auth
  • Workflow Engine: n8n
  • Encryption: Node.js Crypto (AES-256-GCM)

🎯 Performance Metrics

  • Page load: < 2s
  • API response: < 500ms
  • Encryption/Decryption: < 100ms
  • Database queries: < 200ms
  • 99.9% uptime target

Built with ❀️ by the CloudPilot Team

About

A multi-cloud monitoring and automation platform that provides a centralized dashboard to manage and track infrastructure across AWS, Azure, and Google Cloud. Built to simplify cloud operations by integrating automated workflows (via n8n) with real-time monitoring and activity logging.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors