feat: Add comprehensive backend validation, toast notifications, and Tokyo Night theme

- Backend: Add server-side validation with go-playground/validator/v10
- Frontend: Add toast notifications for API errors with @zerodevx/svelte-toast
- UI: Complete Tokyo Night theme redesign with modern animations
- Docs: Update COMPLETE_DOCUMENTATION.md and README.md with all enhancements
- Validation: Email format, password strength, and input sanitization
- UX: Real-time error feedback, loading states, and responsive design
This commit is contained in:
2026-01-21 20:01:18 -05:00
parent 7448dfff30
commit 55c42f1f99
84 changed files with 7749 additions and 4 deletions
+23
View File
@@ -0,0 +1,23 @@
meta:
name: Get Profile
seq: 3
http:
method: get
url: "{{base_url}}/api/auth/profile"
auth:
type: bearer
docs: |
## Get User Profile
Retrieves the profile of the authenticated user.
**Authentication:** Required (Bearer token)
**Response:**
- `id` (string): User UUID
- `email` (string): User's email address
- `username` (string): User's username
**Error Responses:**
- 401: Invalid or missing JWT token
- 404: User not found
+29
View File
@@ -0,0 +1,29 @@
meta:
name: Login User
seq: 2
http:
method: post
url: "{{base_url}}/api/auth/login"
body:
type: json
data: |
{
"login": "test@example.com",
"password": "password123"
}
docs: |
## Login User
Authenticates a user and returns a JWT token.
**Request Body:**
- `login` (string, required): Email address or username
- `password` (string, required): User's password
**Response:**
- `token` (string): JWT authentication token (24h expiry)
- `user` (object): User profile with id, email, username
**Error Responses:**
- 401: Invalid credentials
- 400: Invalid request data
+31
View File
@@ -0,0 +1,31 @@
meta:
name: Register User
seq: 1
http:
method: post
url: "{{base_url}}/api/auth/register"
body:
type: json
data: |
{
"email": "test@example.com",
"username": "testuser",
"password": "password123"
}
docs: |
## Register User
Creates a new user account with email, username, and password.
**Request Body:**
- `email` (string, required): Valid email address
- `username` (string, required): Unique username (3-50 chars)
- `password` (string, required): Password (min 6 chars)
**Response:**
- `token` (string): JWT authentication token
- `user` (object): User profile with id, email, username
**Error Responses:**
- 409: Email or username already exists
- 400: Invalid request data