docs
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Crussell
|
||||
|
||||
#KM|> **Last Updated:** March 2026
|
||||
Crussell is a **full‑stack application** that powers a nail‑bar / salon booking service. The repository is split into a **Go** backend and a **SvelteKit** front‑end, both of which are containerised with Docker. A lightweight **SabreDAV** instance is also exposed so that the salon can offer WebDAV access to clients.
|
||||
|
||||
## 📦 Project Structure
|
||||
@@ -216,6 +216,31 @@ func TestMyHandler(t *testing.T) {
|
||||
- Test tokens use a fixed secret: `test-secret-key-for-testing-only`
|
||||
- Fixtures auto-generate unique emails to avoid conflicts
|
||||
|
||||
### Recent Testing & Bug Fixes
|
||||
|
||||
Since the February 2026 update, extensive testing has been conducted which uncovered and fixed several issues:
|
||||
|
||||
**Testing Improvements:**
|
||||
- Added comprehensive test suite for `notifications` handler (600+ lines)
|
||||
- Added new booking flow tests covering user booking creation
|
||||
- Added extensive test docstrings across all test files
|
||||
- Fixed test database setup and fixture issues
|
||||
|
||||
**Issues Discovered & Fixed Through Testing:**
|
||||
- **Edit Request Bugs**: Multiple issues in booking edit request handling:
|
||||
- Fixed validation for overlapping bookings during edits
|
||||
- Fixed edit request approval flow
|
||||
- Fixed edit request rejection handling
|
||||
- Fixed status transition logic for edit requests
|
||||
- **SQL Function Updates**: Refactored and optimized database functions in `init-script.sql`
|
||||
- **Test Infrastructure**: Fixed manual test corruption issues, improved test isolation
|
||||
|
||||
**Test Coverage:**
|
||||
- 16+ test files covering all major handlers
|
||||
- Tests use `//go:build test` build tag
|
||||
- Comprehensive fixtures for users, services, bookings
|
||||
- Auth helper with JWT token generation for both user and admin roles
|
||||
|
||||
## 📂 Environment Variables
|
||||
|
||||
| Variable | Purpose | Example |
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
> **Last Updated:** February 2026
|
||||
#MW|> **Last Updated:** March 2026
|
||||
> **Status:** Work in Progress
|
||||
|
||||
---
|
||||
@@ -259,9 +259,27 @@ go test -v -run "TestBooking" ./...
|
||||
- Test tokens use fixed secret: `test-secret-key-for-testing-only`
|
||||
- Fixtures auto-generate unique emails to avoid conflicts
|
||||
|
||||
### Recent Testing Updates (March 2026)
|
||||
|
||||
Since the February 2026 update, extensive testing has been conducted which uncovered and fixed several issues:
|
||||
|
||||
**Testing Improvements:**
|
||||
- Added comprehensive test suite for `notifications` handler (600+ lines)
|
||||
- Added new booking flow tests covering user booking creation
|
||||
- Added extensive test docstrings across all test files
|
||||
- Fixed test database setup and fixture issues
|
||||
|
||||
**Issues Discovered & Fixed Through Testing:**
|
||||
- **Edit Request Bugs**: Multiple issues in booking edit request handling:
|
||||
- Fixed validation for overlapping bookings during edits
|
||||
- Fixed edit request approval flow
|
||||
- Fixed edit request rejection handling
|
||||
- Fixed status transition logic for edit requests
|
||||
- **SQL Function Updates**: Refactored and optimized database functions in `init-script.sql`
|
||||
- **Test Infrastructure**: Fixed manual test corruption issues, improved test isolation
|
||||
|
||||
---
|
||||
|
||||
## Current Architecture
|
||||
|
||||
### Overview Diagram
|
||||
|
||||
|
||||
Reference in New Issue
Block a user