π Table of Contents
π Project Introduction
Bomiot is a revolutionary distributed document management framework and full-stack development platform, with core components written in Rust, designed to solve modern development pain points. We believe that excellent open-source projects should not only have powerful technology stacks but also focus on developer experience and team collaboration efficiency, making it simple and easy to learn.
π― Design Philosophy
- Learning Curve: Backend supports Django, FastAPI, Flask; Frontend supports React, Angular, Vue, Django built-in Templates (official provides a Vue set)
- Developer Friendly: Seamless experience from 0 to 1, no complex configuration required
- Team Collaboration: Efficient development team interaction mechanisms
- Modular Design: Plugin-based architecture with extensible functionality
- Easy Deployment: pip installation, convenient for team deployment, supports Python 3.9+
- Signal Mechanism: Data management through signal mechanism, more convenient custom API support
- Enterprise Ready: Production-ready, supports large-scale deployment
β¨ Core Features
π§ Development Tools
- β
Project Scaffolding: One-click project and application creation
- β
Plugin System: Rich plugin ecosystem
- β
Real-time File Monitoring: Enhanced development efficiency
π Task Management
- β
Scheduled Tasks: Powerful scheduling system
- β
Task Monitoring: Real-time task status tracking
- β
Error Handling: Intelligent exception handling mechanism
- β
Log Management: Complete logging system
π Access Control
- β
Fine-grained Permissions: Role-based access control
- β
JWT Authentication: Secure identity authentication
- β
API Permissions: Interface-level permission management
- β
Operation Audit: Complete operation logs
π Internationalization
- β
Multi-language Support: Built-in internationalization framework
- β
Dynamic Language Switching: Runtime language switching
- β
Localization Configuration: Regional settings
π System Monitoring
- β
Performance Monitoring: CPU, memory, disk monitoring
- β
Process Management: Real-time system process monitoring
- β
Network Monitoring: Network traffic statistics
- β
Health Checks: System health status detection
π Application Market
- β
Application Sharing: Application market pip installation, convenient and fast
- β
Component Market: Hot-pluggable components, dynamic import
π Quick Start
1. Install Bomiot
pip install bomiot
poetry add bomiot
2. Initialize Workspace
bomiot init
3. Create Project
bomiot project my-project
bomiot new my-app
4. Database
bomiot migrate
bomiot makemigrations
5. Create Administrator
bomiot initadmin
bomiot initpwd
6. Start Service
bomiot run
bomiot run --host 0.0.0.0 --port 8080
π¦ Installation Guide
System Requirements
- Python: 3.9 or higher
- Node.js: 18.19.1 or higher
- Operating System: Windows, macOS, Linux
Modify Frontend
1. Install Frontend Dependencies
cd my-project/templates
yarn install
2. Open Development baseUrl
vim my-project/templates/src/boot/axios.js
...
const baseURL = 'http://127.0.0.1:8000' // Replace with your actual API URL
const api = axios.create({
baseURL: baseURL
})
...
3. Frontend Development Debugging
bomiot run
cd my-project/templates
&
quasar dev
π οΈ Command Line Tools
Bomiot provides powerful command line tools to make development and management simple and efficient.
π Command Overview
bomiot [command] [options]
π§ Core Commands
Project Management
bomiot -h
bomiot -v
bomiot init
bomiot project <project_name>
bomiot new <app_name>
bomiot plugins <plugin_name>
Application Market
bomiot market <project_name>
pip install -y <plugin_name>
or
poetry add <plugin_name>
Database Management
bomiot makemigrations
bomiot migrate
bomiot loaddata <source>
bomiot dumpdata [appname]
User Management
bomiot initadmin
bomiot initpwd
Service Management
bomiot run [options]
bomiot deploy <project_name>
System Validation
bomiot keys
π Server Startup Options
bomiot run [options]
Options:
--host, -b HOST Server host address (default: 127.0.0.1)
--port, -p PORT Server port (default: 8000)
--workers -w WORKERS Number of worker processes (default: 1)
--log-level LEVEL Log level (critical/error/warning/info/debug/trace)
--ssl-keyfile FILE SSL key file
--ssl-certfile FILE SSL certificate file
--proxy-headers Enable proxy headers
--http HTTP HTTP implementation (auto/h11/httptools)
--loop LOOP Async loop (auto/asyncio/uvloop)
--limit-concurrency Maximum concurrent requests (default: 1000)
--backlog Maximum waiting connections (default: 128)
--timeout-keep-alive HTTP keep-alive timeout (default: 5)
--timeout-graceful-shutdown Graceful shutdown timeout (default: 30)
π Usage Examples
bomiot run
"name": "django", "url": "http://127.0.0.1:8000/test/"
"name": "fastapi", "url": "http://127.0.0.1:8000/fastapi/test/"
"name": "flask", "url": "http://127.0.0.1:8000/flask/test/"
bomiot run --host 0.0.0.0 --port 8080
bomiot run --host 0.0.0.0 --port 80 --workers 4 --log-level info
bomiot run --ssl-keyfile key.pem --ssl-certfile cert.pem
ποΈ Project Structure
my-project/ # Project directory
βββ fastapi_app/ # fastapi app
β βββ main.py # Main file
βββ flask_app/ # flask app
β βββ main.py # Main file
βββ language/ # Backend language files
β βββ en-US.toml # English translation file
β βββ zh-CN.toml # Chinese translation file
βββ media/ # Static files
β βββ img/ # Public images
β βββ ***.md # Various md documents
βββ static/ # Static files
βββ __version__.py # my-project version
βββ bomiotconf.ini # Bomiot project identifier file
βββ files.py # File signals
βββ receiver.py # Data API signals
βββ server.py # Server signals
βββ README.md # ReadME documentation
dbs/ # Database files
logs/ # System logs
setup.ini # Project configuration file
...
π§ Configuration
Environment Configuration
Bomiot uses configuration files to manage different environment settings:
[project]
name = my-project
[database](requires keys validation)
engine = sqlite
name = db_name
user = db_user
password = db_pwd
host = db_host
port = db_port
[local]
time_zone = UTC
[jwt]
user_jwt_time = 1000000
[throttle]
allocation_seconds = 1
throttle_seconds = 10
[request]
limit = 2
[file](requires keys validation)
file_size = 102400000
file_extension = py,png,jpg,jpeg,gif,bmp,webp,txt,md,html,htm,js,css,json,xml,csv,xlsx,xls,ppt,pptx,doc,docx,pdf
Database Configuration
Supports multiple databases:
- SQLite (default)
- MySQL (requires keys validation)
- PostgreSQL (requires keys validation)
- Oracle (requires keys validation)
π Deployment Guide
Supervisor
bomiot deploy my-project
Scheduled Tasks
Supported Scheduled Tasks
ARGS_MAP = {
'cron': ['year', 'month', 'day', 'week', 'day_of_week', 'hour', 'minute', 'second', 'start_date', 'end_date','timezone'],
'interval': ['weeks', 'days', 'hours', 'minutes', 'seconds', 'start_date', 'end_date', 'timezone'],
'date': ['run_date', 'timezone']
}
Writing Scheduled Tasks
from bomiot.server.core.signal import bomiot_signals
def my_scheduled_task(sender, **kwargs):
print("Execute scheduled task")
bomiot_signals.send(sender=my_scheduled_task, msg={
'models': 'JobList',
'data': {
'trigger': 'interval',
'seconds': 60,
'end_date': '2099-05-30',
'description': 'Execute every 60 seconds, end on May 30, 2099'
}
})
π€ Contributing
We welcome all forms of contributions!
Ways to Contribute
- Report Bugs: Create Issue
- Feature Requests: Submit Feature Request
- Code Contributions: Fork the project and submit Pull Request
- Documentation Improvements: Help improve documentation
- Community Support: Answer other users' questions
Ways to Contribute Code
git clone https://github.com/your-username/Bomiot.git
git checkout -b feature/amazing-feature
git commit -m 'Add amazing feature'
git push origin feature/amazing-feature
Code Standards
- Follow PEP 8 Python code standards
- Add appropriate comments and docstrings
- Write unit tests
- Ensure all tests pass
π License
This project is licensed under the APLv2 License - see the LICENSE file for details.
π Related Links
πΊ Video Tutorials
π Issue Reporting
β If this project helps you, please give us a Star!
Made with β€οΈ by Bomiot Team