commit bde2f3a97dd4243542d6b0f12761c743944214c9 Author: cryptorugmunch Date: Thu Jul 2 01:24:22 2026 +0700 merge: chore/cleanup-remove-bloat-and-secrets into main diff --git "a/, r.stdout)\n# Check if we can read wallets from the data directory directly - theyre" "b/, r.stdout)\n# Check if we can read wallets from the data directory directly - theyre" new file mode 100644 index 0000000..e69de29 diff --git a/.deploy-cleanup.sh b/.deploy-cleanup.sh new file mode 100755 index 0000000..fbc7a8e --- /dev/null +++ b/.deploy-cleanup.sh @@ -0,0 +1,6 @@ +#!/bin/bash +# Run at start of every deploy to prevent stale bytecode +echo "Cleaning stale .pyc cache..." +find /root/backend -name "*.pyc" -delete +find /root/backend -name "__pycache__" -type d -empty -delete +echo "Done. $(date)" diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3a24a39 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,30 @@ +# Docker image bloat prevention +# HuggingFace models download at runtime — don't bake into image +.cache/ +.cache/huggingface/ +/root/.cache/ + +# Python artifacts +__pycache__/ +*.pyc +*.pyo +.venv/ +venv/ +.env + +# Data files (volume mounted at runtime) +data/ +data/faiss/ +data/models/ + +# Git +.git/ +.gitignore + +# IDE +.vscode/ +.idea/ + +# Tests +tests/ +*.test.py diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..9b4c4fb --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,35 @@ +# CODEOWNERS for RMI Backend + +# Core team owns critical security files +@crypto-rug-muncher/security-team @security-team *SECURITY.md *security* app/auth.py app/protection*.py + +# Domain owners +@crypto-rug-muncher/backend-team app/routers/ app/domain/ +@crypto-rug-muncher/data-team app/databus/ app/data/ +@crypto-rug-muncher/frontend-team rmi-frontend/ + +# Infrastructure +@crypto-rug-muncher/infrastructure-team docker/ .github/workflows/ .pre-commit-config.yaml + +# Documentation +@crypto-rug-muncher/docs-team docs/ *.md + +# Automated review requirements +* @crypto-rug-muncher/backend-team @crypto-rug-muncher/security-team + +# Routers and domain files need review from domain owners +app/routers/*.py @crypto-rug-muncher/backend-team +app/domain/**/*.py @crypto-rug-muncher/backend-team + +# Security-critical files need security team review +app/auth*.py @crypto-rug-muncher/security-team +app/protection*.py @crypto-rug-muncher/security-team +app/security*.py @crypto-rug-muncher/security-team + +# Databus files need data team review +app/databus/*.py @crypto-rug-muncher/data-team +app/data/*.py @crypto-rug-muncher/data-team + +# CI/CD files need infrastructure team review +.github/workflows/*.yml @crypto-rug-muncher/infrastructure-team +.pre-commit-config.yaml @crypto-rug-muncher/infrastructure-team diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..2ead7d6 --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,186 @@ +# Contributing to RMI Backend + +Thank you for your interest in contributing to RMI! This is a commercial security product, and we take security seriously. Please read this guide carefully. + +## Table of Contents + +- [Development Environment](#development-environment) +- [Code Style](#code-style) +- [Security Requirements](#security-requirements) +- [Testing](#testing) +- [Pull Request Process](#pull-request-process) +- [Release Process](#release-process) + +## Development Environment + +### Prerequisites + +- Python 3.11+ +- [uv](https://github.com/astral-sh/uv) for package management +- Docker for local development +- Tailscale for secure server access + +### Setup + +```bash +# Clone the repository +git clone git@github.com:crypto-rug-muncher/rugmuncher-backend.git +cd rugmuncher-backend + +# Install dependencies +uv sync --frozen + +# Set up environment +cp .env.example .env +# Edit .env with your local credentials + +# Run linter +ruff check . + +# Run type checker +mypy app/ + +# Run tests +pytest tests/unit/ +``` + +## Code Style + +### Python + +- **Format**: Black with 88-character lines +- **Lint**: Ruff with `--select=E,F,I,S,W` rules +- **Types**: Full type hints on all public functions +- **Imports**: Isort with `known_first_party=app` + +### Commit Messages + +``` +(): + + + +