quantum-ai/templates/authentication/profile.html
Claude bfdef5b658 Refactor: Complete architecture reorganization with proper separation of concerns
BREAKING CHANGES:
- Move marketplace and agent discovery views from core to agent_base app
- Transfer all wallet functionality from core to dedicated wallet app
- Move Stripe webhook handling to wallet app for better organization
- Consolidate payment system logic under single responsibility

NEW STRUCTURE:
- core app: Platform pages only (homepage, pricing)
- agent_base app: Complete agent marketplace and catalog system
- wallet app: Full payment system with Stripe integration
- Individual agent apps: Unchanged, self-contained

IMPROVEMENTS:
- Clean URL namespacing (agent_base:marketplace, wallet:wallet)
- Template organization by app responsibility
- Removed deprecated CSS files (header.css)
- Added utility classes (.hidden)
- Updated all template references to new URL structure
- Comprehensive CLAUDE.md documentation updates

TECHNICAL CHANGES:
- Templates moved: marketplace.html, agent_detail.html → agent_base/
- Templates moved: wallet*.html → wallet/
- New files: agent_base/views.py, agent_base/urls.py, wallet/urls.py
- Updated main urls.py routing configuration
- Fixed Django system checks and namespace conflicts
- Verified all functionality with test suite

This reorganization follows Django best practices with single responsibility
principle, making the codebase more maintainable and scalable.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-21 20:03:53 +05:30

59 lines
2.3 KiB
HTML

{% extends 'base.html' %}
{% block content %}
<div class="container">
<a href="{% url 'core:homepage' %}" class="back-link">← Back to Homepage</a>
<div class="profile-header">
<h1>Profile - {{ user.username }}</h1>
<p><strong>Email:</strong> {{ user.email }}</p>
<p><strong>Balance:</strong> {{ user.wallet_balance }} AED</p>
<div class="wallet-status {{ wallet_status.status }}">
<strong>{{ wallet_status.message }}</strong>
</div>
<a href="{% url 'wallet:wallet' %}" class="btn">Manage Wallet</a>
<a href="{% url 'wallet:wallet_topup' %}" class="btn">Top Up</a>
</div>
<div class="stats">
<div class="stat-card">
<div class="stat-value">{{ total_spent }} AED</div>
<div>Total Spent</div>
</div>
<div class="stat-card">
<div class="stat-value">{{ total_topped_up }} AED</div>
<div>Total Topped Up</div>
</div>
<div class="stat-card">
<div class="stat-value">{{ total_agents_used }}</div>
<div>Agents Used</div>
</div>
</div>
{% if popular_agents %}
<div class="popular-agents">
<h2>Your Most Used Agents</h2>
{% for agent in popular_agents %}
<div class="agent-item">
<span>{{ agent.agent_slug }}</span>
<span><strong>{{ agent.count }}</strong> times</span>
</div>
{% endfor %}
</div>
{% endif %}
<div class="transactions">
<h2>Recent Transactions</h2>
{% if transactions %}
{% for transaction in transactions %}
<div class="transaction-item">
<div>
<strong>{{ transaction.description }}</strong>
<small>{{ transaction.created_at|date:"M d, Y H:i" }}</small>
</div>
<div class="transaction-amount {% if transaction.type == 'top_up' %}positive{% else %}negative{% endif %}">
{% if transaction.type == 'top_up' %}+{% else %}-{% endif %}{{ transaction.amount }} AED
</div>
</div>
{% endfor %}
{% else %}
<p>No transactions yet.</p>
{% endif %}
</div>
</div>
{% endblock %}