Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 37 additions & 6 deletions .cursor/mcp.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,40 @@
{
"mcpServers": {
"10x-mvp-tracker": {
"command": "npx",
"args": ["-y", "@przeprogramowani/10x-mvp-tracker@latest"],
"transport": "stdio"
}
"mcpServers": {
"10x-mvp-tracker": {
"command": "npx",
"args": ["-y", "@przeprogramowani/10x-mvp-tracker@latest"],
"transport": "stdio"
},
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp@latest"
]
},
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "."],
"transport": "stdio"
},
"fetch": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-fetch"],
"transport": "stdio"
},
"git": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-git"],
"transport": "stdio"
},
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"],
"transport": "stdio"
},
"time": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-time"],
"transport": "stdio"
}
}
}
34 changes: 34 additions & 0 deletions .cursor/rules/shared.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
description:
globs:
alwaysApply: true
---
# AI Rules for {app-name}

{project-description}

## Tech Stack

- htmx
- tailwind
- Django
- PostgreSQL
- nginx

## Project Structure

When introducing changes to the project, always follow the Django preferred directory structure

## Coding practices

### Guidelines for clean code

- Use feedback from linters to improve the code when making changes.
- Prioritize error handling and edge cases.
- Handle errors and edge cases at the beginning of functions.
- Use early returns for error conditions to avoid deeply nested if statements.
- Place the happy path last in the function for improved readability.
- Avoid unnecessary else statements; use if-return pattern instead.
- Use guard clauses to handle preconditions and invalid states early.
- Implement proper error logging and user-friendly error messages.
- Consider using custom error types or error factories for consistent error handling.
22 changes: 8 additions & 14 deletions app/templates/account/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,47 +7,41 @@

<!-- Tailwind CSS -->
<script src="https://cdn.tailwindcss.com"></script>

<!-- Custom CSS -->
{% load static %}
<link rel="stylesheet" href="{% static 'gallery/css/style.css' %}">

{% block extra_head %}{% endblock %}
</head>
<body class="bg-gradient-to-br from-blue-50 to-indigo-100 min-h-screen">
<body class="bg-gradient-to-br from-slate-50 via-blue-50 to-indigo-100 min-h-screen font-sans antialiased">
<div class="min-h-screen flex items-center justify-center py-12 px-4 sm:px-6 lg:px-8">
<div class="max-w-md w-full space-y-8">
<div class="max-w-md w-full space-y-6">
<!-- Logo/Header -->
<div class="text-center">
<a href="{% url 'gallery:gallery_list' %}" class="inline-block">
<h1 class="text-5xl font-bold text-blue-600 mb-2">📷 SmartGallery</h1>
<a href="{% url 'gallery:gallery_list' %}" class="inline-block transition opacity-90 hover:opacity-100">
<h1 class="text-4xl sm:text-5xl font-bold bg-gradient-to-r from-blue-600 to-indigo-600 bg-clip-text text-transparent mb-1">SmartGallery</h1>
</a>
<p class="text-gray-600">{% block page_title %}Welcome{% endblock %}</p>
<p class="text-slate-600 text-sm">{% block page_title %}Welcome{% endblock %}</p>
</div>

<!-- Messages -->
{% if messages %}
<div class="space-y-2">
{% for message in messages %}
<div class="alert alert-{{ message.tags }} bg-{{ message.tags }}-100 border border-{{ message.tags }}-400 text-{{ message.tags }}-700 px-4 py-3 rounded" role="alert">
<div class="px-4 py-3 rounded-lg text-sm font-medium border {% if message.tags == 'error' or message.tags == 'danger' %}bg-red-50 border-red-200 text-red-800{% elif message.tags == 'success' %}bg-emerald-50 border-emerald-200 text-emerald-800{% elif message.tags == 'warning' %}bg-amber-50 border-amber-200 text-amber-800{% elif message.tags == 'info' %}bg-blue-50 border-blue-200 text-blue-800{% else %}bg-slate-50 border-slate-200 text-slate-800{% endif %}" role="alert">
{{ message }}
</div>
{% endfor %}
</div>
{% endif %}

<!-- Main Content Card -->
<div class="bg-white rounded-xl shadow-xl p-8">
<div class="bg-white/95 backdrop-blur rounded-2xl shadow-xl shadow-slate-200/50 border border-slate-100 p-8">
{% block content %}{% endblock %}
</div>

<!-- Footer Links -->
<div class="text-center text-sm text-gray-600">
<div class="text-center text-sm text-slate-600">
{% block footer_links %}{% endblock %}
</div>
</div>
</div>

{% block extra_js %}{% endblock %}
</body>
</html>
36 changes: 18 additions & 18 deletions app/templates/account/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,26 @@

{% block content %}
<div>
<h2 class="text-2xl font-bold text-gray-900 mb-6 text-center">Sign In</h2>
<h2 class="text-2xl font-bold text-slate-900 mb-6 text-center">Sign In</h2>

<!-- Social Login Buttons -->
{% get_providers as socialaccount_providers %}
{% if socialaccount_providers %}
<div class="mb-6">
<div class="relative">
<div class="absolute inset-0 flex items-center">
<div class="w-full border-t border-gray-300"></div>
<div class="w-full border-t border-slate-200"></div>
</div>
<div class="relative flex justify-center text-sm">
<span class="px-2 bg-white text-gray-500">Or continue with</span>
<span class="px-2 bg-white text-slate-500">Or continue with</span>
</div>
</div>

<div class="mt-4 grid grid-cols-3 gap-3">
{% for provider in socialaccount_providers %}
{% if provider.id == "google" %}
<a href="{% provider_login_url provider.id process='login' %}"
class="w-full inline-flex justify-center items-center px-4 py-2 border border-gray-300 rounded-lg shadow-sm bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 transition-colors">
class="w-full inline-flex justify-center items-center px-4 py-2.5 border border-slate-200 rounded-xl bg-white text-sm font-medium text-slate-700 hover:bg-slate-50 hover:border-slate-300 transition-colors shadow-sm">
<svg class="w-5 h-5" viewBox="0 0 24 24">
<path fill="#4285F4" d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"/>
<path fill="#34A853" d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"/>
Expand All @@ -36,21 +36,21 @@ <h2 class="text-2xl font-bold text-gray-900 mb-6 text-center">Sign In</h2>
</a>
{% elif provider.id == "facebook" %}
<a href="{% provider_login_url provider.id process='login' %}"
class="w-full inline-flex justify-center items-center px-4 py-2 border border-gray-300 rounded-lg shadow-sm bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 transition-colors">
class="w-full inline-flex justify-center items-center px-4 py-2.5 border border-slate-200 rounded-xl bg-white text-sm font-medium text-slate-700 hover:bg-slate-50 hover:border-slate-300 transition-colors shadow-sm">
<svg class="w-5 h-5" fill="#1877F2" viewBox="0 0 24 24">
<path d="M24 12.073c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.99 4.388 10.954 10.125 11.854v-8.385H7.078v-3.47h3.047V9.43c0-3.007 1.792-4.669 4.533-4.669 1.312 0 2.686.235 2.686.235v2.953H15.83c-1.491 0-1.956.925-1.956 1.874v2.25h3.328l-.532 3.47h-2.796v8.385C19.612 23.027 24 18.062 24 12.073z"/>
</svg>
</a>
{% elif provider.id == "github" %}
<a href="{% provider_login_url provider.id process='login' %}"
class="w-full inline-flex justify-center items-center px-4 py-2 border border-gray-300 rounded-lg shadow-sm bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 transition-colors">
class="w-full inline-flex justify-center items-center px-4 py-2.5 border border-slate-200 rounded-xl bg-white text-sm font-medium text-slate-700 hover:bg-slate-50 hover:border-slate-300 transition-colors shadow-sm">
<svg class="w-5 h-5" fill="currentColor" viewBox="0 0 24 24">
<path fill-rule="evenodd" d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z" clip-rule="evenodd"/>
</svg>
</a>
{% else %}
<a href="{% provider_login_url provider.id process='login' %}"
class="w-full inline-flex justify-center items-center px-4 py-2 border border-gray-300 rounded-lg shadow-sm bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 transition-colors">
class="w-full inline-flex justify-center items-center px-4 py-2.5 border border-slate-200 rounded-xl bg-white text-sm font-medium text-slate-700 hover:bg-slate-50 hover:border-slate-300 transition-colors shadow-sm">
{{ provider.name }}
</a>
{% endif %}
Expand All @@ -60,10 +60,10 @@ <h2 class="text-2xl font-bold text-gray-900 mb-6 text-center">Sign In</h2>
<div class="mt-6">
<div class="relative">
<div class="absolute inset-0 flex items-center">
<div class="w-full border-t border-gray-300"></div>
<div class="w-full border-t border-slate-200"></div>
</div>
<div class="relative flex justify-center text-sm">
<span class="px-2 bg-white text-gray-500">Or use email</span>
<span class="px-2 bg-white text-slate-500">Or use email</span>
</div>
</div>
</div>
Expand All @@ -81,15 +81,15 @@ <h2 class="text-2xl font-bold text-gray-900 mb-6 text-center">Sign In</h2>
{% endif %}

<div>
<label for="id_login" class="block text-sm font-medium text-gray-700 mb-2">
<label for="id_login" class="block text-sm font-medium text-slate-700 mb-2">
Email address
</label>
<input type="email"
name="login"
id="id_login"
autocomplete="email"
required
class="appearance-none relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-lg focus:outline-none focus:ring-blue-500 focus:border-blue-500 focus:z-10 sm:text-sm"
class="block w-full px-3 py-2.5 border border-slate-200 rounded-xl text-slate-900 placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 sm:text-sm transition-shadow"
placeholder="you@example.com"
value="{{ form.login.value|default:'' }}">
{% if form.login.errors %}
Expand All @@ -98,15 +98,15 @@ <h2 class="text-2xl font-bold text-gray-900 mb-6 text-center">Sign In</h2>
</div>

<div>
<label for="id_password" class="block text-sm font-medium text-gray-700 mb-2">
<label for="id_password" class="block text-sm font-medium text-slate-700 mb-2">
Password
</label>
<input type="password"
name="password"
id="id_password"
autocomplete="current-password"
required
class="appearance-none relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-lg focus:outline-none focus:ring-blue-500 focus:border-blue-500 focus:z-10 sm:text-sm"
class="block w-full px-3 py-2.5 border border-slate-200 rounded-xl text-slate-900 placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 sm:text-sm transition-shadow"
placeholder="••••••••">
{% if form.password.errors %}
<p class="mt-1 text-sm text-red-600">{{ form.password.errors.0 }}</p>
Expand All @@ -118,8 +118,8 @@ <h2 class="text-2xl font-bold text-gray-900 mb-6 text-center">Sign In</h2>
<input id="id_remember"
name="remember"
type="checkbox"
class="h-4 w-4 text-blue-600 focus:ring-blue-500 border-gray-300 rounded">
<label for="id_remember" class="ml-2 block text-sm text-gray-700">
class="h-4 w-4 text-blue-600 focus:ring-blue-500/30 border-slate-300 rounded">
<label for="id_remember" class="ml-2 block text-sm text-slate-700">
Remember me
</label>
</div>
Expand All @@ -137,7 +137,7 @@ <h2 class="text-2xl font-bold text-gray-900 mb-6 text-center">Sign In</h2>

<div>
<button type="submit"
class="group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-lg text-white bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors">
class="w-full flex justify-center py-3 px-4 border border-transparent text-sm font-semibold rounded-xl text-white bg-gradient-to-r from-blue-600 to-indigo-600 hover:from-blue-700 hover:to-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500/50 transition-all shadow-lg shadow-blue-500/25">
Sign in
</button>
</div>
Expand All @@ -146,9 +146,9 @@ <h2 class="text-2xl font-bold text-gray-900 mb-6 text-center">Sign In</h2>
{% endblock %}

{% block footer_links %}
<p class="text-gray-600">
<p class="text-slate-600">
Don't have an account?
<a href="{% url 'account_signup' %}" class="font-medium text-blue-600 hover:text-blue-500">
<a href="{% url 'account_signup' %}" class="font-medium text-blue-600 hover:text-blue-700 transition-colors">
Sign up
</a>
</p>
Expand Down
8 changes: 4 additions & 4 deletions app/templates/account/logout.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

{% block content %}
<div>
<h2 class="text-2xl font-bold text-gray-900 mb-6 text-center">Sign Out</h2>
<h2 class="text-2xl font-bold text-slate-900 mb-6 text-center">Sign Out</h2>

<p class="text-gray-600 text-center mb-6">
<p class="text-slate-600 text-center mb-6">
Are you sure you want to sign out?
</p>

Expand All @@ -20,12 +20,12 @@ <h2 class="text-2xl font-bold text-gray-900 mb-6 text-center">Sign Out</h2>

<div class="space-y-3">
<button type="submit"
class="group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-lg text-white bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500 transition-colors">
class="w-full flex justify-center py-3 px-4 border border-transparent text-sm font-semibold rounded-xl text-white bg-red-600 hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-red-500/50 transition-all shadow-lg shadow-red-500/20">
Sign out
</button>

<a href="{% url 'gallery:gallery_list' %}"
class="group relative w-full flex justify-center py-2 px-4 border border-gray-300 text-sm font-medium rounded-lg text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 transition-colors">
class="w-full flex justify-center py-3 px-4 border border-slate-200 text-sm font-medium rounded-xl text-slate-700 bg-white hover:bg-slate-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500/30 transition-colors">
Cancel
</a>
</div>
Expand Down
12 changes: 6 additions & 6 deletions app/templates/account/password_reset.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

{% block content %}
<div>
<h2 class="text-2xl font-bold text-gray-900 mb-6 text-center">Password Reset</h2>
<h2 class="text-2xl font-bold text-slate-900 mb-6 text-center">Password Reset</h2>

<p class="text-gray-600 text-center mb-6">
<p class="text-slate-600 text-center mb-6">
Forgotten your password? Enter your email address below, and we'll send you an email allowing you to reset it.
</p>

Expand All @@ -22,15 +22,15 @@ <h2 class="text-2xl font-bold text-gray-900 mb-6 text-center">Password Reset</h2
{% endif %}

<div>
<label for="id_email" class="block text-sm font-medium text-gray-700 mb-2">
<label for="id_email" class="block text-sm font-medium text-slate-700 mb-2">
Email address
</label>
<input type="email"
name="email"
id="id_email"
autocomplete="email"
required
class="appearance-none relative block w-full px-3 py-2 border border-gray-300 placeholder-gray-500 text-gray-900 rounded-lg focus:outline-none focus:ring-blue-500 focus:border-blue-500 focus:z-10 sm:text-sm"
class="block w-full px-3 py-2.5 border border-slate-200 rounded-xl text-slate-900 placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 sm:text-sm transition-shadow"
placeholder="you@example.com"
value="{{ form.email.value|default:'' }}">
{% if form.email.errors %}
Expand All @@ -49,9 +49,9 @@ <h2 class="text-2xl font-bold text-gray-900 mb-6 text-center">Password Reset</h2
{% endblock %}

{% block footer_links %}
<p class="text-gray-600">
<p class="text-slate-600">
Remember your password?
<a href="{% url 'account_login' %}" class="font-medium text-blue-600 hover:text-blue-500">
<a href="{% url 'account_login' %}" class="font-medium text-blue-600 hover:text-blue-700 transition-colors">
Sign in
</a>
</p>
Expand Down
Loading
Loading