Spaces:
Sleeping
Sleeping
feat: enhance button design system with improved UX and visual hierarchy
Browse files- Redesign primary buttons with solid green styling for clear call-to-action
- Update GPS button to professional outline style (secondary priority)
- Implement consistent hover effects with translateY animations
- Add improved button variants with better color contrast
- Update README.md to reflect current v3.0.0 features and tech stack
- Add comprehensive API reference documentation
- Update .gitignore to exclude internal documentation files
UI/UX improvements:
- Primary actions now have clear visual prominence
- Secondary actions use subtle outline styling
- Enhanced accessibility with better color contrast
- Consistent interaction feedback across all buttons
- Professional design suitable for research environments
- .gitignore +2 -1
- README.md +13 -9
- llm.txt +45 -39
- static/css/design-system.css +33 -24
- static/index.html +1 -1
.gitignore
CHANGED
@@ -65,8 +65,9 @@ Thumbs.db
|
|
65 |
deployment_info.txt
|
66 |
CACHE_MANAGEMENT.md
|
67 |
|
68 |
-
#
|
69 |
llm.txt
|
|
|
70 |
|
71 |
# Jupyter
|
72 |
.ipynb_checkpoints/
|
|
|
65 |
deployment_info.txt
|
66 |
CACHE_MANAGEMENT.md
|
67 |
|
68 |
+
# Documentation (keep local only)
|
69 |
llm.txt
|
70 |
+
API_REFERENCE.md
|
71 |
|
72 |
# Jupyter
|
73 |
.ipynb_checkpoints/
|
README.md
CHANGED
@@ -13,15 +13,17 @@ short_description: Professional tree mapping and forestry management platform
|
|
13 |
|
14 |
A **secure, robust, and high-performance** web application for mapping, tracking, and managing urban forest data using FastAPI with comprehensive security implementations and modern modular architecture.
|
15 |
|
16 |
-
##
|
17 |
|
|
|
18 |
- **Modular JavaScript Architecture**: Clean separation of concerns with 6 specialized modules
|
|
|
19 |
- **146 Pre-loaded Tree Species**: Comprehensive database from Tezpur research team
|
20 |
- **Smart Auto-completion**: Real-time species suggestions with debounced search
|
21 |
- **Multi-language Support**: Local Assamese names, scientific names, common names
|
22 |
-
- **
|
23 |
-
- **
|
24 |
-
- **
|
25 |
- **Professional UI**: Emoji-free interface suitable for research environments
|
26 |
|
27 |
## Core Features
|
@@ -76,14 +78,16 @@ A **secure, robust, and high-performance** web application for mapping, tracking
|
|
76 |
|
77 |
## Technical Stack
|
78 |
|
79 |
-
- **Backend**: FastAPI (Python 3.11+)
|
80 |
-
- **Database**:
|
|
|
81 |
- **Frontend**: Modular JavaScript with ES6 modules
|
82 |
- **Architecture**: 6 specialized modules (Auth, API, UI, Form, AutoComplete, Media)
|
83 |
-
- **Mapping**: Interactive maps with
|
84 |
-
- **Validation**: Pydantic
|
85 |
-
- **Security**:
|
86 |
- **Performance**: Debounced search, Promise.all(), optimized DOM queries
|
|
|
87 |
|
88 |
---
|
89 |
|
|
|
13 |
|
14 |
A **secure, robust, and high-performance** web application for mapping, tracking, and managing urban forest data using FastAPI with comprehensive security implementations and modern modular architecture.
|
15 |
|
16 |
+
## Current Version: 3.0.0 - Supabase Edition
|
17 |
|
18 |
+
### Key Features
|
19 |
- **Modular JavaScript Architecture**: Clean separation of concerns with 6 specialized modules
|
20 |
+
- **Supabase Cloud Integration**: PostgreSQL database with real-time capabilities
|
21 |
- **146 Pre-loaded Tree Species**: Comprehensive database from Tezpur research team
|
22 |
- **Smart Auto-completion**: Real-time species suggestions with debounced search
|
23 |
- **Multi-language Support**: Local Assamese names, scientific names, common names
|
24 |
+
- **Enhanced Button Design**: Professional UX with clear visual hierarchy
|
25 |
+
- **Interactive Mapping**: Beautiful tree-shaped pins with 3D design
|
26 |
+
- **Multi-role Authentication**: Admin, researcher, and viewer roles
|
27 |
- **Professional UI**: Emoji-free interface suitable for research environments
|
28 |
|
29 |
## Core Features
|
|
|
78 |
|
79 |
## Technical Stack
|
80 |
|
81 |
+
- **Backend**: FastAPI 3.0.0 (Python 3.11+)
|
82 |
+
- **Database**: Supabase PostgreSQL (cloud-hosted)
|
83 |
+
- **Storage**: Supabase Storage for file uploads
|
84 |
- **Frontend**: Modular JavaScript with ES6 modules
|
85 |
- **Architecture**: 6 specialized modules (Auth, API, UI, Form, AutoComplete, Media)
|
86 |
+
- **Mapping**: Interactive maps with custom tree-shaped pins
|
87 |
+
- **Validation**: Pydantic 2.10.0+ with custom validators
|
88 |
+
- **Security**: Multi-layer protection with role-based access
|
89 |
- **Performance**: Debounced search, Promise.all(), optimized DOM queries
|
90 |
+
- **Deployment**: Docker on Hugging Face Spaces
|
91 |
|
92 |
---
|
93 |
|
llm.txt
CHANGED
@@ -18,7 +18,7 @@ TreeTrack is a comprehensive tree mapping and urban forestry management web appl
|
|
18 |
- **Technology Stack**: FastAPI + Supabase + Modular JavaScript (ES6) + Interactive Maps
|
19 |
- **Purpose**: Professional field research tool for tree documentation with 12 comprehensive data fields
|
20 |
- **Architecture**: Modular design with 6 specialized JavaScript modules + beautiful tree-shaped map pins
|
21 |
-
- **Version**:
|
22 |
- **Authentication**: Multi-role system (admin, researcher, viewer)
|
23 |
|
24 |
## CURRENT DATABASE ARCHITECTURE (SUPABASE)
|
@@ -106,14 +106,13 @@ EXPOSE 7860
|
|
106 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
107 |
```
|
108 |
|
109 |
-
##
|
110 |
|
111 |
-
###
|
112 |
-
- **
|
113 |
-
- **To**: Modular architecture with 6 specialized modules
|
114 |
- **Benefits**: Better maintainability, testability, and performance
|
115 |
-
- **
|
116 |
-
- **
|
117 |
|
118 |
### Modular Architecture
|
119 |
|
@@ -289,37 +288,44 @@ async def add_cache_headers(request: Request, call_next):
|
|
289 |
response.headers["Cache-Control"] = "no-cache, no-store, must-revalidate"
|
290 |
```
|
291 |
|
292 |
-
## FILE STRUCTURE (
|
293 |
|
294 |
```
|
295 |
TreeTrack/
|
296 |
-
README.md # HF Spaces config + documentation
|
297 |
-
Dockerfile # HF Spaces Docker configuration
|
298 |
-
requirements.txt # Python dependencies
|
299 |
-
llm.txt # LLM knowledge base (
|
300 |
-
app.py # Main FastAPI application
|
301 |
-
config.py # Comprehensive configuration system
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
.
|
307 |
-
.
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
323 |
```
|
324 |
|
325 |
## API ENDPOINTS
|
@@ -499,11 +505,11 @@ curl http://localhost:7860/api/version
|
|
499 |
- Enhanced close button functionality
|
500 |
- Better coordinate transfer from map to form
|
501 |
|
502 |
-
### Modular Architecture (Version
|
503 |
-
- Complete
|
504 |
- Professional emoji-free interface
|
505 |
-
-
|
506 |
-
- Better
|
507 |
|
508 |
## FILE LOCATIONS FOR SPECIFIC FUNCTIONALITY
|
509 |
|
|
|
18 |
- **Technology Stack**: FastAPI + Supabase + Modular JavaScript (ES6) + Interactive Maps
|
19 |
- **Purpose**: Professional field research tool for tree documentation with 12 comprehensive data fields
|
20 |
- **Architecture**: Modular design with 6 specialized JavaScript modules + beautiful tree-shaped map pins
|
21 |
+
- **Version**: 3.0.0 (Latest: Supabase Edition with enhanced mapping)
|
22 |
- **Authentication**: Multi-role system (admin, researcher, viewer)
|
23 |
|
24 |
## CURRENT DATABASE ARCHITECTURE (SUPABASE)
|
|
|
106 |
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
|
107 |
```
|
108 |
|
109 |
+
## MODULAR ARCHITECTURE (Version 3.0.0)
|
110 |
|
111 |
+
### Current Implementation
|
112 |
+
- **Architecture**: Fully modular design with 6 specialized JavaScript modules
|
|
|
113 |
- **Benefits**: Better maintainability, testability, and performance
|
114 |
+
- **Design**: Clean separation of concerns with dependency injection
|
115 |
+
- **UI**: Professional emoji-free interface suitable for research
|
116 |
|
117 |
### Modular Architecture
|
118 |
|
|
|
288 |
response.headers["Cache-Control"] = "no-cache, no-store, must-revalidate"
|
289 |
```
|
290 |
|
291 |
+
## FILE STRUCTURE (Current)
|
292 |
|
293 |
```
|
294 |
TreeTrack/
|
295 |
+
├── README.md # HF Spaces config + documentation
|
296 |
+
├── Dockerfile # HF Spaces Docker configuration
|
297 |
+
├── requirements.txt # Python dependencies
|
298 |
+
├── llm.txt # LLM knowledge base (this file)
|
299 |
+
├── app.py # Main FastAPI application
|
300 |
+
├── config.py # Comprehensive configuration system
|
301 |
+
├── constants.py # Application constants
|
302 |
+
├── auth.py # Authentication system
|
303 |
+
├── supabase_client.py # Supabase connection client
|
304 |
+
├── supabase_database.py # Database operations
|
305 |
+
├── supabase_storage.py # File storage operations
|
306 |
+
├── master_tree_database.py # Tree species autocomplete
|
307 |
+
├── .env.example # Environment variables template
|
308 |
+
├── .gitattributes # Git configuration
|
309 |
+
├── .gitignore # Git ignore patterns
|
310 |
+
├── data/
|
311 |
+
│ └── master_trees.db # Local SQLite for tree species
|
312 |
+
└── static/
|
313 |
+
├── css/
|
314 |
+
│ └── design-system.css # Professional design system
|
315 |
+
├── index.html # Main application interface
|
316 |
+
├── login.html # Login page
|
317 |
+
├── map.html # Interactive map interface
|
318 |
+
├── map.js # Map functionality
|
319 |
+
├── sw.js # Service Worker for PWA
|
320 |
+
└── js/
|
321 |
+
├── modules/
|
322 |
+
│ ├── auth-manager.js # Authentication module
|
323 |
+
│ ├── api-client.js # API communication module
|
324 |
+
│ ├── ui-manager.js # UI management module
|
325 |
+
│ ├── form-manager.js # Form handling module
|
326 |
+
│ ├── autocomplete-manager.js # Smart suggestions module
|
327 |
+
│ └── media-manager.js # Media handling module
|
328 |
+
└── tree-track-app.js # Main orchestrator
|
329 |
```
|
330 |
|
331 |
## API ENDPOINTS
|
|
|
505 |
- Enhanced close button functionality
|
506 |
- Better coordinate transfer from map to form
|
507 |
|
508 |
+
### Modular Architecture (Version 3.0.0)
|
509 |
+
- Complete modular design with 6 specialized modules
|
510 |
- Professional emoji-free interface
|
511 |
+
- Enhanced button design with improved UX
|
512 |
+
- Better performance and maintainability
|
513 |
|
514 |
## FILE LOCATIONS FOR SPECIFIC FUNCTIONALITY
|
515 |
|
static/css/design-system.css
CHANGED
@@ -392,54 +392,61 @@ a:focus {
|
|
392 |
pointer-events: none;
|
393 |
}
|
394 |
|
395 |
-
/* Button Variants */
|
396 |
.tt-btn-primary {
|
397 |
-
background: var(--
|
398 |
color: white;
|
399 |
-
box-shadow: var(--shadow-
|
|
|
400 |
}
|
401 |
|
402 |
.tt-btn-primary:hover {
|
|
|
403 |
transform: translateY(-2px);
|
404 |
-
box-shadow: var(--shadow-
|
405 |
}
|
406 |
|
407 |
.tt-btn-primary:active {
|
408 |
transform: translateY(0);
|
|
|
|
|
409 |
}
|
410 |
|
411 |
.tt-btn-secondary {
|
412 |
-
background: var(--
|
413 |
-
color:
|
414 |
-
border:
|
415 |
-
backdrop-filter: var(--glass-blur);
|
416 |
}
|
417 |
|
418 |
.tt-btn-secondary:hover {
|
419 |
-
background:
|
420 |
-
transform: translateY(-
|
|
|
421 |
}
|
422 |
|
423 |
.tt-btn-outline {
|
424 |
background: transparent;
|
425 |
-
color: var(--
|
426 |
-
border: 1px solid var(--
|
427 |
}
|
428 |
|
429 |
.tt-btn-outline:hover {
|
430 |
-
background: var(--
|
431 |
-
border-color: var(--
|
432 |
-
|
|
|
|
|
433 |
}
|
434 |
|
435 |
.tt-btn-ghost {
|
436 |
background: transparent;
|
437 |
-
color: var(--gray-
|
|
|
438 |
}
|
439 |
|
440 |
.tt-btn-ghost:hover {
|
441 |
background: var(--gray-100);
|
442 |
-
color: var(--gray-
|
443 |
}
|
444 |
|
445 |
/* Button Sizes */
|
@@ -656,16 +663,18 @@ a:focus {
|
|
656 |
|
657 |
/* GPS Button Enhanced Mobile Styling */
|
658 |
.tt-btn-gps {
|
659 |
-
background:
|
660 |
-
color:
|
661 |
-
|
662 |
-
|
663 |
}
|
664 |
|
665 |
.tt-btn-gps:hover {
|
666 |
-
background: var(--accent-
|
667 |
-
|
668 |
-
|
|
|
|
|
669 |
}
|
670 |
|
671 |
/* Mobile-specific GPS button styling */
|
|
|
392 |
pointer-events: none;
|
393 |
}
|
394 |
|
395 |
+
/* Button Variants - Redesigned for better UX and Visual Hierarchy */
|
396 |
.tt-btn-primary {
|
397 |
+
background: var(--primary-600);
|
398 |
color: white;
|
399 |
+
box-shadow: var(--shadow-sm);
|
400 |
+
border: 1px solid transparent;
|
401 |
}
|
402 |
|
403 |
.tt-btn-primary:hover {
|
404 |
+
background: var(--primary-700);
|
405 |
transform: translateY(-2px);
|
406 |
+
box-shadow: var(--shadow-md);
|
407 |
}
|
408 |
|
409 |
.tt-btn-primary:active {
|
410 |
transform: translateY(0);
|
411 |
+
background: var(--primary-800);
|
412 |
+
box-shadow: var(--shadow-sm);
|
413 |
}
|
414 |
|
415 |
.tt-btn-secondary {
|
416 |
+
background: var(--gray-200);
|
417 |
+
color: var(--gray-800);
|
418 |
+
border: 1px solid transparent;
|
|
|
419 |
}
|
420 |
|
421 |
.tt-btn-secondary:hover {
|
422 |
+
background: var(--gray-300);
|
423 |
+
transform: translateY(-2px);
|
424 |
+
box-shadow: var(--shadow-sm);
|
425 |
}
|
426 |
|
427 |
.tt-btn-outline {
|
428 |
background: transparent;
|
429 |
+
color: var(--primary-700);
|
430 |
+
border: 1px solid var(--primary-400);
|
431 |
}
|
432 |
|
433 |
.tt-btn-outline:hover {
|
434 |
+
background: var(--primary-50);
|
435 |
+
border-color: var(--primary-600);
|
436 |
+
color: var(--primary-800);
|
437 |
+
transform: translateY(-2px);
|
438 |
+
box-shadow: var(--shadow-sm);
|
439 |
}
|
440 |
|
441 |
.tt-btn-ghost {
|
442 |
background: transparent;
|
443 |
+
color: var(--gray-700);
|
444 |
+
border: 1px solid transparent;
|
445 |
}
|
446 |
|
447 |
.tt-btn-ghost:hover {
|
448 |
background: var(--gray-100);
|
449 |
+
color: var(--gray-900);
|
450 |
}
|
451 |
|
452 |
/* Button Sizes */
|
|
|
663 |
|
664 |
/* GPS Button Enhanced Mobile Styling */
|
665 |
.tt-btn-gps {
|
666 |
+
background: transparent;
|
667 |
+
color: var(--accent-700);
|
668 |
+
border: 1px solid var(--accent-300);
|
669 |
+
box-shadow: none;
|
670 |
}
|
671 |
|
672 |
.tt-btn-gps:hover {
|
673 |
+
background: var(--accent-50);
|
674 |
+
border-color: var(--accent-500);
|
675 |
+
color: var(--accent-800);
|
676 |
+
transform: translateY(-2px);
|
677 |
+
box-shadow: var(--shadow-sm);
|
678 |
}
|
679 |
|
680 |
/* Mobile-specific GPS button styling */
|
static/index.html
CHANGED
@@ -991,7 +991,7 @@
|
|
991 |
|
992 |
<div class="form-group">
|
993 |
<div class="location-buttons">
|
994 |
-
<button type="button" id="getLocation" class="tt-btn tt-btn-
|
995 |
<span class="btn-text">Get GPS Location</span>
|
996 |
</button>
|
997 |
<a href="/static/map.html" class="tt-btn tt-btn-primary location-btn-map">
|
|
|
991 |
|
992 |
<div class="form-group">
|
993 |
<div class="location-buttons">
|
994 |
+
<button type="button" id="getLocation" class="tt-btn tt-btn-outline location-btn-gps">
|
995 |
<span class="btn-text">Get GPS Location</span>
|
996 |
</button>
|
997 |
<a href="/static/map.html" class="tt-btn tt-btn-primary location-btn-map">
|