mirror of
https://github.com/blackboxprogramming/BlackRoad-Operating-System.git
synced 2026-03-17 07:57:19 -05:00
This commit adds a complete backend infrastructure with: **Core Infrastructure:** - FastAPI application with async/await support - PostgreSQL database with SQLAlchemy ORM - Redis caching layer - JWT authentication and authorization - Docker and Docker Compose configuration **API Services:** - Authentication API (register, login, JWT tokens) - RoadMail API (email service with folders, send/receive) - BlackRoad Social API (posts, comments, likes, follows) - BlackStream API (video streaming with views/likes) - File Storage API (file explorer with upload/download) - RoadCoin Blockchain API (mining, transactions, wallet) - AI Chat API (conversations with AI assistant) **Database Models:** - User accounts with wallet integration - Email and folder management - Social media posts and engagement - Video metadata and analytics - File storage with sharing - Blockchain blocks and transactions - AI conversation history **Features:** - Complete CRUD operations for all services - Real-time blockchain mining with proof-of-work - Transaction validation and wallet management - File upload with S3 integration (ready) - Social feed with engagement metrics - Email system with threading support - AI chat with conversation persistence **Documentation:** - Comprehensive README with setup instructions - API documentation (Swagger/ReDoc auto-generated) - Deployment guide for multiple platforms - Testing framework with pytest **DevOps:** - Docker containerization - Docker Compose for local development - Database migrations with Alembic - Health check endpoints - Makefile for common tasks All APIs are production-ready with proper error handling, input validation, and security measures.
65 lines
1.3 KiB
Makefile
65 lines
1.3 KiB
Makefile
# BlackRoad OS Backend Makefile
|
|
|
|
.PHONY: help install dev run test clean docker-build docker-up docker-down
|
|
|
|
help:
|
|
@echo "BlackRoad OS Backend - Available Commands:"
|
|
@echo ""
|
|
@echo " make install - Install dependencies"
|
|
@echo " make dev - Run development server"
|
|
@echo " make test - Run tests"
|
|
@echo " make clean - Clean cache and temp files"
|
|
@echo " make docker-build - Build Docker images"
|
|
@echo " make docker-up - Start Docker containers"
|
|
@echo " make docker-down - Stop Docker containers"
|
|
@echo " make migrate - Run database migrations"
|
|
@echo " make lint - Run code linters"
|
|
@echo ""
|
|
|
|
install:
|
|
pip install -r requirements.txt
|
|
|
|
dev:
|
|
python run.py
|
|
|
|
run:
|
|
uvicorn app.main:app --host 0.0.0.0 --port 8000
|
|
|
|
test:
|
|
pytest -v
|
|
|
|
test-cov:
|
|
pytest --cov=app --cov-report=html --cov-report=term
|
|
|
|
clean:
|
|
find . -type d -name __pycache__ -exec rm -rf {} +
|
|
find . -type f -name "*.pyc" -delete
|
|
find . -type f -name "*.pyo" -delete
|
|
rm -rf .pytest_cache
|
|
rm -rf htmlcov
|
|
rm -rf .coverage
|
|
|
|
docker-build:
|
|
docker-compose build
|
|
|
|
docker-up:
|
|
docker-compose up -d
|
|
|
|
docker-down:
|
|
docker-compose down
|
|
|
|
docker-logs:
|
|
docker-compose logs -f backend
|
|
|
|
migrate:
|
|
alembic upgrade head
|
|
|
|
lint:
|
|
black app/
|
|
flake8 app/
|
|
mypy app/
|
|
|
|
format:
|
|
black app/
|
|
isort app/
|