{"id":34819832,"url":"https://github.com/levskiy0/m3m","last_synced_at":"2026-04-13T10:32:32.265Z","repository":{"id":327931369,"uuid":"1109444266","full_name":"levskiy0/m3m","owner":"levskiy0","description":"m3m is for developers who want to write logic in the browser, hit Save, and walk away.  no Docker, no Composer, no NPM Install","archived":false,"fork":false,"pushed_at":"2025-12-25T09:56:38.000Z","size":5208,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-28T12:56:58.733Z","etag":null,"topics":["golang","javascript","js","low-code","mongodb","no-docker","self-hosted"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/levskiy0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-03T20:14:52.000Z","updated_at":"2025-12-27T12:46:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/levskiy0/m3m","commit_stats":null,"previous_names":["levskiy0/m3m"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/levskiy0/m3m","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levskiy0%2Fm3m","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levskiy0%2Fm3m/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levskiy0%2Fm3m/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levskiy0%2Fm3m/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/levskiy0","download_url":"https://codeload.github.com/levskiy0/m3m/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/levskiy0%2Fm3m/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31749077,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","javascript","js","low-code","mongodb","no-docker","self-hosted"],"created_at":"2025-12-25T14:26:18.980Z","updated_at":"2026-04-13T10:32:32.247Z","avatar_url":"https://github.com/levskiy0.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"left\"\u003e\n  \u003cimg src=\"web/ui/public/logo.svg\" width=\"180\" alt=\"M3M Logo\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"left\"\u003eMini Services Manager\u003c/h1\u003e\n\n\u003cp align=\"left\"\u003e\n  \u003cstrong\u003eRun JavaScript services with zero infrastructure overhead\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"left\"\u003e\n  \u003cimg alt=\"Go\" src=\"https://img.shields.io/badge/Go-1.24-00ADD8?logo=go\u0026logoColor=white\" /\u003e\n  \u003cimg alt=\"License\" src=\"https://img.shields.io/badge/License-MIT-blue\" /\u003e\n  \u003cimg alt=\"Platform\" src=\"https://img.shields.io/badge/Platform-Linux%20%7C%20Mac-lightgrey\" /\u003e\n  \u003cimg alt=\"Status\" src=\"https://img.shields.io/badge/Status-Development-orange\" /\u003e\n\u003c/p\u003e\n\n---\n\n\u003e **Note:** M3M is currently in active development. Some features may be incomplete, unstable, or subject to change. Use in production at your own risk.\n\n---\n\n![screenshot.png](screenshot.png)\n\n## Table of Contents\n\n- [Why M3M?](#why-m3m)\n  - [The Problem: Infrastructure Overkill](#the-problem-infrastructure-overkill)\n  - [The Solution: Unified Runtime](#the-solution-unified-runtime)\n  - [The Philosophy](#the-philosophy)\n- [Example](#example)\n- [Service Lifecycle](#service-lifecycle)\n  - [Boot Phase](#1-boot-phase)\n  - [Start Phase](#2-start-phase)\n  - [Shutdown Phase](#3-shutdown-phase)\n- [Performance](#performance)\n- [Installation](#installation)\n  - [Quick Install](#quick-install-recommended-docker--mongodb)\n  - [Start \u0026 Setup](#start--setup)\n  - [All Commands](#all-commands)\n  - [Directory Structure](#directory-structure)\n  - [Adding Plugins](#adding-plugins)\n  - [Configuration](#configuration)\n- [From Source (Manual)](#from-source-manual)\n  - [Standalone Binary](#standalone-binary)\n  - [Configuration](#configuration-1)\n  - [Database Drivers](#database-drivers)\n- [CLI Commands](#cli-commands)\n- [Accessing Services](#accessing-services)\n- [Development](#development)\n- [License](#license)\n\n---\n\n## Why M3M?\n\n### The Problem: Infrastructure Overkill\n\nWe live in an era where deploying a simple 50-line integration or a webhook handler requires a Dockerfile, a docker-compose.yml, 500MB of Node.js base images, and a bunch of external dependencies.\n\nYour VPS is bloated with layers, your RAM is consumed by identical Node processes, and updating a single line of code feels like a ritual.\n\n### The Solution: Unified Runtime\n\nM3M was born to kill this complexity. It is a single, lightweight binary that acts as a **private ecosystem** for your scripts.\n\nInstead of managing separate containers for every task, you have one environment that provides everything out of the box.\n\n### The Philosophy\n\nM3M is for developers who want to write logic in the browser (or their editor), hit **Save**, and walk away. It's for those who value their time and their server resources.\n\n- No more NPM dependency hell for micro-tasks\n- No more Docker storage anxiety\n- No more cloud bills for things that should run on your $5 VPS\n\n---\n\n## Example\n\n```javascript\n$service.boot(() =\u003e {\n  const users = $database.collection('users');\n\n  // HTTP Endpoint\n  $router.get('/users', (ctx) =\u003e {\n    return { users: users.find({}) };\n  });\n\n  $router.post('/users', (ctx) =\u003e {\n    const user = users.insert(ctx.body);\n    return { user };\n  });\n\n  // Cron Task (Every hour)\n  $schedule.every('1h', () =\u003e {\n    $logger.info('Total users:', users.count({}));\n  });\n});\n\n$service.start(() =\u003e {\n  $logger.info('Service is ready!');\n});\n```\n\n**Built-in modules** (accessed with `$` prefix):\n- **Core:** `$service`, `$router`, `$schedule`, `$logger`, `$env`\n- **Data:** `$database`, `$storage`, `$goals`\n- **Network:** `$http`, `$smtp`\n- **Utils:** `$crypto`, `$encoding`, `$utils`, `$delayed`, `$validator`\n- **Media:** `$image`, `$draw`\n\n---\n\n## Service Lifecycle\n\nEvery service has three lifecycle phases managed by the `$service` module:\n\n### 1. Boot Phase\n\nInitialize your service, set up routes, and configure modules.\n\n```javascript\n$service.boot(() =\u003e {\n  // Set up routes\n  $router.get('/hello', (ctx) =\u003e {\n    return { message: 'Hello World!' };\n  });\n\n  // Configure scheduler\n  $schedule.every('1h', () =\u003e {\n    $logger.info('Hourly task running');\n  });\n});\n```\n\n### 2. Start Phase\n\nCalled when service is ready. Good for initial data loading.\n\n```javascript\n$service.start(() =\u003e {\n  $logger.info('Service started!');\n  // Load initial data, etc.\n});\n```\n\n### 3. Shutdown Phase\n\nCalled when service is stopping. Clean up resources here.\n\n```javascript\n$service.shutdown(() =\u003e {\n  $logger.info('Service stopping...');\n  // Close connections, save state, etc.\n});\n```\n\n---\n\n## Performance\n\nRuns comfortably on a **$5/mo VPS** with 512MB RAM alongside 20+ active services. The Go binary + embedded UI weighs ~30MB. No Node.js runtime, no container layers.\n\n---\n\n## Installation\n\n### Quick Install (Recommended: Docker + MongoDB)\n\n```bash\n# Download script\ncurl -fsSL https://raw.githubusercontent.com/levskiy0/m3m/main/m3m.sh -o m3m.sh\nchmod +x m3m.sh\n\n# Install latest release\n./m3m.sh install\n\n# Or install specific version\n./m3m.sh install v1.0.0\n\n# Or install development version\n./m3m.sh install main\n```\n\nThis will:\n- Clone the repository to `.m3m/src`\n- Build Docker image locally\n- Generate config file with random JWT secret\n\n### Start \u0026 Setup\n\n```bash\n# Start server\n./m3m.sh start\n\n# Create admin user\n./m3m.sh admin admin@example.com yourpassword\n\n# View logs\n./m3m.sh logs\n```\n\nOpen http://localhost:8080 and login.\n\n### All Commands\n\n```bash\n./m3m.sh install [version]    # Install (latest, v1.0.0, or main)\n./m3m.sh update [version]     # Update to version\n./m3m.sh rebuild              # Rebuild image (after adding plugins)\n./m3m.sh start                # Start the container\n./m3m.sh stop                 # Stop the container\n./m3m.sh restart              # Restart the container\n./m3m.sh logs                 # Show container logs\n./m3m.sh status               # Show container status\n./m3m.sh version              # Show installed/latest versions\n./m3m.sh admin \u003cemail\u003e \u003cpw\u003e   # Create admin user\n./m3m.sh config               # Show config\n./m3m.sh uninstall            # Remove M3M (keeps data)\n```\n\n### Directory Structure\n\n```\n.m3m/\n├── config      # Configuration file\n├── version     # Installed version\n├── src/        # Repository clone\n├── plugins/    # Plugin sources (copy here, then rebuild)\n└── data/       # Persistent data (mounted to container)\n    ├── storage/    # File storage for services\n    ├── plugins/    # Compiled plugins (.so files)\n    ├── logs/       # Application logs\n    └── mongodb/    # MongoDB database files\n```\n\n### Adding Plugins\n\n```bash\n# Copy plugin source to plugins directory\ncp -r my-telegram-plugin .m3m/plugins/\n\n# Rebuild image (plugins are compiled during build)\n./m3m.sh rebuild\n```\n\n### Configuration\n\nEdit `.m3m/config`:\n\n```bash\n# M3M Configuration\nM3M_PORT=8080\nM3M_JWT_SECRET=\u003cauto-generated\u003e\nM3M_SERVER_URI=http://localhost:8080\n```\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `M3M_PORT` | `8080` | Server port |\n| `M3M_JWT_SECRET` | auto | JWT signing secret (auto-generated) |\n| `M3M_SERVER_URI` | `http://localhost:8080` | Public server URI |\n\n---\n\n## From Source (Manual)\n\n```bash\n# Clone\ngit clone https://github.com/levskiy0/m3m.git\ncd m3m\n\n# Build (requires Go 1.24+, Node.js 20+)\nmake build\n\n# Create first admin user\n./build/m3m new-admin admin@example.com yourpassword\n\n# Run\n./build/m3m serve\n```\n\n### Standalone Binary\n\nYou can also just download the binary and run — **zero configuration required**:\n\n```bash\n# Download binary from releases\n./m3m new-admin admin@example.com yourpassword\n./m3m serve\n```\n\nOn first run, M3M automatically creates `config.yaml` with:\n- **SQLite database** (embedded, no external server needed)\n- **Random JWT secret** (secure by default)\n\n\u003e **Note:** Docker installation via `m3m.sh` is recommended for production as it includes automatic updates, backup management, and proper process supervision.\n\n### Configuration\n\nDefault config file: `config.yaml` (auto-created on first run)\n\n```yaml\nserver:\n  host: \"0.0.0.0\"\n  port: 8080\n  uri: \"http://127.0.0.1:8080\"\n\ndatabase:\n  driver: \"sqlite\"  # \"mongodb\" or \"sqlite\"\n\n# MongoDB - external server required\nmongodb:\n  uri: \"mongodb://localhost:27017\"\n  database: \"m3m\"\n\n# SQLite - embedded, no external dependencies (default)\nsqlite:\n  path: \"./data\"\n  database: \"m3m\"\n\njwt:\n  secret: \"change-me-in-production\"\n  expiration: 168h\n\nstorage:\n  path: \"./storage\"\n\nlogging:\n  level: \"info\"\n  path: \"./logs\"\n```\n\n#### Database Drivers\n\n| Driver | Config | Requirements |\n|--------|--------|--------------|\n| `sqlite` | `driver: \"sqlite\"` | **None** — embedded in binary |\n| `mongodb` | `driver: \"mongodb\"` | External MongoDB server |\n\n**SQLite mode** uses embedded [FerretDB](https://www.ferretdb.com/) with SQLite backend. All MongoDB query syntax (`$eq`, `$gt`, `$in`, etc.) works identically in both modes — switch anytime without code changes.\n\n---\n\n## CLI Commands\n\n```bash\n# Start server\nm3m serve\n\n# Start with custom config\nm3m serve -c /path/to/config.yaml\n\n# Create root admin\nm3m new-admin admin@example.com yourpassword\n\n# Check version\nm3m version\n```\n\n---\n\n## Accessing Services\n\nOnce running, your service endpoints are available at:\n\n```\nGET  /r/{project-slug}/your-route\nPOST /r/{project-slug}/your-route\n```\n\n---\n\n## Development\n\n```bash\nmake init          # Initialize project\nmake dev           # Run backend in dev mode\nmake web-dev       # Run frontend dev server\nmake test          # Run tests\nmake docs          # Generate JavaScript API docs (CODE.md)\n```\n\n---\n\n## Claude Code Integration\n\nM3M includes an MCP server for Claude Code. It provides access to the JavaScript runtime API documentation.\n\n```bash\n# Build MCP server\nmake build-mcp\n\n# Add to Claude Code\nclaude mcp add m3m-api ./build/m3m-mcp\n\n# Verify connection\nclaude mcp list\n```\n\nNow Claude knows the M3M API and can help write services.\n\n---\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevskiy0%2Fm3m","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flevskiy0%2Fm3m","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flevskiy0%2Fm3m/lists"}