feat: implement complete CMT backend with API endpoints and test suite
- Add 7 core API endpoints: users, transactions, partners, products, inventory, payments, credit - Implement role-based authentication (admin/write/read-only access) - Add comprehensive database models with proper relationships - Include full test coverage for all endpoints and business logic - Set up Alembic migrations and Docker configuration - Configure FastAPI app with CORS and database integration
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Simple script to test if environment variables are being read correctly.
|
||||
"""
|
||||
import os
|
||||
import sys
|
||||
sys.path.append('.')
|
||||
|
||||
from app.core.config import settings
|
||||
|
||||
print("Testing environment variable loading...")
|
||||
print(f"Environment: {settings.environment}")
|
||||
print(f"Project Name: {settings.project_name}")
|
||||
print(f"Database URI: {settings.database_uri}")
|
||||
print(f"Secret Key: {settings.secret_key[:20]}..." if len(settings.secret_key) > 20 else settings.secret_key)
|
||||
print(f"Admin Token Expire Minutes: {settings.admin_token_expire_minutes}")
|
||||
print(f"Write Token Expire Minutes: {settings.write_token_expire_minutes}")
|
||||
print(f"Read Only Token Expire Minutes: {settings.read_only_token_expire_minutes}")
|
||||
|
||||
print("\nDirect environment check:")
|
||||
print(f"SECRET_KEY from env: {os.getenv('SECRET_KEY', 'NOT_FOUND')[:20]}...")
|
||||
print(f"ADMIN_TOKEN_EXPIRE_MINUTES from env: {os.getenv('ADMIN_TOKEN_EXPIRE_MINUTES', 'NOT_FOUND')}")
|
||||
print(f"WRITE_TOKEN_EXPIRE_MINUTES from env: {os.getenv('WRITE_TOKEN_EXPIRE_MINUTES', 'NOT_FOUND')}")
|
||||
print(f"READ_ONLY_TOKEN_EXPIRE_MINUTES from env: {os.getenv('READ_ONLY_TOKEN_EXPIRE_MINUTES', 'NOT_FOUND')}")
|
||||
Reference in New Issue
Block a user